1. Please see the attached screen shot, I am using group by column as well group by row. when i group by the header looks small and ugly, how to make the same size as the other row.
2. Header appears after every group by, is there any way i can display only in the top
Hi Peter,
1. Is happening b/c you have the xamGrid in a container that is giving it Infinite Width. This is not recommended for a number of reasons. The main reason being performance, as you loose virtualization. So, i'd recommend you take the xamGrid out of the ScrollPanel or StackPanel that you have it in.
2. Currently we only offer the option to display Header rows in a GroupByGroup basis, not on the root level for GroupBy.
-SteveZ
Great, one more problem i am facing, please look at the screen why the rows are not aligned properly
Regards,Peter
Do you have your indentation set to 0?
I do not think so, please see the attached source code. one more question when i group the column i am not able to add a new row, why? Am i missing some thing, or this is not possible.
regards,Peter
You do have the indentation set to 0:
<ig:XamGrid
Name="xamGridPrgProposal"
AutoGenerateColumns="True"
Indentation="0"
As for the AddNewRow...it's hard to say as you don't have a full sample attached. Perhaps it has something to do with the style you're setting for the AddNewRow?
Also, does your underlying data object have a public empty ctor?
Withi this i have attached the source code, as well as the screen shot the problem i am facing.
1. To refresh the summaries i was asked to call InvalidateData() in the CellExitedEditMode event when i do this i am getting all sorts of problem.
2. How do i apply the format in the column header style in the grouped by column..
3. Why there is no Add New Row option is not availble.
4, Where there is additional two new column appears?
5. Why there is a gap between the last row and the scroll bar.
Am I missing some thing.
Hey Peter,
To style the GroupByRow, you can use the grid.GroupBySettings.GroupByRowStyle
To style the GroupColumn, just set the Style property on the GroupColumn itself
For accessing children Columns, check out this link:
http://help.infragistics.com/NetAdvantage/Silverlight/2010.3/CLR4.0/?page=xamGrid_Group_Column.html
It basically states you can use the AllColumns property
Column MyColumn = MyDataGrid.Columns.AllColumns["ActualYears"] as Column;
"ActualYears"
as
To add a new row. If you collection is an Observablecollection or implements INotifyCollectionChanged, then you can just add a new data object right into your collection and the xamGrid will automatically update.
Otherwise, you could use the Rows Collection's add method
Row r = grid.Rows.CreateItem(new YourDataObject());
grid.Rows.Add(r);
For point 2 i need to rephrase my question, i am not concerned about formating But i am concerned about the header style, do you see the normal header is dark in color and the Grouped header is light, i want to apply the same color, please guide me how to do this, any samples.
Please refer to the source code in the previous post, To format it I am applying like this, but unfortuntely, i could not find the ActualsYear1 column since it is grouped, any idea how to traverse to this column to apply the format.
((TextColumn)this.xamGridPrgProposal.Columns.DataColumns["ActualsYear1"]).FormatString = "{0:N}€";
3, Any idea how to add a new row, either through code, any sample would be appreciated
1. Use RefreshSummaries...InvalidateData shouldn't ever be called in exit edit mode, as it flushes the Data management and rebuilds, which puts the xamGrid in an outdated state while its in the middle of an operation.
private void xamGridPrgProposal_CellExitedEditMode(object sender, CellExitedEditingEventArgs e)
{
// this.xamGridPrgProposal.InvalidateData();
((RowsManager)e.Cell.Row.Manager).RefreshSummaries();
}
2. On each column there is a property called GroupByItemTemplate that you can use to customize what gets displayed when that column is grouped.
3. I'll have to look into this...for some reason when groupby is on the addnew row is removed... i forget if this is by design or if its a bug. I'll have to spend some time looking at it.
4. B/c you have AutoGenerate columns set to true, Item is your indexer property.
5. B/c the grid is sizing to your container, and you don't have enough rows to fill the required height. If your grid size is static, then you should set its size.
Looks like in the last post source code did not come through, please find the source code.