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

Editable Row

4 Answers 219 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sandeep
Top achievements
Rank 1
Sandeep asked on 22 Feb 2018, 02:12 AM

Hello ,

             I am new to telerik tool and upgrading the old asp.net application to WPF browser application which extensively uses the grid view control.

             I am trying to replicate following functionality from old application to new application and not sure what is the best approach and how to do it .

             1.Grid view is binded to database object and  based on the certain value present in particular field I need to show the edit button in each row, If that value    is not present then I need to hide the button.

             2. On click of this edit button, I need to show the update and cancel button in place of edit button as well as show the combo box with selections in different column (only this column need to be editable).

 

Thanks

Andy

 

            

4 Answers, 1 is accepted

Sort by
0
Sandeep
Top achievements
Rank 1
answered on 23 Feb 2018, 04:52 PM
Can someone please reply
0
Martin Ivanov
Telerik team
answered on 26 Feb 2018, 11:18 AM
Hello Sandeep,

To achieve your requirement you can define a new column for the button and set its CellTemplate property. In the CellTemplate you can define the edit, update and cancel buttons and show/hide them based on a property in the row model. То disable the default edit triggers in the gridview you can set the EditTriggers property to None. You can also check the Managing Data section to see how to update the row data manually. Note that you can disable the editing for specific columns by setting their IsReadOnly property.

I hope that helps.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Sandeep
Top achievements
Rank 1
answered on 27 Jun 2018, 11:16 PM

Hello ,

            Do you have any code example for this?

Thanks

0
Martin Ivanov
Telerik team
answered on 02 Jul 2018, 01:17 PM
Hello Sandeep,

We don't have a such example, but I've prepared a small one demonstrating how to define a column with buttons and show/hide them based on a condition. I hope that helps.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Sandeep
Top achievements
Rank 1
Answers by
Sandeep
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or