datagrid sort and select row
Hello,
I have 3 Columns that contain the following:
Column1 - unique data
Column2 - item description
Column3 - total number of item for each row
Sometimes Column2 can be emtpy. For e.g. if i have item=1, description="", totalcount="3" and row=10, if i click the column header2 for sorting, how will i be able to get the key value using find in the dataview? Below is my code that works only if column2 contains data. :(
int index = -1;
dataview.Sort = dataViewSource.Sort + ", " + column1;
object[] myobject = new object[]
{
datarow.column2,
datarow.column1
};
index = dataview.Find( myobject );
Please help.
thanks,
mutant