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

RadGrid Popup postback

3 Answers 83 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Wicus
Top achievements
Rank 1
Wicus asked on 09 Sep 2008, 07:32 AM
Hi...im am using a radgrid for data populating and a radwindow for a edit form when u click on a specific row...that works fine...i am having trouble getting the save event to refresh my radgrid...i have followed the example..RadGrid Window Editing and to no success...plz can i get assistance.

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 09 Sep 2008, 07:43 AM
Hello Wicus,
   I would suggest you to send your aspx code, so that I could find out clearly whats happening at your end.

Princy.

0
Wicus
Top achievements
Rank 1
answered on 09 Sep 2008, 07:47 AM

HTML:

<body style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px; width: 100%; height: 100%;">  
    <form id="form1" runat="server">    <div> 
        <asp:ScriptManager ID="ScriptManager1" runat="server">  
        </asp:ScriptManager> 
 
       <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
            <script type="text/javascript">  
            function ShowEditForm(id, rowIndex)  
            {  
                var grid = $find("<%= grdSiteScheduledDates.ClientID %>");  
                  
                var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();   
                grid.get_masterTableView().selectItem(rowControl, true);  
                          
                window.radopen("frmEditForm.aspx?SiteID=" + id, "UserListDialog");  
                return false;   
            }  
            function ShowInsertForm()  
            {  
               window.radopen("EditFormCS.aspx", "UserListDialog");  
               return false;  
            }  
            function refreshGrid(arg)  
            {  
             if(!arg)  
             {  
             $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");               
                }  
                else  
                {  
             $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");               
                }  
            }  
            </script> 
        </telerik:RadCodeBlock>   
 
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">  
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="grdSiteScheduledDates" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting>   
                    <telerik:AjaxSetting AjaxControlID="grdSiteScheduledDates">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="grdSiteScheduledDates" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting>   
                </AjaxSettings> 
            </telerik:RadAjaxManager> 
 
 
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">  
        </asp:UpdatePanel> 
        <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">  
            <tr> 
                <td> 
                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; border-right: #000000 1px solid; border-top: #000000 1px solid; border-left: #000000 1px solid; border-bottom: #000000 1px solid;">  
                        <tr> 
                            <td style="width: 1%">  
                                <asp:Image ID="Image2" runat="server" Height="82px" ImageUrl="~/Images/AuditNowImage.png" /></td>  
                            <td class="Header" colspan="3" style="font-size: x-small">  
                                <asp:Label ID="Label1" runat="server" ForeColor="White" Text="Step 3 - Select the frequency of Audit for each site"></asp:Label><asp:Label ID="lblTempID" runat="server" Visible="False"></asp:Label></td>  
                        </tr> 
                        <tr> 
                            <td colspan="4">  
                                <telerik:RadToolBar ID="tbFunction" runat="server"   
                                    Skin="WebBlue" Width="100%">  
                                    <Items> 
                                        <telerik:RadToolBarButton runat="server" Font-Names="Tahoma" Font-Size="10pt" Text="Cancel">  
                                        </telerik:RadToolBarButton> 
                                        <telerik:RadToolBarButton runat="server" Font-Names="Tahoma" Font-Size="10pt" Text="Next">  
                                        </telerik:RadToolBarButton> 
                                    </Items> 
                                    <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                </telerik:RadToolBar> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td colspan="2" style="border-top-width: 1px; padding-left: 10px; border-left-width: 1px;  
                                border-left-color: #000000; border-bottom-width: 1px; border-bottom-color: #000000;  
                                padding-bottom: 20px; vertical-align: middle; border-top-color: #000000; padding-top: 30px;  
                                border-right-width: 1px; border-right-color: #000000"> 
                                <asp:Label ID="lblSiteID" runat="server" Visible="False"></asp:Label><asp:Label ID="lblAuditor" runat="server" Font-Bold="True" Font-Names="Tahoma" Font-Size="8pt" 
                                    Text="Auditor:"></asp:Label></td>  
                            <td colspan="2" style="border-left-width: 1px; border-left-color: #000000; padding-bottom: 20px; vertical-align: middle; padding-top: 30px; border-right-width: 1px; border-right-color: #000000; border-top-width: 1px; border-bottom-width: 1px; border-bottom-color: #000000; border-top-color: #000000;">  
                                <telerik:RadComboBox ID="cboAuditor" runat="server" Skin="Mac">  
                                    <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                </telerik:RadComboBox> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td colspan="4" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px;  
                                padding-top: 5px; background-color: #acc0e9"> 
                               <telerik:RadGrid OnItemCreated="grdSiteScheduledDates_ItemCreated" ID="grdSiteScheduledDates" runat="server" AutoGenerateColumns="False" OnItemCommand="grdSiteScheduledDates_ItemCommand" 
                                    GridLines="None" Skin="Default2006" AllowPaging="True" PageSize="6">  
                                    <MasterTableView DataKeyNames="SiteID">  
                                        <Columns> 
                                            <telerik:GridTemplateColumn HeaderText="Site" UniqueName="Site">  
                                                <ItemTemplate> 
                                                    <asp:Label ID="lblSiteName" runat="server" Visible="False"  Text='<%# Eval("SiteID") %>'></asp:Label> 
                                                    <asp:Label ID="lblSiteID" runat="server"  Text='<%# Eval("SiteName") %>'></asp:Label> 
                                                </ItemTemplate> 
                                            </telerik:GridTemplateColumn> 
                                            <telerik:GridTemplateColumn HeaderText="Location" UniqueName="Location">  
                                                <ItemTemplate> 
                                                    <asp:Label ID="lblLocation" runat="server"  Text='<%# Eval("Location") %>'></asp:Label> 
                                                    <asp:Label ID="lblLocationID" runat="server" Visible="false" Text='<%# Eval("LocationId") %>'></asp:Label> 
                                                </ItemTemplate> 
                                            </telerik:GridTemplateColumn> 
                                            <telerik:GridTemplateColumn HeaderText="Scheduled Date" UniqueName="Date" > 
                                                <ItemTemplate> 
                                                    <asp:Label ID="lblScheduledDate" runat="server"  Text='<%# Eval("ScheduledDate") %>'></asp:Label> 
                                                </ItemTemplate> 
                                            </telerik:GridTemplateColumn> 
                                            <telerik:GridTemplateColumn HeaderText="Sechdule Audit Date" UniqueName="Schedule Audit Date">  
                                                <HeaderStyle HorizontalAlign="Center" Width="120px" /> 
                                                <ItemStyle VerticalAlign="Middle" Width="120px" /> 
                                                <FooterStyle Width="120px" /> 
                                                <ItemTemplate> 
                                                    <table cellpadding="0" cellspacing="0" style="width: 100%">  
                                                        <tr> 
                                                            <td style="text-align: center">  
                                                                <asp:HyperLink ID="hypEdit" runat="server" ImageUrl="~/Images/Clock.png">HyperLink</asp:HyperLink></td>  
                                                        </tr> 
                                                    </table> 
                                                </ItemTemplate> 
                                            </telerik:GridTemplateColumn> 
                                        </Columns> 
                                        <ExpandCollapseColumn> 
                                            <HeaderStyle Width="20px" /> 
                                        </ExpandCollapseColumn> 
                                        <RowIndicatorColumn> 
                                            <HeaderStyle Width="20px" /> 
                                        </RowIndicatorColumn> 
                                    </MasterTableView> 
                                    <PagerStyle AlwaysVisible="True" /> 
                                </telerik:RadGrid> 
                                  
                <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Vista">  
                    <Windows> 
                        <telerik:RadWindow Skin="Vista" ID="UserListDialog" runat="server" Title="User List Dialog" Height="400px" 
                            Width="500px" Left="150px" ReloadOnShow="true" Modal="true" /> 
                    </Windows> 
                </telerik:RadWindowManager> 
 
</td> 
                        </tr> 
                    </table> 
                </td> 
            </tr> 
        </table> 
    </div> 
    </form> 
</body> 
0
Wicus
Top achievements
Rank 1
answered on 10 Sep 2008, 08:20 AM
Hi Princy,

Have you been able to find anything as of yet?
Tags
Grid
Asked by
Wicus
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Wicus
Top achievements
Rank 1
Share this question
or