I want to add a new row in ultra grid at index 0 mean at top of grid.
Hi,
Do you mean in code? Or do you want your users to be able to do this through the UI?
In code you can do something like this:
private void button1_Click(object sender, EventArgs e) { UltraGridRow row = this.ultraGrid1.DisplayLayout.Bands[0].AddNew(); row.ParentCollection.Move(row, 0); this.ultraGrid1.ActiveRowScrollRegion.ScrollRowIntoView(row); }
To enable adding for your users, just grid.DisplayLayout.Override.AllowAddNew to one of the settings that includes the word "Top", like FixedAddRowOnTop.
thanks a lot for u r responce but i have a small doubt in this code in my system
UltraGridRow row = this.ultraGrid1.DisplayLayout.Bands[0].AddNew();
in the above for UltraGridRow it is saying missing any reference or UltraGridRow could not found may i know the reason pls. for this what i have to do
thanks
yes i got it i added namespaces
using Infragistics.Shared;using Infragistics.Win;using Infragistics.Win.UltraWinGrid;using System.Diagnostics;
then i got thanks