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

AjaxUpdateControl error RadGrid

1 Answer 59 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Ricardo
Top achievements
Rank 1
Ricardo asked on 29 Aug 2011, 04:01 PM
Hello, i have a problem that only happens if i use the code bellow :
<div>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Black" />
    </div>--%>

The problem is i have a RadGrid with the exportToCSV button, when i click on this button without using the code above, everything works fine...But if I added the code above the export will be done directly on the RadGrid instead of on to a .csv file.....

Can you help?

RadGrid code:
<br />
<%--    <div>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Black" />
    </div>--%>
    <table>
        <tr>
            <td>
                <telerik:RadButton ID="ShowProcessed" runat="server" Text="Show Processed" Skin="Black"
                    Width="110px" Height="40px" OnClick="ShowProcessed_Click">
                </telerik:RadButton>
            </td>
            <td>
            </td>
            <td>
                <telerik:RadButton ID="ShowUnProcessed" runat="server" Text="Show Unprocessed" Skin="Black"
                    Width="120px" Height="40px" OnClick="ShowUnProcessed_Click">
                </telerik:RadButton>
            </td>
        </tr>
        <tr>
            <td>
            </td>
        </tr>
    </table>
    <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AllowPaging="True"
        AllowSorting="True" AutoGenerateColumns="False" Width="97%" enableajax="True"
        AllowFilteringByColumn="True" ShowFooter="True" Skin="Black" OnItemCommand="RadGrid1_ItemCommand"
        OnGridExporting="RadGrid1_GridExporting" AllowMultiRowSelection="True" OnNeedDataSource="RadGrid1_NeedDataSource">
        <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnablePostBackOnRowClick="true">
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
        <MasterTableView DataKeyNames="SequencialNumber" Width="100%" CommandItemSettings-ShowExportToCsvButton="True"
            CommandItemSettings-ShowAddNewRecordButton="false" CommandItemDisplay="Top">
            <Columns>
                <telerik:GridBoundColumn DataField="SequencialNumber" HeaderText="SequencialNumber"
                    UniqueName="SequencialNumber" SortExpression="SequencialNumber">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Priorities.Priority" HeaderText="Priority" UniqueName="Priority"
                    FilterControlAltText="Filter Priority column" SortExpression="Priorities.Priority"
                    DataType="System.Int32">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Staging.Process" HeaderText="Staging" UniqueName="Process"
                    SortExpression="Staging.Process" FilterControlAltText="Filter Process column">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="SupplierCode" HeaderText="SupplierCode" UniqueName="SupplierCode"
                    SortExpression="SupplierCode" FilterControlAltText="Filter SupplierCode column">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MessageStatus" HeaderText="MessageStatus" UniqueName="MessageStatus"
                    SortExpression="MessageStatus" FilterControlAltText="Filter MessageStatus column">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DocumentType" HeaderText="DocumentType" UniqueName="DocumentType"
                    FilterControlAltText="Filter DocumentType column" SortExpression="DocumentType">
                </telerik:GridBoundColumn>
                <telerik:GridDateTimeColumn UniqueName="InvoiceCreationDate" DataField="InvoiceCreationDate"
                    HeaderText="InvoiceCreationDate" FilterControlAltText="Filter InvoiceCreationDate column"
                    SortExpression="InvoiceCreationDate">
                    <FilterTemplate>
                        <telerik:RadDatePicker ID="RadDatePicker1" runat="server">
                        </telerik:RadDatePicker>
                    </FilterTemplate>
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn DataField="SupplierVatNumber" FilterControlAltText="Filter SupplierVatNumber column"
                    HeaderText="SupplierVatNumber" SortExpression="SupplierVatNumber" UniqueName="SupplierVatNumber">
                </telerik:GridBoundColumn>
            </Columns>
            <ExpandCollapseColumn Visible="False">
                <HeaderStyle Width="19px"></HeaderStyle>
            </ExpandCollapseColumn>
            <CommandItemSettings ShowAddNewRecordButton="False" ShowExportToCsvButton="True">
            </CommandItemSettings>
            <RowIndicatorColumn Visible="False">
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>
    </telerik:RadGrid>

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 30 Aug 2011, 05:49 AM
Hello Ricardo,

Check the following help documentation which explains about your scenario.
Export from Ajaxified Grid.

Thanks,
Shinu.
Tags
Ajax
Asked by
Ricardo
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or