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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfDataGrid find data with Linq

Thread ID:





118046 Jan 24,2015 02:24 PM UTC Jan 27,2015 06:43 PM UTC WPF 1
Tags: SfDataGrid
Diego Fernando Urabayen
Asked On January 24, 2015 02:24 PM UTC

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 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


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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