We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Grid Custom Command - save edit grid - refresh page

Hi

When save records or edit records ( one grid column is Custom Command) web page is  refreshing - it's possible with out refresh add or edit records in grid ?

  <ej:Grid ID="OrdersGrid" runat="server" ClientIDMode="Static" AllowPaging="True" OnServerEditRow="EditEvents_ServerEditRow"
                    OnServerAddRow="EditEvents_ServerAddRow" OnServerDeleteRow="EditEvents_ServerDeleteRow">
            <ClientSideEvents ActionComplete="complete" EndAdd="endAdd" EndDelete="endDelete" EndEdit="endEdit" />

              <ej:Column Field="OrderID" HeaderText="Order ID" IsPrimaryKey="true" TextAlign="Right" Width="90">
                    <ValidationRule>
                        <ej:KeyValue Key="required" Value="true" />
                        <ej:KeyValue Key="number" Value="true" />
                    </ValidationRule>
                </ej:Column>



        <ej:Column Field="OrderID"  IsUnbound="True" TextAlign="Center" Width="150">
                    <Command>
                        <ej:Commands Type="detail">
                            <ButtonOptions Text="Details" Width="100" Click="onClick"></ButtonOptions>
                        </ej:Commands>
                    </Command>
                </ej:Column>

 </ej:Grid>

   <ej:Dialog ID="commanddialog" ClientIDMode="Static" runat="server" Width="450" Title="Details of employee" ShowOnInit="false"
            EnableResize="False" Target="#OrdersGrid">
        </ej:Dialog>

Thanks
Pratheep




Attachment: Inline_Editing_94b91a72.rar

3 Replies

GV Gowthami V Syncfusion Team November 16, 2015 09:39 AM UTC

Hi Pratheep,

Thanks for contacting Syncfusion products.

We have modified your sample for without refreshing the page perform add and edit actions and the same can be downloaded from the following link,

http://www.syncfusion.com/downloads/support/directtrac/general/INLINE~1-900928450.ZIP

We can avoid the page refresh for every post back by using “AsyncPostBackTrigger” as follows,

<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True" ClientIDMode="static" OnServerEditRow="EditEvents_ServerEditRow" OnServerAddRow="EditEvents_ServerAddRow" OnServerDeleteRow="EditEvents_ServerDeleteRow">

            <ClientSideEvents ActionComplete="complete" EndAdd="endAdd" EndDelete="endDelete" EndEdit="endEdit" RecordDoubleClick="doubleClick" />
           . . . .
 . . . .

</ContentTemplate>

        <Triggers>

            <asp:AsyncPostBackTrigger ControlID="OrdersGrid" />

        </Triggers>
        </asp:UpdatePanel>


While using above code example partial postback will done instead full page refresh.

Regards,

Gowthami V.


PR Pratheep November 17, 2015 01:47 AM UTC

Hi

Working fine,Thanks

Pratheep


GV Gowthami V Syncfusion Team November 17, 2015 03:56 AM UTC

Hi Pratheep,
 
We are happy to hear that your issue has been resolved.
 
Get back to us if you need further assistance.
 
Regards,
 
Gowthami V.

Loader.
Live Chat Icon For mobile
Up arrow icon