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

Looping through grid-rows in gridControl1

Thread ID:

Created:

Updated:

Platform:

Replies:

89836 Sep 8,2009 01:49 PM UTC Sep 10,2009 09:12 AM UTC WinForms 3
loading
Tags: GridControl
Allon
Asked On September 8, 2009 01:49 PM UTC

Hi, everyone

I'd like to know how to loop through gridrows in gridControl.
If anyone can do it, please give me simple example how to do it, and how to get the CellValue of the first column, in the current grid-row (inside the loop). I'm using vb.net.

Thanks, and have a good day :)
Allon

Jisha Joy [Syncfusion]
Replied On September 9, 2009 10:05 AM UTC

Hi Allon,

Thank you for posting query to us.

You could access the cell values of the GridControl by looping through the rows and columns. See the code:


For row As Integer = 1 To Me.GridControl1.RowCount
For col As Integer = 1 To Me.GridControl1.ColCount
Console.WriteLine(Me.GridControl1(row, col).CellValue.ToString())
Next col
Next row


Please let me know if this helps.

Regards,
Jisha

Allon
Replied On September 9, 2009 10:33 AM UTC

Thanks a lot, Jisha. I know that kind of solution already. What I realy wanted to know is what is the object, which act as DataGridRow in Syncfusion's gridControl.

Regards,
Allon

Jisha Joy [Syncfusion]
Replied On September 10, 2009 09:12 AM UTC

Hi Allon,

GridControl is not a bounded grid and it is a cell oriented grid. If you want to get the row data, then you need to loop through cells. But our GridGroupingControl is a bounded grid and you could access the records by using the following code:

Record rec = this.gridGroupingControl1.Table.Records[4];

Please let me know if you have nay questions.

Regards,
Jisha

CONFIRMATION

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.

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

;