ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.FirstCellInGrid).
ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.entereditmode).
Hi Mike
I don't have problem with adding rows(this parts works fine), I need to put the cursor on the firts cell when a row is created.
Do you know How do that in.?(C#/winForms)
thanks.
You cannot add bands to the grid. The bands of the grid come from the data source. I'm pretty sure the AddNew method will not show up in the Visual Studio Intellisense for that reason. And the documentation on the method should state that it's for internal, serialization purposes only.
Hi all, I have a similar problem, I have this code
ultraGrid1.DisplayLayout.Bands[0].AddNew();ultraGrid1.DisplayLayout.Bands[0].Columns["CODE"].Header.Caption = "Cod";ultraGrid1.DisplayLayout.Bands[0].Columns["DESCRIPTION"].Width = 250;ultraGrid1.ActiveCell = ultraGrid1.Rows[0].Cells[0];
I am traying to put the focus on the firts cell (CODE) but the cell don't enter in edit mode.
markaston said:in the Constructor
That's probably the problem. You cannot set focus to a control on a form before, or even during, the Form_Load event. This is not limited to the grid, it's tue of any control.
You might try using the Form_Shown event. I think this might be one of the reasons this event was added by Microsoft.
If that doesn't work, then I would try using the form's Paint event and just use a flag to make sure you on;y call your code the first time the event fires.
Another option would be to use Form_Load or Form_Shown and use a BeginInvoke to call a method that sets focus and puts the grid into edit mode, rather than calling the code from directly inside the event.
in the Constructor method of the class. basically, i am starting out with an empty grid and want the user to populate it using the 'AddRowOnTop'. i want focus to be in the first field so they can just start typing without having to mouse click. i have been trying to figure out how to programmatically set ActiveRow = the AddRow with no luck. thanks for getting back to me on this.