Hello friends, I have a Control Ultragrid with 5 columns and 1 row, I can't capture la valuefrom the column 5, but if I make clic out from Ultragrid I can obtain the value. Any idea. Thanks
Thanks for All,
God Bless You.
Hello ErosDark,
If you are Forcing the UltraGrid to ExitMode, this means that you would be able to type only a single character, since the CellChange event will fire each time you press a key from the keyboard, so you could use the following instead:
e.Cell.Row.Update()
When the cell that is currently being edited belongs to "Column5".
If you have any other questions with this matter please feel free to ask.
Thanks for replying, I have done this:
In the event CellChange for my column 5 I put this code:
Select Case e.Cell.Column.Key
Case 'Column5'
Dim grid As UltraGrid = CType(sender, UltraGrid)
grid.PerformAction(UltraGridAction.ExitEditMode)
End Select
For now this is ok, What do you think?
Regards,
Have you been able to try if the suggested approaches will help you in your scenario?
What you could try here is setting the UpdateMode of the UltraGrid after initialize the components on the form like:
public Form1(){ InitializeComponent(); ultraGrid1.UpdateMode = Infragistics.Win.UltraWinGrid.UpdateMode.OnCellChangeOrLostFocus;}
If this doesn't help than you could try to force updating of the current row on the BeforeExitEditMode event like:
private void ultraGrid1_BeforeExitEditMode(object sender, Infragistics.Win.UltraWinGrid.BeforeExitEditModeEventArgs e) { if (ultraGrid1.ActiveCell.Column.Key == "String4") { ultraGrid1.ActiveRow.Update(); } }
If you still doesn't not get the desired behavior than you could try forcing the row updating in the cell change event hadler like:
private void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { if (e.Cell.Column.Key == "String4") { e.Cell.Row.Update(); } }
If none of the above helps you please feel free to let me know, so I will search for another suitable way for you to use.