This question is locked. New answers and comments are not allowed.
Voss Grose
Top achievements
Rank 1
Voss Grose
asked on 26 Jul 2009, 03:06 AM
How do I format a Grouped column?
<grid:RadGridView.GroupDescriptors>
<data:GroupDescriptor Member="Time">
<data:GroupDescriptor.AggregateFunctions>
<data:CountFunction Caption="Items:" />
</data:GroupDescriptor.AggregateFunctions>
</data:GroupDescriptor>
</grid:RadGridView.GroupDescriptors>
<grid:RadGridView.Columns>
<grid:GridViewDataColumn HeaderText="TIME" UniqueName="Time" DataFormatString="{}{0:t}" />
<grid:GridViewDataColumn HeaderText="NAME" UniqueName="Reservation.Guest.FullName" />
<grid:GridViewDataColumn HeaderText="#" UniqueName="Size" />
</grid:RadGridView.Columns>
Thanks,
Voss.
<grid:RadGridView.GroupDescriptors>
<data:GroupDescriptor Member="Time">
<data:GroupDescriptor.AggregateFunctions>
<data:CountFunction Caption="Items:" />
</data:GroupDescriptor.AggregateFunctions>
</data:GroupDescriptor>
</grid:RadGridView.GroupDescriptors>
<grid:RadGridView.Columns>
<grid:GridViewDataColumn HeaderText="TIME" UniqueName="Time" DataFormatString="{}{0:t}" />
<grid:GridViewDataColumn HeaderText="NAME" UniqueName="Reservation.Guest.FullName" />
<grid:GridViewDataColumn HeaderText="#" UniqueName="Size" />
</grid:RadGridView.Columns>
Thanks,
Voss.
5 Answers, 1 is accepted
0
Hi Voss Grose,
I am not sure I get the question . Can you please be more specific what visual part do you want formatted ? Any details will help me to provide you a solution.
All the best,
Pavel Pavlov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I am not sure I get the question . Can you please be more specific what visual part do you want formatted ? Any details will help me to provide you a solution.
All the best,
Pavel Pavlov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Voss Grose
Top achievements
Rank 1
answered on 29 Jul 2009, 03:49 PM
Pavel,
sorry for the confusion, but I'm wanting to be able to format my GridViewGroupHeader rows.
I currently group the rows by a DateTimeField and that field shows in the Group Header, but I want to format the row to show only time.
example:
Currently shows
1/1/1900 5:30:00 PM | COUNT: 16
1/1/1900 6:00:00 PM | COUNT: 5
1/1/1900 6:30:00 PM | COUNT: 11
I would like to show the following:
5:30 PM COUNT: 16
6:00 PM COUNT: 5
6:30 PM COUNT: 11
1. I do not know how to format the Group Header rows.
2. And another questions related is how do I get rid of the black bar (looks like a Pipe) that seperates the Grouped DataElement from the aggreate count data?
Thanks,
Voss.
sorry for the confusion, but I'm wanting to be able to format my GridViewGroupHeader rows.
I currently group the rows by a DateTimeField and that field shows in the Group Header, but I want to format the row to show only time.
example:
Currently shows
1/1/1900 5:30:00 PM | COUNT: 16
1/1/1900 6:00:00 PM | COUNT: 5
1/1/1900 6:30:00 PM | COUNT: 11
I would like to show the following:
5:30 PM COUNT: 16
6:00 PM COUNT: 5
6:30 PM COUNT: 11
1. I do not know how to format the Group Header rows.
2. And another questions related is how do I get rid of the black bar (looks like a Pipe) that seperates the Grouped DataElement from the aggreate count data?
Thanks,
Voss.
0
Accepted
Hello Voss Grose,
The attached sample demonstrates a way to have the date in the header formatted.
Best wishes,
Pavel Pavlov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
The attached sample demonstrates a way to have the date in the header formatted.
Best wishes,
Pavel Pavlov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
sandy pochiraju
Top achievements
Rank 1
answered on 07 Sep 2009, 06:15 AM
Hi All,
i have this piece of code in the constructor my page. However, i dont get the count, when i try to group on Bin column. Please can you let me know where am i doing it wrong. i did nt code this in the .xaml file though.
i have this piece of code in the constructor my page. However, i dont get the count, when i try to group on Bin column. Please can you let me know where am i doing it wrong. i did nt code this in the .xaml file though.
GroupDescriptor dsc = new GroupDescriptor();
dsc.Member =
"Bin";
CountFunction cnt = new CountFunction();
cnt.FunctionName =
"total";
cnt.SourceField =
"Bin";
dsc.AggregateFunctions.Add(cnt);
WipGrid.GroupDescriptors.Add(dsc);
One more question is...
is there a way to get the count of number of rows per group for all the available columns in the grid with out hard coding their names?
i have a grid with several columns, and i wud like to display row count per group for any column which user used to group by. i dont want to hard code the name of the columns. i tried to loop thru the columns and use the above code in the grid_rowloaded event but it did nt work.
Thanks so much.
Sandy
0
Hi Sandy,
I've tried this however everything worked fine on my end - please check the attached project.
Greetings,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I've tried this however everything worked fine on my end - please check the attached project.
Greetings,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
