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. Image for the cookie policy date

SfDataGrid find data with Linq

How to find a data in SfDataGrid with Linq?

e.g.: var row =  sfdatagrid.View.Records.Where (c => c.FirstName == "Joe").FirstOrDefault();


1 Reply

JG Jai Ganesh S Syncfusion Team January 27, 2015 06:43 PM UTC

Hi Diego,

Thank you for using Syncfusion products.

We have analyzed your query. You can get the data in SfDataGrid with Linq by using the following code snippet,

Code Snippet [C#]:

var record = datagrid.View.Records.Where(c => (c.Data as BusinessObjects).EmployeeName == "Mahesh").FirstOrDefault().Data;

We have also prepared the sample based on this and please find the sample under the following location,

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/SfGridWpfSample740124510.zip

Please let us know if you need further assistance.

Thank you,

Jai Ganesh S



Loader.
Live Chat Icon For mobile
Up arrow icon