Hi,
I have UltraGrid bound to a data source at run time.
I need to have headers in following format.
I want to achieve above header format at run time.
Please Help!
What version of the grid are you using?
It looks like you might need to use nested groups in order to acheive this layout. But it's not really clear to me if there are groups here or if they are just columns that span other columns.
If you want nested groups, you would have to use v9.1 of the grid and use the new RowLayoutStyle with groups. If they are all just columns, then you could use a regular RowLayout in any version of the grid.
Hi Mike
Groups will not solve my problem because the snapshot given above is only a part of UltraGrid. I have many other columns for which i don't need the group headers. And there is a requirement for group headers that every column must belong to a header.
So i am using RowLayouts for that
ultraGrid1.DisplayLayout.Bands[0].RowLayoutStyle = Infragistics.Win.UltraWinGrid.RowLayoutStyle.GroupLayout;
Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumnBS = new Infragistics.Win.UltraWinGrid.UltraGridColumn("Unbound",0);
ultraGridColumnBS.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.Append; ultraGridColumnBS.Header.Caption="Unbound";
ultraGridColumnBS.RowLayoutColumnInfo.LabelPosition = Infragistics.Win.UltraWinGrid.LabelPosition.LabelOnly;
ultraGridColumnBS.RowLayoutColumnInfo.OriginX = ultraGrid1.DisplayLayout.Bands[0].Columns["BS1"].RowLayoutColumnInfo.OriginX; ultraGridColumnBS.RowLayoutColumnInfo.SpanX = 4; ultraGridColumnBS.Hidden = false; ultraGrid1.DisplayLayout.Bands[0].Columns.Add("Unbound", "Unbound");
Here the problem i am getting "-1" from below line of code used above
ultraGrid1.DisplayLayout.Bands[0].Columns["BS1"].RowLayoutColumnInfo.OriginX;
Result of above code::: A column having caption "UnBound" is getting added as the last column having cell attched to it inspite of that fact we have used the property "Infragistics.Win.UltraWinGrid.LabelPosition.LabelOnly" above.
Please Help!!
sanjiv_aneja said:Groups will not solve my problem because the snapshot given above is only a part of UltraGrid. I have many other columns for which i don't need the group headers. And there is a requirement for group headers that every column must belong to a header.
That is a requirement for using groups in the standard mode. It does not apply to the new GroupLayout mode which was added in v.91.
sanjiv_aneja said: Here the problem i am getting "-1" from below line of code used above ultraGrid1.DisplayLayout.Bands[0].Columns["BS1"].RowLayoutColumnInfo.OriginX;
Since you are never setting this proeprty to anything, it is returning the default value. Why is that a problem?
sanjiv_aneja said:Result of above code::: A column having caption "UnBound" is getting added as the last column having cell attched to it inspite of that fact we have used the property "Infragistics.Win.UltraWinGrid.LabelPosition.LabelOnly" above.
There is no reason to use the LabelOnly style in GroupLayout mode, since you can now use actual groups (which have headers without cells). So it's probably not honored in this mode.