This is probably easy, but I can’t find the documentation for this.
I want to use Group Header rows that will scroll with the grid content. I want to have more than one header row.
Basically, I want functionality similar to the GroupManagerRow, but with a lot more formatting flexibility. I have a block of data to present before each group (set of data rows) that describes the group. But I can’t figure out how to populate the Group Header rows.
I have an unbound grid. At design time, I created my columns in the grid. I created a Group and dragged one column into the GroupByRow. There is a GroupManagerRow with visible set to false. I inserted a ColumnManagerRow into the group (which puts nice headers on my grid’s columns).
I also inserted a TextRow into the group which appears just below my ColumnManagerRow. I can hard-code a text value at design time, but how do I fill the TextRow dynamically at run time?
My code (in C#) looks kinda like this:
/* Create query, open database connection … */
SqlDataReader reader = command.ExecuteReader();
while ( reader.Read() )
{
Xceed.Grid.DataRow myDataRow = myGrid.DataRows.AddNew();
myDataRow.Cells[0].Value = reader[0];
myDataRow.Cells[1].Value = reader[1];
…
myDataRow.EndEdit();
}
reader.Close();
Jon Z
Imported from legacy forums. Posted by AlphaGuys (had 2293 views)