Hi
I have a grid that shows filtered records before the grids recordset is shown, what I mean by that is the filtering and sorting is done in SQL so the data is retrieved already filtered and sorted. In the case of below it is sorted by security name.
My problem is twofold.
First, the current row icon always goes to row 5 in the grid and this looks strange, I am guessing it is because it has the lowest ID number in the dataset but can I set it to go to the first displayed row? The screenshot below shows how it looks at the moment
The second issue is that when I click another row, row 5 then displayed dotted lines around it as per the following screenshot when I click to go to another row:
This only happens the first time the grid is loaded, after that I can click rows anywhere and the cell I click on is selected as expected, it is only when the grid is loaded up that I have to click twice to move to another row/cell the first time.
Any help would be appreciated.
Thanks
Paul
Paul,
Great, glad you were able to resolve this. Let me know if you have any additional questions or concerns.
Hi Michael, Ignore the above I have found the problem. The text boxes above the grid are for filtering the records before they are retriened from database. I have code in the UltraTextEditor boxes that refreshed to records in AfterExitEdit, I didn't realise this event was being raised even when the data in those text boxes hadn't changed.
The row selector issue has disappeared also.
Hi Michael,
There is no logic/code setting the row to be selected, that is the issue it is being done automatically by the grid. I have not set anything to make it do so.
I also used the draw filter which removed the focus rectangle but did not fix the problem that I still have to click another row or cell twice in order to move into that cell or row. After that it works as expected but then I close the form, reopen it and the problem is back again.
Hello Paul,
Thank you for contacting Infragistics. Do you have logic that presets the selected row? If not, please provide a sample application that demonstrates the 5th row being selected by default. The ActiveRow or ActiveCell in the grid shows a dotted rectangle inside the row - this is called the Focus Rectangle. It indicates to the user which control on the form has input focus.
We have a topic in our online documentation on how to change this:https://es.infragistics.com/help/winforms/wingrid-customizing-the-focus-rectangle-on-an-active-element-using-drawfilter
Here's a KB article that tells you how to turn it off:
HOWTO:How can I turn off the Focus Rectangle on an Infragistics Win Control?