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.
Unfortunately, activation email could not send to your email. Please try again.

SfDataGrid find data with Linq

Thread ID:





118046 Jan 24,2015 09:24 AM Jan 27,2015 01:43 PM WPF 1
Tags: SfDataGrid
Diego Fernando Urabayen
Asked On January 24, 2015 09:24 AM

How to find a data in SfDataGrid with Linq?

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

Jai Ganesh S [Syncfusion]
Replied On January 27, 2015 01:43 PM

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


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.

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.