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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to maintain view state of all syncfusion controls

Thread ID:





119807 Aug 4,2015 07:22 AM UTC May 26,2016 08:36 AM UTC ASP.NET Web Forms 5
Tags: Grid
Asked On August 4, 2015 07:22 AM UTC


When i do post back of any event of any control previous values of all controls get vanished..
can you please tell me how to maintain view state or selected values in control.in asp.net c# application.


Gowthami V [Syncfusion]
Replied On August 5, 2015 12:21 PM UTC

Hi Abhijeet,

Thanks for using Syncfusion products.

Before proceeding we need the below details of the controls that you have used in your application.

1.       You have mentioned in the query as “any controls”, whether you have mentioned Syncfusion controls alone or any other controls.

2.       If you are using Syncfusion controls then share us the details of the controls in which the values get vanished after every post back.

For now we have checked the Grid control (with main features like Grouping, Sorting, Paging and Selection) and Tools controls with server side post back. Its working fine for us.

Please let us know if you have any queries.

Gowthami V.

Gabriel Obando
Replied On May 23, 2016 08:32 PM UTC

Hello, when i do a postback on selecting a row in the grid control, I lose the data on the grid.

Do I have to bind the data to the control on every page_load?
Doesn't the grid control keep the data if its a postback?

normally what i would do on the page_load event, i put the following


So the first time the page loads the grid loads the data fine, but when i select a row on the server side, on the postback the grid is empty, but i can grab the info from selected row on the selected row event.

How do I set up the controls to maintain their data and state?

Venkatesh Ayothi Raman [Syncfusion]
Replied On May 24, 2016 10:51 AM UTC

Hi Gabriel, 

Thanks for the update. 

We have achieved your requirement by setting the DataSourceCachingMode property as View state in the ejGrid and created a sample for your convenience. Please refer to the code example and sample, 

Code example: 
<ej:Grid ID="Grid1"    AllowPaging="True" 
            EnableRowHover="true"     AllowCellMerging="false"  
             AllowReordering="false" Locale="en-US" AllowMultiSorting="false"  
              AllowSelection="True" Selectiontype="Single"  OnServerRowSelected="DefaultEvents_OnServerRowSelected"  
             . . . . . . .  

Venkatesh Ayothiraman. 

Gabriel Obando
Replied On May 25, 2016 04:49 PM UTC

thanks, this helped me.

Venkatesh Ayothi Raman [Syncfusion]
Replied On May 26, 2016 08:36 AM UTC

Hi Gabriel, 

Thanks for your feedback. 

We have happy to hear that your requirement is achieved. 

Venkatesh Ayothiraman. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon