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.
Unfortunately, activation email could not send to your email. Please try again.

Grid is loosing data on any postback on the page

Thread ID:

Created:

Updated:

Platform:

Replies:

131767 Jul 26,2017 08:38 AM Aug 1,2017 12:26 AM ASP.NET Web Forms 3
loading
Tags: Grid
Kadam, Suresh B. (WTIC 535) CWR
Asked On July 26, 2017 08:38 AM

Hi Team,

On the fresh page load, I am binding data to Grid and it is displaying perfectly. If I click any button, the Grid is loosing the data.
Can you please let me know how to maintain the data binded to Grid even after postback.

Also, please let me know the javascript files required for proper functioning of Grid control.

Thanks,
Suresh.

Mani Sankar Durai [Syncfusion]
Replied On July 27, 2017 08:17 AM

Hi Kadam, 

Thanks for contacting Syncfusion support. 

Query 1: Can you please let me know how to maintain the data binded to Grid even after postback. 
   We have analyzed your query and we are not able to reproduce the reported issue. We suspect that you haven’t bind the data for the grid on Page_Load method in code behind. So we suggest you to bind the data to the grid in the Page_Load. 
Refer the code example 
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">   
<asp:ScriptManager ID="ScriptManager1" runat="server" /> 
  <asp:Button ID="button" Text="Click" runat="server" ></asp:Button> 
    <ej:Grid ID="Grid" runat="server"  AllowPaging="True" > 
        <Columns> 
... 
                
            </Columns> 
        </ej:Grid>  
</asp:Content> 
 
List<Orders> order = new List<Orders>(); 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            BindDataSource(); 
        } 
 
        private void BindDataSource() 
        { 
            int code = 10000; 
            for (int i = 1; i < 10; i++) 
            { 
                        ... 
            } 
            this.Grid.DataSource = order; 
            this.Grid.DataBind(); 
        } 
 
We have also prepared a sample that can be downloaded from the below link. 
Refer the documentation link of about binding data to the grid 
 
Query 2: Also, please let me know the javascript files required for proper functioning of Grid control 
 
Refer the documentation link of about referring the required JS files 
 
 
To refer the individual files to render the grid control refer the documentation link. 
 
Please let us know if you need further assistance. 
 
Regards, 
Manisankar Durai. 
 
 



Kadam, Suresh B. (WTIC 535) CWR
Replied On July 31, 2017 08:56 AM

Hi Mani,

Thank you, issue has been resolved with your suggestion.

Regards,

Suresh.


Mani Sankar Durai [Syncfusion]
Replied On August 1, 2017 12:26 AM

Hi Suresh, 

We are happy to hear that your problem has been solved. 

Please let us know if you need further assistance. 

Regards, 
Manisankar Durai. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;