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.

GridDataBoundGrid Read Sorted Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

74838 Jun 30,2008 09:55 AM Jul 1,2008 08:03 AM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On June 30, 2008 09:55 AM

I'm in the process of writing test cases for my software, and have run into a bit of a problem. My goal is to sort a GDBG and then retrieve the information in that sorted order. What is the best method to go about this?

Thanks,
Eric


Sri Rajan [Syncfusion]
Replied On July 1, 2008 08:03 AM

Hi Eric,

Thank you for your interest in Syncfusion products.

Please refer the below code to sort a GridDataBoundGrid and retrieve the information in

that sorted order.

private void buttonAdv1_Click(object sender, EventArgs e)
{
this.gridDataBoundGrid1.SortColumn(1);
for (int i = 1; i <= this.gridDataBoundGrid1.Model.RowCount-1; i++)
{
Console.WriteLine("Col1 = " + this.gridDataBoundGrid1.Model[i, 1].Text + " , Col2 = "

+ this.gridDataBoundGrid1.Model[i, 2].Text);
}
}


Here is the minimal sample which implements this task.

rel='nofollow' href="
http://websamples.syncfusion.com/samples/grid.windows/F74838/main.htm">http://websam

ples.syncfusion.com/samples/grid.windows/F74838/main.htm

Best Regard



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.

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.

;