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

UNIQUE COLUMN IN GRID HIDE BUT GET THE VALUE

Dear Sir,

In My Table I have one field as unique like GUID, but in SFDATAGRID I have excluded this column.

In My SFDATAGRID I have records as per below

ID NAME
1 AAAA
1 BBBB

In the Database actually ID record 1 has GUID 500xxxxxxxx, and second 1 has GUID 6660xxxxxxxxxxxxxxxxx, as GUID was unable to show in GRID.

Now, How Can I Get the GUID Value for First Record and second record, on based of GUID will get the form details for update ?

Please reply me at the earliest.

Thanks
Deepak

3 Replies

FP Farjana Parveen Ayubb Syncfusion Team July 19, 2019 10:16 AM UTC

Hi Deepak, 
 
Thank you for using Syncfusion controls. 
 
We have analyzed your query, you can get the value of the data which is exclude from the SfDataGrid by using SfDataGrid.View.Records. Otherwise get the value from SfDataGrid.DataSource.  
 
Please refer the below code example 
 
// Get the value by using sfDataGrid.View.Records 
var value = (sfDataGrid.View.Records[0].Data as DataRowView).Row.ItemArray[0]; 
 
//Get the value by using DataSource  
var value1 =((sfDataGrid.DataSource as DataTable).Rows[0] as System.Data.DataRow).ItemArray[0]; 
 
 
Regards, 
Farjana Parveen A 



DE Deepak July 19, 2019 04:53 PM UTC

Hi Farjana Parveen A,

Thanks for Your Reply.

Our Issue is Resolved.

Once Again Thanks for Fast Reply as well as thanks for our important issue resolved.

Thanks
Deepak


FP Farjana Parveen Ayubb Syncfusion Team July 22, 2019 08:49 AM UTC

Hi Deepak, 
 
Thanks for the update. 
 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 
 
Regards, 
Farjana Parveen A 


Loader.
Up arrow icon