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

Editable GridView in Details Mode

1 Answer 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Naveed Sorush
Top achievements
Rank 1
Naveed Sorush asked on 21 Jul 2010, 11:11 PM
Hello,

I am trying to use the GridView as shown in http://demos.telerik.com/silverlight/#GridView/RowDetails demo, with two differences:

1) I want the GridView to only show the Details, not the rows itself (in this demo, on the right, choose Visible under "Inline Details Visibility Mode" to see the detailed rows).
2) I want the Details to be editable

Is there a way to achieve this using GridView? I am thinking of creating my own GridView based on the Telerik GridView which will have the above look&feel and functionality. Something like below:

namespace 

 

MyControls {

 

 

 

    public class MyGridView : RadGridView
    { 
            
public MyGridview()

            {
                   ............

 

 

            }
    }
}

Thanks,
Naveed

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 22 Jul 2010, 07:18 AM
Hello Naveed Sorush,

In order to edit with the RowDetails, you need to define your custom RowDetailsTemplate and to set the Text property of the each field like follows:

Text="{Binding Name,Mode=TwoWay, UpdateSourceTrigger=Default}"

Thus once you add a new value for each field, the underlaying data source will be aware of the changes and will update the values in the corresponding row too.
As for setting the RowDetails in the place of the row when it is clicked, you need to implemen IValueConverter Interface that will be responsible for setting the row's visibility into collapsed once the RowDetails are shown. Furthermore, you have to create your own Style and set it through the Property of the grid RowStyle
I am sending you a sample project implementing both solutions.


Sincerely yours,
Maya
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
Tags
GridView
Asked by
Naveed Sorush
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or