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

Update multiple rows in a column

3 Answers 302 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Adonis
Top achievements
Rank 1
Adonis asked on 10 Nov 2010, 07:42 PM
How can I update multiple row in a column, or just an entire column based on some selection? I would like to update multiple records across a singular column at one time.

 Ideally it would be similar to a client side select column where checking would select all  but in my case I have 3 values instead of a boolean value so a drop down menu of some sort would work better to update the column. Is it possible to accomplish this with RadGrid? 

3 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 15 Nov 2010, 03:43 PM
Hello Adonis,

Would only a certain column be editable in the whole RadGrid or at different times different columns would need to be edited?
 
If it is the first option, you can just set all other columns as read-only and load the RadGrid control in edit mode using the approach from one of these help articles:
Default edit mode for grid items on initial load
Put all items in edit mode without additional rebind

If this is not the case, you can take a look at this online demo and modify its javascript logic in order to make it works as per your requirements.

Greetings,
Tsvetina
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
Adonis
Top achievements
Rank 1
answered on 15 Nov 2010, 03:56 PM
Hello Tsvetina ,

at certain times  different columns would need to be edited , but what I was after is a way to bulk edit the entire column through perhaps a custom header if that is possible , if not then another method.

Thanks
0
Tsvetina
Telerik team
answered on 16 Nov 2010, 02:54 PM
Hello Adonis,

You can still use most of the logic from the demo I linked to. The difference would be in the triggering of the editing text boxes. You can specify a HeaderTemplate for the columns and add a checkbox in the header with a client-side event handler for check change. In this handler you can trigger all the textboxes in the column by modifying the logic of the ShowColumnEditor() method.

However, it might be harder to find all the needed objects in javascript to perform this action, so as an alternative you can use a built-in grid client-side event like OnColumnDblClick instead of a checkbox in the header.

Generally speaking the only thing different than the demo is when and how you switch visibility of the textbox/editor control and the label in each template column.

Regards,
Tsvetina
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
Adonis
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Adonis
Top achievements
Rank 1
Share this question
or