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

Autopostback not generating js in EditForm

0 Answers 52 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Mark asked on 08 Mar 2017, 03:45 PM

I want the fields in a RadGrid EditForm to Autopostback. I am programmatically turning on Autopostback in Page_Load of the custom grid control. Here's the beginning of the grid ascx file:

<radG:RadGrid ID="G1" runat="server" EnableAJAX="True" EnableAJAXLoadingTemplate="True"
    GridLines="None" OnDeleteCommand="RadGrid2_DeleteCommand" OnInsertCommand="RadGrid2_InsertCommand"
    OnItemCommand="RadGrid2_ItemCommand" OnItemDataBound="RadGrid2_ItemDataBound"
    OnNeedDataSource="RadGrid2_NeedDataSource" OnUpdateCommand="RadGrid2_UpdateCommand"
    Skin="Web20" OnPreRender="G1_PreRender">
        &nbsp;<asp:Image ID="Image1" runat="server" ImageUrl="~/Images/loading7.gif" />
        <Selecting AllowRowSelect="True" />
    <MasterTableView AllowSorting="True" AutoGenerateColumns="False" CommandItemDisplay="Top"
        DataKeyNames="id" GridLines="Vertical">
        <EditFormSettings EditFormType="Template">

When the form is generated, the javascript for __doPostback is not added to the html. Is there some configuration thing that will cause Autopostback to fail to work? This is legacy code that I did not generate and I, frankly, don't understand it. But, on pages without a grid, I was able to add Autopostback in this way and it worked.

No answers yet. Maybe you can help?

Asked by
Top achievements
Rank 1
Share this question