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

GridDataBoundGrid Read Sorted Grid

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


1 Reply

SR Sri Rajan Syncfusion Team July 1, 2008 12:03 PM UTC

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



Loader.
Live Chat Icon For mobile
Up arrow icon