We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TextBox filter

Thread ID:

Created:

Updated:

Platform:

Replies:

124790 Jun 30,2016 07:32 AM UTC Jul 4,2016 11:35 AM UTC ASP.NET Web Forms 3
loading
Tags: Grid
Hrvoje Voda
Asked On June 30, 2016 07:32 AM UTC

is there a way to user asp textbox as grid filter?


Prasanna Kumar Viswanathan [Syncfusion]
Replied On July 1, 2016 10:28 AM UTC

Hi Voda, 

Thank you for contacting Syncfusion support.   
  
We created a sample where we created an external ASP textbox. After mentioning the values in the textbox, then click search button to filter the particular column using filterColumn method of ejGrid.   
   
If we have misunderstood your query, please elaborate your requirement to provide better solution.   

Find the code example and sample: 


<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent"> 
    <asp:TextBox ID="textbox" runat="server"></asp:TextBox> 
      <ej:Button ID="button" ClientSideOnClick="changed" Type="Button" runat="server" Text="search"></ej:Button> 
        <ej:Grid ID="Grid" runat="server" AllowSorting="true" AllowPaging="true"> 
            ------------------------------------ 
 
            </Columns> 
        </ej:Grid> 
<script> 
    function changed(args) { 
        var gridObj = $("#<%=Grid.ClientID%>").ejGrid("instance"); 
        gridObj.model.allowFiltering = true; 
        var value = $("#<%=textbox.ClientID%>").val(); 
        gridObj.filterColumn("CustomerID", "contains", value, "and", true);    } 
</script> 
</asp:Content> 



Regards, 
Prasanna Kumar N.S.V 
 


Hrvoje Voda
Replied On July 1, 2016 10:38 AM UTC

After I put this code, refresh button stop working.
Row became editable - I don't want that.

Is there a way to do it vb.net code behind?

Prasanna Kumar Viswanathan [Syncfusion]
Replied On July 4, 2016 11:35 AM UTC

Hi Hrvoje, 

Thanks for the update. 

In the last update, we have updated the sample with non-editable grid and you have mentioned the rows become editable after you put the mentioned code. So, please provide the following details to validate the issue,   
 
1. You have also mentioned that the refresh button stopped working. So, please share the use of the refresh button.  
                                                                                                                                                                                                                                             
2. Code example of an rendered Grid. 

3.  Essential Studio Version details. 

Regards, 
Prasanna Kumar N.S.V 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;