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

Editable grid in page load

5 Answers 92 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Raul
Top achievements
Rank 1
Raul asked on 28 Dec 2008, 01:30 PM
Hi All,

I have rad grid and I have applied edit row on double click as in this example, what I want to do is to make grid editable for all rows without double click each row??
Is this possible to do? i.e. by call function Rowdblclick in window.onload ??

Please advise

Regards

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 Dec 2008, 05:10 AM
Hi Raul,

Try the following code snippet in the PreRender event of the Grid to set the entire Grid in edit mode.

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


Shinu
0
Raul
Top achievements
Rank 1
answered on 29 Dec 2008, 10:54 AM
Hi All,

I have tried code above but no changes occured!
Is there any required parts of code to run this event? i.e. RadGrid1_NeedDataSource?

Please advise
Regards
0
Raul
Top achievements
Rank 1
answered on 29 Dec 2008, 11:15 AM
Hi all,

When I have tried to put this code in any event except page_load it works perfect, put in page load no actions fired so any method to make this code fired in page_load action??

Regards
0
Daniel
Telerik team
answered on 29 Dec 2008, 11:15 AM
Hello Raul,

Please take a look at the following articles:
Put all items in edit mode without additional rebind
Default edit mode for grid items on initial

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Raul
Top achievements
Rank 1
answered on 29 Dec 2008, 11:55 AM
Thanx man it works perfect
Tags
Grid
Asked by
Raul
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Raul
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or