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

AJAX with Grid

2 Answers 74 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 12 Sep 2009, 03:19 AM
Maybe you guys can help me understand why Ajax does not appear to be working on my page.  I created a page that has a RadGrid with a NestedViewTemplate using the Grid / Hierarchy with Templates demo.  My grid and hierachry (3 sub grids on a tab with multipage) works perfectly the way I want it to.  I decided to try and ajax enable this page (which only contains the grid and its sub grids) and when I expand the main grid's items the page still appears to perform a full post back as the main grid dissappears, the spinny loading panel appears for a short period, then the main grid reappears.  I am not sure if this is happening because the grid is the only item on the page.  Below is my code for the page:

    <telerik:RadAjaxManager ID="RadAjaxManaer1" runat="server"  
        DefaultLoadingPanelID="RadAjaxLoadingPanel1"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="gridActivities"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="gridActivities" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> 
    <div>     
        <telerik:RadGrid ID="gridActivities" runat="server" DataSourceID="sqlActivities"  
            GridLines="None" Skin="WebBlue" AllowAutomaticInserts="True"  
            ShowFooter="True" ShowStatusBar="True" AutoGenerateColumns="False"  
            AllowAutomaticUpdates="True"
            <MasterTableView datakeynames="Act_ID"  
                datasourceid="sqlActivities" allowpaging="True"  
                CommandItemDisplay="TopAndBottom" AllowFilteringByColumn="True"
            <NestedViewTemplate> 
                <asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap" Visible="true"
                    <telerik:RadTabStrip runat="server" ID="NestedTab" MultiPageID="rmpActData"  
                        SelectedIndex="0" Skin="WebBlue"
                        <Tabs> 
                            <telerik:RadTab runat="server" Text="Files" PageViewID="rpageFiles"
                            </telerik:RadTab> 
                            <telerik:RadTab runat="server" Text="Comps" PageViewID="rpageComps"
                            </telerik:RadTab> 
                            <telerik:RadTab runat="server" Text="Invoices" PageViewID="rpageInvoices"
                            </telerik:RadTab> 
                        </Tabs> 
                    </telerik:RadTabStrip>                 
                    <telerik:RadMultiPage ID="rmpActData" runat="server" Width="100%"  
                        BorderStyle="Double" SelectedIndex="2"
                        <telerik:RadPageView ID="rpageComps" runat="server"
                            <asp:Label runat="server" ID="Label1" Text='<%# Eval("ACT_ID") %>' Visible="false"></asp:Label> 
                            <telerik:RadGrid ID="gridComps" runat="server" DataSourceID="sqlComps"  
                                GridLines="None" Skin="WebBlue" AllowAutomaticInserts="True"  
                                AllowAutomaticDeletes="True" AllowAutomaticUpdates="True"
                                <MasterTableView autogeneratecolumns="False" CommandItemDisplay="Top"  
                                    datasourceid="sqlComps" DataKeyNames="COMP_ID"
                                    <Columns> 
                                        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
                                            <ItemStyle CssClass="MyImageButton" /> 
                                        </telerik:GridEditCommandColumn> 
                                        <telerik:GridBoundColumn DataField="COMP_ID" DataType="System.Decimal"  
                                            HeaderText="COMP_ID" ReadOnly="True" SortExpression="COMP_ID"  
                                            UniqueName="COMP_ID"
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="ACT_ID" DataType="System.Decimal"  
                                            HeaderText="ACT_ID" SortExpression="ACT_ID" UniqueName="ACT_ID"
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="Name" HeaderText="Name"  
                                            SortExpression="Name" UniqueName="Name"
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="Job_Percentage" DataType="System.Byte"  
                                            HeaderText="Job_Percentage" SortExpression="Job_Percentage"  
                                            UniqueName="Job_Percentage"
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="Assigned" DataType="System.DateTime"  
                                            HeaderText="Assigned" SortExpression="Assigned" UniqueName="Assigned"
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridCheckBoxColumn DataField="Paid" DataType="System.Boolean"  
                                            HeaderText="Paid" SortExpression="Paid" UniqueName="Paid"
                                        </telerik:GridCheckBoxColumn> 
                                        <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"  
                                            ConfirmDialogType="RadWindow" ConfirmText="Delete this product?"  
                                            ConfirmTitle="Delete" Text="Delete" UniqueName="DeleteColumn1"
                                            <ItemStyle CssClass="MyImageButton" HorizontalAlign="Center" /> 
                                        </telerik:GridButtonColumn> 
                                        <telerik:GridBoundColumn DataField="INST_ID" UniqueName="INST_ID"  
                                            Visible="False"
                                        </telerik:GridBoundColumn> 
                                    </Columns> 
                                    <EditFormSettings EditFormType="Template"
                                        <EditColumn UniqueName="EditCommandColumn1"
                                        </EditColumn> 
                                        <FormTemplate> 
                                            <table cellpadding="0" cellspacing="0"
                                                <tr> 
                                                    <td style="text-align: right"
                                                        Installer:</td> 
                                                    <td> 
                                                        <telerik:RadComboBox ID="rcbInstaller" Runat="server" SelectedValue='<%# Bind( "INST_ID") %>'  
                                                            DataSourceID="sqlInstaller" DataTextField="Name" DataValueField="INST_ID"
                                                        </telerik:RadComboBox> 
                                                    </td> 
                                                </tr> 
                                                <tr> 
                                                    <td style="text-align: right"
                                                        Comp Percentage:</td> 
                                                    <td> 
                                                        <telerik:RadNumericTextBox ID="rntCompPerc" Runat="server" DbValue='<%# Bind( "Job_Percentage") %>' 
                                                            Culture="English (United States)" Type="Percent" Width="125px"
                                                        </telerik:RadNumericTextBox> 
                                                    </td> 
                                                </tr> 
                                                <tr> 
                                                    <td style="text-align: right"
                                                        Date Assigned:</td> 
                                                    <td> 
                                                        <telerik:RadDatePicker ID="rdpAssigned" Runat="server" DbSelectedDate='<%# Bind( "Assigned") %>'
                                                        </telerik:RadDatePicker> 
                                                    </td> 
                                                </tr> 
                                                <tr> 
                                                    <td style="text-align: right"
                                                        Comp Paid:</td> 
                                                    <td> 
                                                        <telerik:RadNumericTextBox ID="rntPaid" Runat="server" DbValue='<%# Bind( "Paid") %>' 
                                                            Culture="English (United States)" Type="Currency" Width="125px"
                                                        </telerik:RadNumericTextBox> 
                                                    </td> 
                                                </tr> 
                                                <tr> 
                                                    <td align="right" colspan="2"
                                                        <asp:Button ID="btnUpdate" runat="server"  
                                                            CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>'  
                                                            Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>' /> 
                                                        <asp:Button ID="btnCancel" runat="server" CausesValidation="False"  
                                                            CommandName="Cancel" Text="Cancel" /> 
                                                    </td> 
                                                </tr> 
                                            </table> 
                                        </FormTemplate> 
                                    </EditFormSettings> 
                                </MasterTableView> 
                            </telerik:RadGrid> 
                            <asp:SqlDataSource ID="sqlComps" runat="server"  
                                ConnectionString="<%$ ConnectionStrings:COI-CQ-CompConnectionString %>"  
                                DeleteCommand="DELETE FROM tbl_Comps WHERE COMP_ID = @original_COMP_ID"  
                                InsertCommand="INSERT INTO tbl_Comps(ACT_ID, INST_ID, Job_Percentage, Assigned, Paid) VALUES (@ACT_ID, @INST_ID, @Job_Percentage, @Assigned, @Paid)"  
                                OldValuesParameterFormatString="original_{0}"  
                                SelectCommand="SELECT tbl_Comps.COMP_ID, tbl_Comps.ACT_ID, tbl_Installers.Name, tbl_Comps.Job_Percentage, tbl_Comps.Assigned, tbl_Comps.Paid, tbl_Comps.INST_ID FROM tbl_Comps INNER JOIN tbl_Installers ON tbl_Comps.INST_ID = tbl_Installers.INST_ID WHERE (tbl_Comps.ACT_ID = @ACT_ID)"  
                                UpdateCommand="UPDATE tbl_Comps SET INST_ID = @INST_ID, Job_Percentage = @Job_Percentage, Assigned = @Assigned, Paid = @Paid WHERE COMP_ID = @original_COMP_ID"
                                <SelectParameters> 
                                    <asp:ControlParameter ControlID="Label1" PropertyName="Text" Name="ACT_ID" /> 
                                </SelectParameters> 
                                <DeleteParameters> 
                                    <asp:Parameter Name="original_COMP_ID" /> 
                                </DeleteParameters> 
                                <UpdateParameters> 
                                    <asp:Parameter Name="INST_ID" /> 
                                    <asp:Parameter Name="Job_Percentage" /> 
                                    <asp:Parameter Name="Assigned" /> 
                                    <asp:Parameter Name="Paid" /> 
                                    <asp:Parameter Name="original_COMP_ID" /> 
                                </UpdateParameters> 
                                <InsertParameters> 
                                    <asp:ControlParameter ControlID="Label1" PropertyName="Text" Name="ACT_ID" /> 
                                    <asp:Parameter Name="INST_ID" /> 
                                    <asp:Parameter Name="Job_Percentage" /> 
                                    <asp:Parameter Name="Assigned" /> 
                                    <asp:Parameter Name="Paid" /> 
                                </InsertParameters> 
                            </asp:SqlDataSource> 
                            <asp:SqlDataSource ID="sqlInstaller" runat="server"  
                                ConnectionString="<%$ ConnectionStrings:COI-CQ-CompConnectionString %>"  
                                SelectCommand="SELECT [INST_ID], [Name] FROM [tbl_Installers] ORDER BY [Name]"
                            </asp:SqlDataSource> 
 
                        </telerik:RadPageView> 
                        <telerik:RadPageView ID="rpageInvoices" runat="server"
                            <telerik:RadGrid ID="RadGrid3" runat="server"  
                                DataSourceID="sqlInvoices" GridLines="None" Skin="WebBlue"
                                <MasterTableView autogeneratecolumns="False"  
                                    datakeynames="INV_ID" datasourceid="sqlInvoices"
                                    <RowIndicatorColumn> 
                                        <HeaderStyle Width="20px" /> 
                                    </RowIndicatorColumn> 
                                    <ExpandCollapseColumn> 
                                        <HeaderStyle Width="20px" /> 
                                    </ExpandCollapseColumn> 
                                    <Columns> 
                                        <telerik:GridBoundColumn DataField="INV_ID" DataType="System.Decimal"  
                                            HeaderText="INV_ID" ReadOnly="True" SortExpression="INV_ID" UniqueName="INV_ID"
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="ACT_ID" DataType="System.Decimal"  
                                            HeaderText="ACT_ID" SortExpression="ACT_ID" UniqueName="ACT_ID"
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="Invoice_Type" HeaderText="Invoice_Type"  
                                            SortExpression="Invoice_Type" UniqueName="Invoice_Type"
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="Invoice_Number" HeaderText="Invoice_Number"  
                                            SortExpression="Invoice_Number" UniqueName="Invoice_Number"
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="Invoice_Date" DataType="System.DateTime"  
                                            HeaderText="Invoice_Date" SortExpression="Invoice_Date"  
                                            UniqueName="Invoice_Date"
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="Invoice_Amount" DataType="System.Decimal"  
                                            HeaderText="Invoice_Amount" SortExpression="Invoice_Amount"  
                                            UniqueName="Invoice_Amount"
                                        </telerik:GridBoundColumn> 
                                    </Columns> 
                                </MasterTableView> 
                            </telerik:RadGrid> 
                            <asp:SqlDataSource ID="sqlInvoices" runat="server"  
                                ConnectionString="<%$ ConnectionStrings:COI-CQ-CompConnectionString %>"  
                                SelectCommand="SELECT * FROM [tbl_Invoices] WHERE ([ACT_ID] = @ACT_ID)"
                                <SelectParameters> 
                                    <asp:ControlParameter ControlID="gridActivities" Name="ACT_ID"  
                                        PropertyName="SelectedValue" Type="Decimal" /> 
                                </SelectParameters> 
                            </asp:SqlDataSource> 
                        </telerik:RadPageView> 
                        <telerik:RadPageView ID="rpageFiles" runat="server"
                            <telerik:RadGrid ID="gridFiles" runat="server" AllowAutomaticInserts="True"  
                                DataSourceID="sqlFiles" GridLines="None" Skin="WebBlue" OnInsertCommand="gridFiles_InsertCommand"
                                <MasterTableView autogeneratecolumns="False" CommandItemDisplay="Top"  
                                    datakeynames="File_ID" datasourceid="sqlFiles"
                                    <RowIndicatorColumn> 
                                        <HeaderStyle Width="20px" /> 
                                    </RowIndicatorColumn> 
                                    <ExpandCollapseColumn> 
                                        <HeaderStyle Width="20px" /> 
                                    </ExpandCollapseColumn> 
                                    <Columns> 
                                        <telerik:GridTemplateColumn DataField="File_ID" DataType="System.Decimal"  
                                            HeaderText="File_ID" SortExpression="File_ID" UniqueName="File_ID"
                                            <ItemTemplate> 
                                                <asp:Label ID="File_IDLabel" runat="server" Text='<%# Eval("File_ID") %>'></asp:Label> 
                                            </ItemTemplate> 
                                        </telerik:GridTemplateColumn> 
                                        <telerik:GridTemplateColumn DataField="ACT_ID" DataType="System.Decimal"  
                                            HeaderText="ACT_ID" SortExpression="ACT_ID" UniqueName="ACT_ID"
                                            <ItemTemplate> 
                                                <asp:Label ID="ACT_IDLabel" runat="server" Text='<%# Eval("ACT_ID") %>'></asp:Label> 
                                            </ItemTemplate> 
                                        </telerik:GridTemplateColumn> 
                                        <telerik:GridTemplateColumn DataField="File_Name" HeaderText="File_Name"  
                                            SortExpression="File_Name" UniqueName="File_Name"
                                            <ItemTemplate> 
                                                <asp:Label ID="File_NameLabel" runat="server" Text='<%# Eval("File_Name") %>'></asp:Label> 
                                            </ItemTemplate> 
                                        </telerik:GridTemplateColumn> 
                                        <telerik:GridTemplateColumn DataField="File_Desc" HeaderText="File_Desc"  
                                            SortExpression="File_Desc" UniqueName="File_Desc"
                                            <EditItemTemplate> 
                                                <asp:TextBox ID="File_DescTextBox" runat="server"  
                                                    Text='<%# Bind("File_Desc") %>'></asp:TextBox> 
                                            </EditItemTemplate>      
                                            <ItemTemplate> 
                                                <asp:Label ID="File_DescLabel" runat="server" Text='<%# Eval("File_Desc") %>'></asp:Label> 
                                            </ItemTemplate> 
                                        </telerik:GridTemplateColumn>                                                   
                                        <telerik:GridTemplateColumn DataField="File_Data" HeaderText="File_Data"  
                                            UniqueName="File_Data"
                                            <EditItemTemplate> 
                                            <telerik:RadUpload ID="RadUpload1" runat="server" InitialFileInputsCount="1" MaxFileInputsCount="1" 
                                                ControlObjectsVisibility="None" MaxFileSize="1000000" AllowedFileExtensions=".pdf,.doc,.xls,.docx,.xlsx,.jpg,.gif,.jpeg" /> 
                                            <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="Please select at least one valid file as .pdf,.doc,.xls,.docx,.xlsx,.jpg,.gif,.jpeg" 
                                            ClientValidationFunction="validateRadUpload"
                                            </asp:CustomValidator> 
                                            </EditItemTemplate> 
                                            <ItemTemplate> 
                                                <asp:Label ID="Label1" runat="server"></asp:Label> 
                                            </ItemTemplate> 
                                        </telerik:GridTemplateColumn> 
                                    </Columns> 
                                </MasterTableView> 
                            </telerik:RadGrid> 
                            <asp:SqlDataSource ID="sqlFiles" runat="server"  
                                ConnectionString="<%$ ConnectionStrings:COI-CQ-CompConnectionString %>"  
                                InsertCommand="INSERT INTO tbl_Files(ACT_ID, File_Name, File_Desc, File_Size, File_Data) VALUES (@ACT_ID, @File_Name, @File_Desc, @File_Size, @File_Data)"  
                                SelectCommand="SELECT * FROM [tbl_Files] WHERE ([ACT_ID] = @ACT_ID)"
                                <SelectParameters> 
                                    <asp:ControlParameter ControlID="Label1" PropertyName="Text" Name="ACT_ID" /> 
                                </SelectParameters> 
                                <InsertParameters> 
                                    <asp:ControlParameter ControlID="Label1" PropertyName="Text" Name="ACT_ID" /> 
                                    <asp:Parameter Name="File_Desc" /> 
                                    <asp:SessionParameter Name="File_Name" SessionField="fName" /> 
                                    <asp:SessionParameter Name="File_Size" SessionField="fSize" /> 
                                    <asp:SessionParameter Name="File_Data" SessionField="DataVB" /> 
                                </InsertParameters> 
                            </asp:SqlDataSource> 
                        </telerik:RadPageView> 
                    </telerik:RadMultiPage> 
                </asp:Panel> 
            </NestedViewTemplate>     
    <CommandItemSettings AddNewRecordText="Add New Activity" /> 
 
