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

Radgridview RowDetailsTemplate view, edit-update

2 Answers 91 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Chetan
Top achievements
Rank 1
Chetan asked on 05 Dec 2012, 10:37 AM
Today is my first day to work with silverlight grid view. ITs seems really nice control.
I am able to show data in grid with MVVM pattern, also the filters working correctly. Also able to view data in require format within row details template using textblocks, really nice product.

Query: when i changed binded controls from text block to text box, when details templates display by default it shows data in edit mode.
I have googled and checked in grid view help, but not able to find any sample for full fill requirment. I think it is quite possible.

My requirment is:
1. in row detail template intially show data in read only mode. with "edit" button >> this i can show with demo example provided.
But when click on edit button require data should display in textbox, drop down with udpate button. on click update using MVVM it should get saved.  I am not able to think how can this done, is it using data form ? Any help on same is appreciated.

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 05 Dec 2012, 10:48 AM
Hello,

If you TwoWay bind your TextBoxes to the properties of your business object, they will be automatically updated when the user enters something in the TextBoxes. That's all you need to do. Nothing special.

For more information, please read the topics under the Row Details section in our online documentation.

In fact, your question could be asked about any kind of DataTemplate in Silverlight, so it is not particularly relevant to Telerik controls. You can try to do exactly the same thing with the stock Silverlight grid and it will be the same as with RadGridView.

I hope this helps.

All the best,
Rossen Hristov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Chetan
Top achievements
Rank 1
answered on 05 Dec 2012, 12:08 PM
Many Thanks for quick reply.


I just found followng thread. Here is same what I tried to asked.
http://www.telerik.com/community/forums/silverlight/data-form/dataform-as-radgridview-rowdetailtemplate.aspx

But when I implemented same with dataform auto generated columns its works fine. When I added datafields and controls in it. Row details view does not shows anything.

Regarding,
If you TwoWay bind your TextBoxes to the properties of your business object, they will be automatically updated when the user enters something in the TextBoxes. That's all you need to do. Nothing special
>> yes understood, but initially i want to show details in readonly mode with one "Edit" button, on click Edit button content should move to edit mode. 
Tags
GridView
Asked by
Chetan
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Chetan
Top achievements
Rank 1
Share this question
or