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

Grid Should not be accessible when Insert/Edit Pop Up is Open

3 Answers 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Husen
Top achievements
Rank 1
Husen asked on 14 Feb 2012, 02:17 PM
Hi Guys,

Need to know that if there is any facility where we can disable everything but the Edit form pop up, when it is Open?

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 Feb 2012, 06:04 AM
Hello Husen,

Try setting PopUpSettings-Modal="true" in EditFormSettings.
Aspx:
<EditFormSettings PopUpSettings-Modal="true"></EditFormSettings>

-Shinu.
0
Husen
Top achievements
Rank 1
answered on 15 Feb 2012, 06:12 AM
Hi Shinu .. Thanks for your reply..
But i have already tried that and its not working.. I do not know what am i doing wrong..
For Edit, i am not using any template.. I am using grid bound column directly..
here is my grid..
<telerik:RadGrid ID="ProductsGrid" runat="server" AllowPaging="True" AllowSorting="True"
       OnInsertCommand="ProductsGrid_OnInsertCommand" OnUpdateCommand="ProductsGrid_OnUpdateCommand" 
       DataSourceID="ProductsDataSource" OnDeleteCommand="ProductsGrid_OnDeleteCommand" AllowMultiRowEdit="false"
       OnPreRender="ProductsGrid_PreRender" AllowMultiRowSelection="false" AutoGenerateColumns="False"
       ShowHeader="false" OnRowDrop="ProductsGrid_RowDroped" GridLines="None">
       <ClientSettings EnableRowHoverStyle="true" AllowRowsDragDrop="true" AllowDragToGroup="true" >
           <Selecting AllowRowSelect="True" UseClientSelectColumnOnly="true"/>
           <Resizing AllowColumnResize="true" AllowResizeToFit="true" />
           <ClientEvents OnPopUpShowing="PopUpShowing" />
       </ClientSettings>
       <GroupPanel Enabled="true">
       </GroupPanel>
       <GroupingSettings CaseSensitive="false" ShowUnGroupButton="true" />
       <HeaderStyle Font-Bold="true" />
       <MasterTableView HeaderStyle-HorizontalAlign="Center" AllowAutomaticDeletes="true"
           AllowAutomaticUpdates="true" ShowGroupFooter="false" CommandItemDisplay="Top"
           GroupsDefaultExpanded="true" DataKeyNames="ProductMarketId">
           <CommandItemSettings ShowAddNewRecordButton="False" ShowRefreshButton="false" />
           <CommandItemStyle Font-Bold="true" Height="20px" />
           <CommandItemTemplate>
           </CommandItemTemplate>
           <NoRecordsTemplate>
               <div>
                   No Products in this Market</div>
           </NoRecordsTemplate>
           <Columns>
               <telerik:GridBoundColumn AllowFiltering="false" DataField="Product.Name" HeaderButtonType="None"
                   UniqueName="ProductName" HeaderText="Product">
                   <ItemStyle Font-Bold="true" Font-Size="Small" Font-Italic="true" CssClass="wordbreak">
                   </ItemStyle>
               </telerik:GridBoundColumn>
           </Columns>
           <DetailTables>
               <telerik:GridTableView Name="DiscussionGrid" DataKeyNames="DiscussionId" DataSourceID="DiscussionDataSource"
                   Width="100%" ShowHeader="false" runat="server" AutoGenerateColumns="false" AllowPaging="false"
                   AllowFilteringByColumn="false" AllowSorting="true" ShowHeadersWhenNoRecords="true"
                   CommandItemDisplay="Bottom" EditMode="PopUp" EditFormSettings-PopUpSettings-Modal="true" EditItemStyle-Width="500px" EditItemStyle-HorizontalAlign="Center"
                   FilterItemStyle-VerticalAlign="Middle">
                   <ParentTableRelation>
                       <telerik:GridRelationFields DetailKeyField="ProductMarketId" MasterKeyField="ProductMarketId" />
                   </ParentTableRelation>
                   <CommandItemSettings ShowAddNewRecordButton="true" ShowRefreshButton="false" AddNewRecordText="Create New Discussion" />
                   <NoRecordsTemplate>
                       <div>
                           No Discussion Topics are in Queue for this Product</div>
                   </NoRecordsTemplate>
                   <EditFormSettings PopUpSettings-Height="270px" PopUpSettings-Width="500px" EditColumn-ButtonType="PushButton"
                       EditColumn-Resizable="false" InsertCaption="" >
                       <PopUpSettings Modal="true" ></PopUpSettings>
                   </EditFormSettings>
                   <Columns>
                       <%--<telerik:GridBoundColumn DataField="Title" HeaderText="Title" AllowFiltering="false"
                           HeaderButtonType="None" UniqueName="Title">
                       </telerik:GridBoundColumn>--%>
                       <telerik:GridTemplateColumn DataField="Title" HeaderText="Title" AllowFiltering="false"
                           HeaderButtonType="None" UniqueName="Title">
                           <ItemTemplate>
                               <asp:Label ID="lblTitle" Text='<%# Bind("Title") %>' runat="server"></asp:Label>
                           </ItemTemplate>
                           <EditItemTemplate>
                               <asp:TextBox ID="txtTitle" Text='<%# Bind("Title") %>' runat="server" MaxLength="100"
                                   Width="350"></asp:TextBox>
                               <asp:RequiredFieldValidator ID="rfvTitle" ControlToValidate="txtTitle" ErrorMessage="*"
                                   ForeColor="Red" runat="server"></asp:RequiredFieldValidator>
                           </EditItemTemplate>
                       </telerik:GridTemplateColumn>
                       <telerik:GridTemplateColumn DataField="Description" HeaderText="Description" AllowFiltering="false"
                           HeaderButtonType="None" UniqueName="Description">
                           <ItemTemplate>
                               <asp:Label ID="lblDescription" Text='<%# Bind("Description") %>' runat="server"></asp:Label>
                           </ItemTemplate>
                           <EditItemTemplate>
                               <telerik:RadEditor ID="txtDescription" runat="server" Height="150px" Enabled="true"
                                   MaxTextLength="1000" Width="355px" EnableResize="false" ContentAreaMode="Div"
                                   EnableTextareaMode="false" CssClass="telerikRadEditor" html='<%# Bind("Description") %>'
                                   EditModes="Design">
                                   <Tools>
                                       <telerik:EditorToolGroup>
                                           <telerik:EditorTool Name="Bold" />
                                           <telerik:EditorTool Name="Italic" />
                                           <telerik:EditorTool Name="Underline" />
                                           <telerik:EditorTool Name="InsertLink" />
                                       </telerik:EditorToolGroup>
                                   </Tools>
                                   <Content> </Content>
                               </telerik:RadEditor>
                               <asp:RequiredFieldValidator ID="rfvDesc" ControlToValidate="txtDescription" ErrorMessage="*" CssClass="errmsg"
                                  runat="server"></asp:RequiredFieldValidator>
                           </EditItemTemplate>
                       </telerik:GridTemplateColumn>
                       <%--<telerik:GridBoundColumn DataField="Description" HeaderText="Description" AllowFiltering="false"
                           HeaderButtonType="None" UniqueName="Description">
                       </telerik:GridBoundColumn>--%>
                       <telerik:GridTemplateColumn HeaderText="Edit" HeaderStyle-HorizontalAlign="Center"
                           ItemStyle-HorizontalAlign="Center" AllowFiltering="false" UniqueName="EditTemplateColumn"
                           HeaderStyle-Width="50">
                           <ItemTemplate>
                               <asp:ImageButton CssClass="borderNone" ID="editLink" CommandName="Edit" CommandArgument='<%#Eval("DiscussionId")%>'
                                   runat="server" ImageAlign="Middle" ImageUrl="/Static/Images/editIcon.png" ToolTip="Edit Discussion in Queue" />
                           </ItemTemplate>
                       </telerik:GridTemplateColumn>
                       <telerik:GridTemplateColumn HeaderText="Delete" AllowFiltering="false" HeaderStyle-HorizontalAlign="Center"
                           ItemStyle-HorizontalAlign="Center" UniqueName="DeleteTemplateColumn" HeaderStyle-Width="50">
                           <ItemTemplate>
                               <asp:ImageButton CssClass="borderNone" ID="deleteLink" CommandName="Delete" CommandArgument='<%#Eval("DiscussionId")%>'
                                   OnClientClick="javascript:return confirm('Are you sure you want to delete?');"
                                   runat="server" ImageAlign="Middle" ImageUrl="/Static/Images/deleteIcon.png" ToolTip="Delete Discussion in Queue" />
                           </ItemTemplate>
                       </telerik:GridTemplateColumn>
                   </Columns>
               </telerik:GridTableView>
           </DetailTables>
           <HeaderStyle HorizontalAlign="Center" />
           <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="false" PagerTextFormat="{4} Page {0} of {1} | Total {5}"
               PageButtonCount="5" />
       </MasterTableView>
   </telerik:RadGrid>
0
Richard
Top achievements
Rank 1
answered on 15 Feb 2012, 03:15 PM
Husen:

You can also reference this RadGrid forum post that contains some demo code provided from Telerik Admin:

Rad Grid: Disable activity like insert, edit, update delete when a row is in edit mode

Hope this helps!
Tags
Grid
Asked by
Husen
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Husen
Top achievements
Rank 1
Richard
Top achievements
Rank 1
Share this question
or