<ExpandCollapseColumn Visible="True"></ExpandCollapseColumn> 
    <Columns> 
        <telerik:GridEditCommandColumn ButtonType="ImageButton"
        </telerik:GridEditCommandColumn> 
        <telerik:GridBoundColumn DataField="Act_ID" DataType="System.Decimal"  
            HeaderText="ID" ReadOnly="True" SortExpression="Act_ID"  
            UniqueName="Act_ID"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Area" HeaderText="Area" 
            SortExpression="Area" UniqueName="Area" ReadOnly="True"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="WA_Number" HeaderText="WA Number"  
            SortExpression="WA_Number" UniqueName="WA_Number" ReadOnly="True"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Description" HeaderText="Description"  
            SortExpression="Description" UniqueName="Description"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Date_Awarded" DataType="System.DateTime"  
            HeaderText="Date Awarded" SortExpression="Date_Awarded" DataFormatString="{0:d}" 
            UniqueName="Date_Awarded"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Required_Complete_Date" DataFormatString="{0:d}" 
            DataType="System.DateTime" HeaderText="Required Complete Date" 
            SortExpression="Required_Complete_Date"  
            UniqueName="Required_Complete_Date"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Project_Approved_Amt" DataFormatString="{0:C}" 
            DataType="System.Decimal" HeaderText="Project Approved Amt" 
            SortExpression="Project_Approved_Amt" UniqueName="Project_Approved_Amt"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Comps_Assigned" DataFormatString="{0:C}" 
            DataType="System.Decimal" HeaderText="Comps Assigned" 
            SortExpression="Comps_Assigned" UniqueName="Comps_Assigned"
        </telerik:GridBoundColumn>               
        <telerik:GridCalculatedColumn DataFields="Project_Approved_Amt,Comps_Assigned"  
            Expression="({0}-{1})/{0}" UniqueName="Variance" HeaderText="Variance" 
            DataFormatString="{0:p}" SortExpression="Variance"
        </telerik:GridCalculatedColumn> 
        <telerik:GridBoundColumn DataField="Area_ID" DataType="System.Decimal"  
            HeaderText="Area_ID" SortExpression="Area_ID" UniqueName="Area_ID"  
            Visible="False"
        </telerik:GridBoundColumn> 
    </Columns> 
