Welcome Guest! To enable all features please
Login or Register.
When I find the row using search and click on it and press the Enter Key I want to change the BackColor of that Selected row.
( I will be selecting a row in a different iGrid when the enter key is pressed.)
There is a description in the Documentation, but no example code....
Is there a way to do this?
iGrid provides you with several settings related to selection. Does your grid work in row mode? Do you use multi-selection? Do you need to change the background color of all cells in a row or are we talking about changing the color of selection? In the first case, you can use iGRow.Cells.BackColor property. In the second case use the properties of iGrid related to selection, such as SelCellsBackColor and SelRowsBackColor.
In any case it would be nice to see an example demonstrating what you are doing. Read also the comprehensive Cell Selection and Current Cell section in the documentation to understand how you can control selection in iGrid.
Igor, sorry for the lack of detail.
I am using RowMode = True and RowModeHasCurCell = True.
The code is:
private void iGridXRefs_KeyPress(object sender, KeyPressEventArgs e)
string sXrefKey = Convert.ToString(iGridXRefs.CurRow);
//First check if minimums exist
bSuccessful = CheckIfMininmumsExist(sXrefKey);
// need to find in iGridXrefMinimums row
if (MyGlobals.KeyAscii(e.KeyChar.ToString()) == 8 ) //User changed mind or clicked on wrong row need to unselect?
//Set Xrefs Row back color back to White
iGridXRefs.CurRow.Cells[CurRow].[Cells]; //Row selected back color is blue need to change back to white
else if (MyGlobals.KeyAscii(e.KeyChar.ToString()) == 13)
// Need to find and select Minimums row in the iGridXrefMinimums row
//No minimums Add Row
If there are
I do not understand this logic. If you need to change the selection color for the current row (iGrid.CurRow), try to play with the SelRowsBackColor and CurCellBackColor properties.
That is what I have been doing. I really need a piece of sample code showing how to do change the current row using the SelRowsBackColor.
I hate to be such a dunce....
Do you want to change the selection color or you need to change the current
row? These are two different things. The selection color reflects the current row, and the former is determined by the latter, but not the opposite way. The documentation clearly states how to change the current row (section 6.5. Working with the Current Cell and Row):
Can you show us some screenshots of what you are doing? Perhaps, they will help us to understand your problem.
- You cannot post new topics in this forum.
- You cannot reply to topics in this forum.
- You cannot delete your posts in this forum.
- You cannot edit your posts in this forum.
- You cannot create polls in this forum.
- You cannot vote in polls in this forum.