Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
35
Search in XamDataGrid
posted

Hi all,

is it possible to add a search field in the XamDataGrid? For example a field above every column in the XamDataGrid, where the user can enter a search string and the items will be filtered.

Thanks

  • 115
    posted

    Hi,

    Hope this helps for you.

    Keep TextBox for Searching a string on Key Up event of Textbox just do this logic it will effect.

     

    for (int count = 0; count < Grid.Records.Count; count++)

    {

    DataRecord dr = Grid.Records[count] as DataRecord;

    String cellvalue=dr.Cells[ColumnIndex].Value.toString();

    if(cellvalue.ToUpper().StartsWith(textbox1.Text.ToUpper()))

    {

    Grid.Records[count].Visibility = Visibility.Visible;

    }

    else

    {

    Grid.Records[count].Visibility = Visibility.Collapsed;

    }

    }

  • 8576
    Offline posted
    Hi -
     
    Please submit a support request for this at http://es.infragistics.com/gethelp for suggestions on how to achieve this scenario.
     
    Joe Modica