<EditFormSettings EditFormType="Template"
<EditColumn UniqueName="EditCommandColumn1"></EditColumn> 
    <FormTemplate>         
        <table cellpadding="0" cellspacing="0"
            <tr> 
                <td style="text-align: right"
                    Area:</td> 
                <td> 
                    <telerik:RadComboBox ID="RadComboBox1" Runat="server"  
                        DataSourceID="SqlDataSource1" DataTextField="Area" DataValueField="Area_ID"  
                        EmptyMessage="Select Area" Skin="WebBlue" SelectedValue='<%# Bind( "Area_ID") %>'
                    </telerik:RadComboBox>                 
                </td> 
            </tr> 
            <tr> 
                <td style="text-align: right"
                    WA Number:</td> 
                <td> 
                    <telerik:RadTextBox ID="rtbWANumber" Runat="server" Text='<%# Bind( "WA_Number") %>'
                    </telerik:RadTextBox> 
                </td> 
            </tr> 
            <tr> 
                <td style="text-align: right"
                    Description:</td> 
                <td> 
                    <telerik:RadTextBox ID="rtbDesc" Runat="server" Text='<%# Bind( "Description") %>'
                    </telerik:RadTextBox> 
                </td> 
            </tr> 
            <tr> 
                <td style="text-align: right"
                    Date Awarded:</td> 
                <td> 
                    <telerik:RadDatePicker ID="rdpDateAwarded" Runat="server" DbSelectedDate='<%# Bind( "Date_Awarded") %>'
                    </telerik:RadDatePicker> 
                </td> 
            </tr> 
            <tr> 
                <td style="text-align: right"
                    Required Complete Date:</td> 
                <td> 
                    <telerik:RadDatePicker ID="rdpRequiredCompleteDate" Runat="server" DbSelectedDate='<%# Bind( "Required_Complete_Date") %>'
                    </telerik:RadDatePicker> 
                </td> 
            </tr> 
            <tr> 
                <td style="text-align: right"
                    Project Approved Amount:</td> 
                <td> 
                    <telerik:RadNumericTextBox ID="rntProjectApprovedAmt" Runat="server" DbValue='<%# Bind( "Project_Approved_Amt") %>'
                    </telerik:RadNumericTextBox> 
                </td> 
            </tr> 
            <tr> 
                <td align="right" colspan="2"
                    <asp:Button ID="btnUpdate" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>' 
                        runat="server" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>'
                        </asp:Button> 
                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" 
                        CommandName="Cancel"></asp:Button> 
                </td> 
            </tr> 
        </table>         
    </FormTemplate> 
