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

RadGrid postback/viewstate

2 Answers 215 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Erik
Top achievements
Rank 1
Erik asked on 01 Feb 2010, 10:47 PM
I've been trying unsuccssfully to be able to click on a row within the radgrid to trigger a postback so that when a user hits the "browser back button" it would back up to the original state or in my case a panel that was hidden.  It seems that the postback is still ajaxified somehow and when hitting the back button it goes back to far as if the row selection postback never occured so the browser is not seeing it in it's history.
So I'm trying to hide and show panels depending on what the user clicks upon (all on the same page) and I can hide and show all these panels and hit the browser back button at any time and it will bring me to the previously hidden panel, but if I select a row with the radgrid with the settings "EnablePostBackOnRowClick = true"     
it just backs up a whole page OR crashes my browser completely...Any ideas on what's going on here???  I've tried with and without the 

RadAjaxManager



<

 

telerik:RadGrid ID="rgdUsers" runat="server" HeaderStyle-HorizontalAlign="Center" Width="98%" Skin="OurSkin" EnableEmbeddedSkins="false"

 

 

 

AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" OnPageSizeChanged="rgdUsers_PageSizeChange" GridLines="Both" onneeddatasource="rgdUsers_NeedDataSource" PageSize="10"

 

 

 

onpageindexchanged="rgdUsers_PageIndexChanged" onselectedindexchanged="rgdUsers_SelectedIndexChanged" onsortcommand="rgdUsers_SortCommand">

 

 

 

<ClientSettings EnablePostBackOnRowClick="true">

 

 

 

<Selecting AllowRowSelect="true" />

 

 

 

<ClientEvents OnRowSelected="RowSelected" />

 

 

 

</ClientSettings>

 

 

 

<MasterTableView DataKeyNames="LastName, FirstName, UserName, Role">

 

 

 

<PagerStyle Mode="NextPrevNumericAndAdvanced" AlwaysVisible="True" />

 

 

 

<Columns>

 

 

 

<telerik:GridButtonColumn CommandName="Select" DataTextField="UserName" HeaderText="Click to Edit" SortExpression="UserName" UniqueName="UserName">

 

 

 

</telerik:GridButtonColumn>

 

 

 

<telerik:GridBoundColumn DataField="LastName" HeaderText="Last" SortExpression="LastName" UniqueName="LastName">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="FirstName" HeaderText="First" SortExpression="FirstName" UniqueName="FirstName">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="UserName" HeaderText="UserName" UniqueName="UserName" Visible="False">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="Role" HeaderText="User_Type" SortExpression="Role" UniqueName="Role">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="UserID" HeaderText="UserID" UniqueName="UserID" Visible="False">

 

 

 

</telerik:GridBoundColumn>

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

</telerik:RadGrid>

 

 

2 Answers, 1 is accepted

Sort by
0
Erik
Top achievements
Rank 1
answered on 04 Feb 2010, 02:49 PM
So I was able to get the browser back button to work without using historypoints when clicking on the radgrid, but was only able to do so by creating a postback through javascript as the radgrid always seemed to ajaxify itself even turning off ajax.  The browser backbutton issue that was crashing my browser each time was due to some strange issue with the radGrid not liking to be wrapped in a div tag so by redesigning and taking the radgrid out of the div it stopped crashing the browser.   Now the problem became that hiding the radgrid on the postback and hitting the browser back button crashed the browser again and the only attribute it would take would be visibility:hidden which doesn't free up space, so I had to place it off the page to achieve my goal of hiding it from a viewer.  Quite a nice mess such a simple task created with this control.
0
Pavlina
Telerik team
answered on 04 Feb 2010, 04:18 PM
Hi Erik,

Could you please send us a simple working application (via support ticket) where we can reproduce and debug the issue you are facing?

Regards,
Pavlina
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
Grid
Asked by
Erik
Top achievements
Rank 1
Answers by
Erik
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or