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

[Solved] All rows in edit mode.

8 Answers 217 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ole Oscar
Top achievements
Rank 1
Ole Oscar asked on 26 Jun 2008, 01:14 PM
I have tried to figure out how to do a simple scenario.
The user has to make rapid decisions in a grid.
I might contain up to approximately 50 rows at one time.
It is an important scenario and the user has to make the decitions in a minute or two.
Each row contains a text column (read only) and two checkboxes.
The user needs to check/uncheck the checkboxes and then save it as one atomic operation. I have tested some of the suggestions on this web site, but I can’t find a way to solve this scenario.

Best regards
Ole Oscar Johnsen

8 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Jun 2008, 06:51 AM
Hi Ole,

Try the following code snippet to put  all the rows of the Grid in edit mode.

CS:
 protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
        foreach (GridDataItem item in RadGrid1.MasterTableView.Items) 
        { 
            item.Edit = true
        } 
        RadGrid1.Rebind(); 
    } 


Thanks
Shinu
0
Ole Oscar
Top achievements
Rank 1
answered on 27 Jun 2008, 08:04 AM
Thanks,
I have now tested this and this seems to work, but I am trying to figure out how to combine this with an ObjectDataSource that works only on a row by row basis. Will RadGrid support this by for example sending all rows to the DataSource one by one or will it not.

Best Regards
Ole Oscar
0
Ole Oscar
Top achievements
Rank 1
answered on 27 Jun 2008, 08:05 AM
Thanks,
I have now tested this and this seems to work, but I am trying to figure out how to combine this with an ObjectDataSource that works only on a row by row basis. Will RadGrid support this by for example sending all rows to the DataSource one by one or will it not.

Best Regards
Ole Oscar
0
Princy
Top achievements
Rank 2
answered on 27 Jun 2008, 08:12 AM
Hi,

Have you set AllowMultiRowEdit to true in the aspx?

ASPX:
<telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowEdit="True" > 


Princy.
0
Ole Oscar
Top achievements
Rank 1
answered on 27 Jun 2008, 11:18 AM
Hi,

I have done that, but i can't figure out how to fire of the save event back to the ObjectDataSource with all rows. There are some properties called AllowAutomaticUpdates/Inserts/Deletes. There are so many options and I can't figure out witch ones that applies to what I want. Can someone point me in the right direction?
By the way. The 2008 Q1 version of these controls looks great. I have tested many versions of Infragistics(also the newest one)  and older versions of Telerik. This is the first version that has pasted all of our AJAX reqirements with dynamic loading of controls and so on.

Best Regards
Ole Oscar
0
Ole Oscar
Top achievements
Rank 1
answered on 27 Jun 2008, 11:45 AM
I have found some information about "performing batch updates" in the documentation. Is that the only way to do it ? It had been nice if I could only call a function(SaveAll) or creating a button in the footer that did the job automaticaly. 

Best regards
Ole Oscar
0
Konstantin Petkov
Telerik team
answered on 27 Jun 2008, 11:53 AM
Hi Ole Oscar,

Thank you for the good words regarding the Q1 2008 version of RadControls for ASP.NET AJAX. We do our best to improve the controls constantly so I believe the upcoming Q2 2008 would be even better.

As to your questions, you can use the CommandItem to add buttons performing such batch updates. Please, review the demos below which demonstrates that in action. Note the CommandItem can be positioned both on the top and on the bottom of the Grid (through the CommandItemDisplay property) if necessary:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/WebGrid/DefaultCS.aspx
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/CommandItem/DefaultCS.aspx

All the best,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ole Oscar
Top achievements
Rank 1
answered on 27 Jun 2008, 12:27 PM
Thats the one I need.
Thank you!

Ole Oscar
Tags
Grid
Asked by
Ole Oscar
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Ole Oscar
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Konstantin Petkov
Telerik team
Share this question
or