</EditFormSettings> 
</MasterTableView> 
            <ClientSettings EnablePostBackOnRowClick="True"
                <Selecting AllowRowSelect="True" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
    </div> 
    <asp:SqlDataSource ID="sqlActivities" runat="server"  
        ConnectionString="<%$ ConnectionStrings:COI-CQ-CompConnectionString %>"  
        SelectCommand="SELECT Act_ID, Area, WA_Number, Description, Date_Awarded, Required_Complete_Date, Project_Approved_Amt, Comps_Assigned, Area_ID FROM vw_Actities_with_Comp_Var ORDER BY Date_Awarded, WA_Number" 
        InsertCommand="INSERT INTO tbl_Activities(Area_ID, WA_Number,  Description, Date_Awarded, Required_Complete_Date, Project_Approved_Amt, Remarks) VALUES (@Area_ID, @WA_Number, @Description, @Date_Awarded, @Required_Complete_Date, @Project_Approved_Amt, @Remarks)"  
         
        UpdateCommand="UPDATE tbl_Activities SET Area_ID = @Area_ID, WA_Number = @WA_Number, Description = @Description, Date_Awarded = @Date_Awarded, Required_Complete_Date = @Required_Complete_Date, Project_Approved_Amt = @Project_Approved_Amt, Remarks = @Remarks WHERE (Act_ID = @original_Act_ID)"  
        OldValuesParameterFormatString="original_{0}"
        <UpdateParameters> 
            <asp:Parameter Name="Area_ID" /> 
            <asp:Parameter Name="WA_Number" /> 
            <asp:Parameter Name="Description" /> 
            <asp:Parameter Name="Date_Awarded" /> 
            <asp:Parameter Name="Required_Complete_Date" /> 
            <asp:Parameter Name="Project_Approved_Amt" /> 
            <asp:Parameter Name="Remarks" /> 
            <asp:Parameter Name="original_Act_ID" /> 
        </UpdateParameters> 
        <InsertParameters> 
            <asp:Parameter Name="Area_ID" /> 
            <asp:Parameter Name="WA_Number" /> 
            <asp:Parameter Name="Description" /> 
            <asp:Parameter Name="Date_Awarded" /> 
            <asp:Parameter Name="Required_Complete_Date" /> 
            <asp:Parameter Name="Project_Approved_Amt" /> 
            <asp:Parameter Name="Remarks" /> 
        </InsertParameters> 
    </asp:SqlDataSource> 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"  
        ConnectionString="<%$ ConnectionStrings:COI-CQ-CompConnectionString %>"  
        SelectCommand="SELECT [Area_ID], [Area] FROM [tbl_Areas] ORDER BY [Area]"
    </asp:SqlDataSource> 
    <telerik:RadFormDecorator ID="RadFormDecorator1" Runat="server"  
        Skin="WebBlue" /> 

2 Answers, 1 is accepted

Sort by
0
Accepted
Martin
Telerik team
answered on 15 Sep 2009, 08:51 PM
Hello Sam,

Based on the provided code I think the AJAX functionality works as expected in your project. I would suggest you to set the Skin="WebBlue" of the RadAjaxLoadingPanel (matching the main grid skin). Now it will get its transparency from the skin and when a regular postback action inside the AJAX-ified grid is taken you should be able to notice more clearly if AJAX callback is performed instead.

I hope this helps.

Regards,
Martin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Dave
Top achievements
Rank 1
answered on 19 Sep 2009, 12:51 AM
Thanks Martin, that was exactly the problem.
Tags
Ajax
Asked by
Dave
Top achievements
Rank 1
Answers by
Martin
Telerik team
Dave
Top achievements
Rank 1
Share this question
or