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

[Solved] MultipleEditRow blocks all control envents of page

3 Answers 136 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dynamicsoft srl
Top achievements
Rank 1
Dynamicsoft srl asked on 04 Apr 2014, 10:30 AM
Hallo everyone,
I immediately explain my problem. In RadGrid I am using the tag CommandItemTemplate and  in this tag I put the following controls:

<asp:LinkButton ID="multipleUpdate" ClientIDMode="Static" runat="server" CommandName="MultipleUpdate" Text="Edit"></asp:LinkButton>
<asp:LinkButton ID="salvaUpdate" ClientIDMode="Static" runat="server" CommandName="MultipleSave"  Text="Save"></asp:LinkButton>

When I click on Edit the following code behind  is ran:
        protected void GridFasce_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "MultipleUpdate")
            {
                GridFasce.AllowMultiRowEdit = true;
                for (int i = 0; i < GridFasce.SelectedItems.Count; i++)
                {
                    GridFasce.SelectedItems[i].Edit = true;
                  
                }
                
                GridFasce.MasterTableView.Rebind(); 
            }
}
Now, all selected rows of the radgrid are editable, but all controls of the page are not available or thery are blocked. For example if I click on MultipleSave, it does not call the postback. It also happes for each controls show on page.
Please, can someone help me?


Regrads,
Achille


3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 04 Apr 2014, 12:02 PM
Hi,

I was not able to replicate such an issue at my end, please take a look at the below sample code snippet. Provide your full code snippet if this doesn't help.

ASPX:
<telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="true" OnItemCommand="RadGrid1_ItemCommand" . . .>
    <MasterTableView DataKeyNames="OrderID" CommandItemDisplay="Top">
        <CommandItemTemplate>
            <asp:LinkButton ID="multipleUpdate" ClientIDMode="Static" runat="server" CommandName="MultipleUpdate" Text="Edit"></asp:LinkButton>
            <asp:LinkButton ID="salvaUpdate" ClientIDMode="Static" runat="server" CommandName="MultipleSave" Text="Save"></asp:LinkButton>
        </CommandItemTemplate>
        <Columns>          
            <telerik:GridBoundColumn UniqueName="OrderID" DataField="OrderID" HeaderText="OrderID"/>         
            <telerik:GridBoundColumn DataField="ShipCity" HeaderText="ShipCity" UniqueName="ShipCity" />
        </Columns>
    </MasterTableView>
    <ClientSettings Selecting-AllowRowSelect="true">
    </ClientSettings>
</telerik:RadGrid>

C#:
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
  if (e.CommandName == "MultipleUpdate")
  {
      RadGrid1.AllowMultiRowEdit = true;
      for (int i = 0; i < RadGrid1.SelectedItems.Count; i++)
      {
          RadGrid1.SelectedItems[i].Edit = true;
      }
      RadGrid1.MasterTableView.Rebind();
  }
  if (e.CommandName == "MultipleSave")
  {
      RadGrid1.MasterTableView.ClearEditItems();
      RadGrid1.Rebind();
  }
}

Thanks,
Princy
0
Dynamicsoft srl
Top achievements
Rank 1
answered on 04 Apr 2014, 01:25 PM
Hi Princy,
I attached two files. The first one contains the RadGrid that I implemented and the second one containts the CommandItem function.
My task is to make the selected rows editable(the rows are selected by checkbox) and to save all modification at one time.
The problem appears when the RadGrid shows all the selected rows editable. I cannot save all modification because the Linkbutton (ID=salvaUpdate) does not make the postback. In addition, all controls present in the page do not work (for example, RadButton, RadGrid and ather types of controls.).
0
Princy
Top achievements
Rank 2
answered on 08 Apr 2014, 06:05 AM
Hi,

It is hard to try your code, if its send as image. Please use the Format Code Block in the formatting options to paste your code.

Thanks,
Princy
Tags
Grid
Asked by
Dynamicsoft srl
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Dynamicsoft srl
Top achievements
Rank 1
Share this question
or