This is a migrated thread and some comments may be shown as answers.

[Solved] Inserting a row between groups

8 Answers 205 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
John
Top achievements
Rank 1
John asked on 12 Nov 2010, 05:33 PM
I am trying to insert a row between multiple grouped rows. I can add a row just fine but it takes the style of a grouped row with one blank entry in it. What I am trying to achieve it have the gridview diplay regular rows and grouped rows at once.

Any help would be appreicated.

8 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 15 Nov 2010, 10:01 AM
Hello John,

I am afraid RadGridView does not support such mode.  Generally it has two modes - grouped and plain and mixing both is not included in the design.

However if you share some more details on what are you trying to achieve , we may think about some visual hacks to provide it. ( e.g. we may change the template of the group row to add some visuals etc) .
A picture of the desired end result would be quite helpful here.

Best wishes,
Pavel Pavlov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
John
Top achievements
Rank 1
answered on 15 Nov 2010, 06:13 PM
I have included a mock up of what I would like to see. I hope this helps.
0
Pavel Pavlov
Telerik team
answered on 16 Nov 2010, 11:33 AM
Hi John,

Thanks for sending the image . That seems easy to implement - we can show the group footer , retemplate it  and achieve the exact appearance form the mock .

*This in case the message "Group Modified By ..."  is related to the group above it .

In case it is related to the group bellow it - then we can retemplate the group header to add a line with the message .

In case you think this approach will work for you just let me know which one you need  modified - the header or the footer and I will gather a small sample project for you .

Sincerely yours,
Pavel Pavlov
the Telerik team
See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
0
John
Top achievements
Rank 1
answered on 16 Nov 2010, 05:33 PM
I was looking at the footer yesterday. I think that would be the way to go. Can you send a sample project with that template?
0
Pavel Pavlov
Telerik team
answered on 17 Nov 2010, 03:55 PM
Hello John,

The project attached demonstrates how to retemplate the footer row of the group . This way you can style it to have the look you wish .

Regards,
Pavel Pavlov
the Telerik team
See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
0
John
Top achievements
Rank 1
answered on 18 Nov 2010, 02:27 AM
Perfect! This works great. My only issue now is that I cannot seem to bind the text property. 
Here is what I tried:
<TextBlock Text="{Binding TCategory.Status}" Foreground="Blue" VerticalAlignment="Center" Margin="10,0,0,0" />



Here is what the class looks like that I am binding the grid to:

public class Transaction
{




public string Description{get;set;}
public DateTime Date {get;set;}
public int CategoryId {get;set;}
public Category TCategory {get{return Category.GetCategory(CategoryId);}} //Within the Category class I have a "Status" property
public int Amount {get;set;}
}



The grid takes a list of Transactions and groups them by Category.Description. Now I need the footer text to read the Category.Status for the group.






 
0
Pavel Pavlov
Telerik team
answered on 22 Nov 2010, 03:11 PM
Hello John,

I am attaching a modified version of my previous sample. It demonstrates how to bind the text in the footer to a property of the first item in the group.

Regards,
Pavel Pavlov
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
John
Top achievements
Rank 1
answered on 22 Nov 2010, 10:24 PM
Perfect! That did exactly what I needed it to. Thank you!
Tags
GridView
Asked by
John
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
John
Top achievements
Rank 1
Share this question
or