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

[Solved] Problems populating grid and paging

1 Answer 170 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Josef
Top achievements
Rank 1
Josef asked on 04 Jun 2008, 11:45 PM

I have two problems:

1. I'm hiding the panel in which my RadGrid resides, and I show it once a certain LinkButton has been clicked. The problem is when I click the LinkButton to display the panel the first time, the NeedDataSource-event is not triggered. When I click the same button a second time (in succession to the first click), the event is triggered and the RadGrid is filled with data. Doing MyGrid.Rebind() works, but it feels like an ugly solution, seeing how it should bind it automatically?

I heard I could do EnableOutsideScripts="true" but I can't find that property anywhere! I must be dead stupid, I've looked for this property all over yet I can't find it. I have to ask - is it deprecated? According to the object browser, RadAjaxManager inherits from RadAjaxControl, which in turn has the property according to the site (but not according to my object browser). Intellisense isn't picking it up, and manually typing it does no good.

2. I'm binding varying datasources to another RadGrid depending on a set of variables I store in ViewState, this resulted in broken paging on the RadGrid. I read something about ViewState conflicts, but I didn't quite understand how the RadGrid ViewState could interfere with the rest of the page's ViewState.

I'm using the latest version of Teleriks RadControls and .NET Framework 3.5. Tips?

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 09 Jun 2008, 08:28 AM
Hello Josef,

The visible/invisible conventions for RadGrid are outlined in this section of the online documentation:

http://www.telerik.com/help/aspnet/grid/grdvisibleinvisibleconventions.html

The EnableOutsideScripts is a property which is present under the Classic versions of RadGrid and RadAjax only. Their ASP.NET AJAX counterparts do not need such property since all client scripts should be registered by the asp ScriptManager control. Thus they will be evaluated when necessary on subsequent ajax requests during the page lifecycle.

Concerning you last question:
There should be no problem to assign different data sources for the grid as long as you refresh the control each time (invoking its Rebind() method) and reset the page index by setting CurrentPageIndex = 0.

Kind regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Josef
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or