I have a problem where I need to select a specific row.
I have a unique ID in one of the cells for each row and this ID matches an int variable that I get returned from a function.
I currently tried
int root = %return value from function%
foreach (Telerik.WinControls.UI.GridViewDataRowInfo myrow in supportMailGV.Rows)
{
SupportMail sm = (SupportMail)myrow.DataBoundItem;
if (sm.RootIssue == root)
{
supportMailGV.SelectedRows[0] = myrow;
break;
}
}
to clalrify the names
SupportMailGV is a RadGridView filled with a list of the class (SupportMail)
What happens...
The loop will find the row that ha this RootIssue and by so we should know that wehave the correct row in the grid. but when I envoke the "supportMailGV.SelectedRows[0] = myrow;" the top line is the line that gets selected, even if the line that triggered and is stored in myrow is futher down the list.
is there a way to force selected row for this gridview?
I have a unique ID in one of the cells for each row and this ID matches an int variable that I get returned from a function.
I currently tried
int root = %return value from function%
foreach (Telerik.WinControls.UI.GridViewDataRowInfo myrow in supportMailGV.Rows)
{
SupportMail sm = (SupportMail)myrow.DataBoundItem;
if (sm.RootIssue == root)
{
supportMailGV.SelectedRows[0] = myrow;
break;
}
}
to clalrify the names
SupportMailGV is a RadGridView filled with a list of the class (SupportMail)
What happens...
The loop will find the row that ha this RootIssue and by so we should know that wehave the correct row in the grid. but when I envoke the "supportMailGV.SelectedRows[0] = myrow;" the top line is the line that gets selected, even if the line that triggered and is stored in myrow is futher down the list.
is there a way to force selected row for this gridview?