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

Accessing a RECORD in a GridDataBoundGrid Control

Thread ID:





78584 Dec 18,2008 05:26 PM UTC Dec 20,2008 09:14 AM UTC WinForms 3
Tags: GridControl
Henry Thacker
Asked On December 18, 2008 05:26 PM UTC

Can I get a Record object for a GDBG like you can from a grouped grid using the code:

Record r=this.gridGroupingControl1.Table.Records[RecordIndex];


If not.. I HAVE to be able to populate a record with the data, it is essential for my project.



Sameer Khan
Replied On December 18, 2008 06:28 PM UTC

If that is what you are after .,, then you can index the records collection; but you have the Collection object too [the one which is the source of your grid] Wouldn't you rather have the retrieval operation on the Collection rather than the grid?

And if you are looking for the index of the grid; then the record will absolutely exist.

Henry Thacker
Replied On December 19, 2008 12:58 PM UTC

But a RECORD object is stored in Syncfusion.Grouping.Record, so I don't think this would be applicable to something from a Data bound grid (not a grouped one).

I am quite happy to access the data source, but I need a RECORD like object.. i.e. I can access a particular column from a given record by name.. something like a hashmap for a given row in the data source.

Rajadurai C [Syncfusion]
Replied On December 20, 2008 09:14 AM UTC

Hi Henry,

Thanks for your interest in Syncfusion products.

Apologies for the delay.

Please try the following code snippet in buttonclick event handler where it retrieves the data of the selected record through the columnname.

CurrencyManager cm = (CurrencyManager)this.BindingContext[this.gridDataBoundGrid1.DataSource];
GridRangeInfoList list;
list = this.gridDataBoundGrid1.Selections.GetSelectedRows(true, false);
foreach (GridRangeInfo range in list)
for (int i = range.Top; i <= range.Bottom; i++)

Here is a minimal sample in which this code has been implemented. Please refer to this.



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