Hi RajGopal,
As suggested, I have entered a Direct Track incident # 37043 .
Thanks,
Pratima
>Thanks for your response and I already knew what to do to workaround this "defect".
I would have never posted this message if the problem was limited to only when the grid is displayed first time.
Problem is, Every time I click on the row header, focus goes back to the hidden cell.
I think it's ridiculous for clients of the grid to have to force the focus manually each time the row header is clicked.
If the columns are hidden GDBG should NOT be setting the focus on the cell of the hidden column in the first place.
>Hi Pratima,
Thanks for your interest in Syncfusion Products.
By default, when the grid is loaded the currentcell will be set to the cell(1, 1). In your case, the current cell will be set to the hidden column when grid is loaded. Before the grid is displayed, you could determine the first visible column index in grid and move the currentcell to it. Below is some code snippets.
// move the currentcell to the first visiblecolumn in grid
int firstVisibleCol = GetFirstVisibleColIndex(this.gridDataBoundGrid1);
this.gridDataBoundGrid1.CurrentCell.MoveTo(1, firstVisibleCol);
private int GetFirstVisibleColIndex(GridDataBoundGrid grid)
{
int firstVisibleCol = -1;
for (int i = 1; i < grid.Model.ColCount; i++)
{
if (!grid.Model.HideCols[i])
{
firstVisibleCol = i;
break;
}
}
return firstVisibleCol;
}
Once you have set the currentcell to the visible column in grid, then you will not be able to focus the hidden column using arrowkeys/mouse, unless you explicitly call the Currentcell.MoveTo method to move the currentcell to the hidden column.
Please refer the below sample for more information on this regard.
http://websamples.syncfusion.com/samples/Grid.Windows/F67572/main.htmLet me know if you have any other questions.
Have a nice time.
Regards,
Rajagopal