Gridview-Grouping data

I

icanhelp33

I am using a method to group data in Gridview. I am able to compare
one sortexpression with the gridview field. I would also like to
compare sortexpression2 with another gridviewfield. How is that
possible.

For example: GridView has FirstName,LastName,City


I would like to compare "FirstName" & "LastName" then set flag only
when both conditions are met.


private bool _SortedFlag = false;
private int _SortColumnIndex = -1;
private string _SortColumnHeader = "";


private void ResolveGroupingData(string sortExpression1, string
sortExpression2)
{
foreach (DataControlField field in gridCustomer.Columns)
{
if (field.SortExpression == sortExpression1)
{
_SortedFlag = true;
_SortColumnIndex =
gridCustomer.Columns.IndexOf(field);
_SortColumnHeader = field.HeaderText;
break;
}
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top