i have UltraGridview and insert 3 column new
UtraGridview.DisplayLayout.Bands(0).Columns.Insert(0, column_name1)
UtraGridview.DisplayLayout.Bands(0).Columns.Insert(0, column_name2)
UtraGridview.DisplayLayout.Bands(0).Columns.Insert(0, column_name3)
but when insert in to Gridview then localtion of column not localtion
I'm not sure what the problem you're experiencing is. If you do the following:
e.Layout.Bands[0].Columns.Insert(0, "One");e.Layout.Bands[0].Columns.Insert(0, "Two");e.Layout.Bands[0].Columns.Insert(0, "Three");
Then the order of the columns will (correctly) be "Three", "Two", "One". This is because you're always inserting the columns at the beginning of the collection, so the last column that you add will be the first visible one.
-Matt
thank reply
If you want to define that position of the column will be third, you can write:
private void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e)
{
e.Layout.Bands[0].Columns["Column_Name"].Header.VisiblePosition = 2; // 0 based index
}
thank Anna79 and Matt .insert columnt then i okay but when insert column located next to each other
this code i want insert to UltraGridview:
but success then
column_name3
column_name(already in UtraGridview )
column_name2
column_name1
i want column :column_name3;column_name2;column_name1
can you help me ?thank
yahoo:tazan_90
I'm not sure that I understand the issue that you're having. As I mentioned previously, you're inserting rows at the 0 index, so they'll be backwards. If you want to keep inserting rows in this fashion, the previous poster mentioned that you can set the VisibleIndex of the column's header to control where the column will be. If by "already in UltraGridView" you mean that you have other columns that are showing up between your new columns, then you need to use the VisibleIndex of all the columns to control the order.
oh i understand .okies thank Matt