I have a RadGridView setup similar to the GridView FirstLook sample in the Telerik online demos. There is a RadTabControl inside the row details. How do I change the Header of one of the Tab Items based on the category of the record/row? Also, in the row details, I'll be adding another GridView where the data, including the columns, will be different depending on the category of the record. How can I do this?
Thanks.
8 Answers, 1 is accepted
I follow the MVVM pattern so each RadTabItem in my RadTabControl points to a seperate View.
I then bind an ObservableCollection property in each Views ViewModel to the data collected on the LoadingRowDetails event using EventToCommand.
The problem I am having is that if more than one row has its RowDetails visible the rowdetails get populated with the same data in both rows.
And help would be much appreciated
Could you provide a bit more details about the way you handle LoadingRowDetails event ?
Generally, the data context of the RowDetails is the corresponding row, so if you check its Item, you will be able to define which data to load in the details.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
I'm also using MVVM but I'm still new to Silverlight and thus MVVM. I'm binding my LoadingRowDetails event of the GridView to a Command in my ViewModel. How do I get the ID (or any other value) from the parent record and pass it to my Command to populate my RowDetails?
The other issue I'm trying to figure out is how to load my may GridView on Load. How do I execute a Command on Load?
Thanks,
Ronald
Generally, you can follow the approach illustrated in this article for getting the arguments of the event. However, I would recommend you to take a look at our demos and follow the idea of performing all that logic at the data layer - since the data contest of the row details is the corresponding item, you can just bind the elements in them to a property from the parent item.
Still, let me know in case you need any further assistance.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
The thing is I have a GridView in the RowDetails of which I want to populate only when the RowDetails is visible or opened. Depending on a value on the parent record, the details GridView will be populated using different datasource. I'm currently using the approach of MVVM in the article below:
http://www.codeproject.com/Articles/154736/Data-and-Command-Bindings-for-Silverlight-MVVM-App
I want to bind the LoadingRowDetails event to a Command in my ViewModel but I don't know how to pass a value from the parent record to the Command. Do you have examples that demonstrate these functionality?
Thanks,
Ronald
You can find the item from the arguments of the LoadingRowDetails event:
var club =
e.Row.Item
as Club;
All the best,
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Did you ever get a solution for this. I am have the same scenario.