![]() ![]() Unfortunately I haven't the time at the moment to work this out as will definately be a bit of a headache.I might have to leave that one for you to work out yourself.or if I find time I'll post back laterġ. ' **** if grid receiving focus from Column3 move to new row column1 ***** ' **** if grid receiving focus from Column2 then move to column3 ***** etc, etc, etc ![]() ' **** if grid receiving focus from Column1 then move to column2 ***** Selected-Property of the first row to true.OK your 2nd question re Tabbing backwards.to be honest I've not ever had a need to do this and remember being that we are "SIMULATING" an editable gird I'm tipping it's not going to be 100% straightforward.but as yet none of my users have requested it.but it would be nice to have wouldn't it :)īasically the fgdMyEditableGrid_GotFocus event is coded so that that cursor moves left to right as the grid receives focus back from the floating textbox Value-Property of the " selected"-cell of the "form-associated" row to true.ĥ.3) Call ClearSelection() on the DataGridView.ĥ.4) Set the. Value-Property of the " selected"-cell of the first row to false.ĥ.2) Set the. ![]() Visible-Property of the " selected"-column of the DataGridView to false.ĥ) Where you currently have your code to highlight the "form-associated" row, do this instead:ĥ.1) Set the. DefaultView of the DataTable to " selected desc".Ĥ) Set the. DataSource of your DataGridView.ģ) Set the. DataSource of your DataGridView, instead assign the. (Which has the benefit that it will show at the top even if there aren't enough records present to move the "view" so it could appear at the top.) It's up to you to decide which solution you want :)ġ) After filling the records into a DataTable, add another column to the DataTable with a name like " selected" and type of boolean.Ģ) If you currently assign the DataTable directly to the. ![]() Here's another solution, which requires a bit more effort but will actually move the selected row to the top of all rows, instead of moving the "view" so that the row appears to be at the top but not actually changes its position among the other rows. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |