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

How-To Enable Partial Rendering On Grid?

5 Answers 210 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 18 Apr 2012, 02:55 PM
I have a RADGrid on my page. But when the user clicks any of the control in the grid, Page Forward/Back, Page Number, PageSize, Refresh, Checkbox Row Selector, etc... The entire page refreshes.  I would like to have just the Grid itself refresh.  I looking online, but I can't seem to find the information to make it all click.

I am using DNN 6, and I manually registered the RADAJAXManager on the page. I saw there was an EnableAJAX setting, but then later found that it was depreciated in the newer Telerik controls. So then I tried programatically adding the AJAX Settings with AddAjaxSetting(objMyRADGrid, objMyRADGrid), but nothing happens. I am guessing I am doing something wrong, or I am looking entirely in the wrong place.

Any clues or suggestions?

5 Answers, 1 is accepted

Sort by
0
Elliott
Top achievements
Rank 2
answered on 18 Apr 2012, 04:21 PM
the RADAjaxManager control is used to manage what gets refreshed when
as an example
<telerik:RadAjaxManager ID="rasManager" runat="server">
    <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="rgDealerMaintenance">
        <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="rgDealerMaintenance" />
            <telerik:AjaxUpdatedControl ControlID="txtUserID" />
            <telerik:AjaxUpdatedControl ControlID="txtPassword" />
            <telerik:AjaxUpdatedControl ControlID="hdnDealerRegisID" />
            <telerik:AjaxUpdatedControl ControlID="hdnCount" />
            <telerik:AjaxUpdatedControl ControlID="hdnRegistrationFlag" />
        </UpdatedControls>
    </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

when the grid (rgDealerMaintenance) is sent back to the server to update the data store, send back a bunch of textboxes and hidden fields
you need to include them if you need their value or need to update them or both
wiser heads than I will need to help you if you are building your Ajax Manager dynamically
0
Ben
Top achievements
Rank 1
answered on 18 Apr 2012, 04:29 PM
Thanks for responing Marianne, but as you stated, I am building my control Dynamically.  It's setting up the AJAXSettings inside the AJAXManager that I think is throwing me for a loop.  I don't think I am building the AJAXSettings correctly. I've tried several variations, and come up with nothing. I tried surrounding my RADGrid with an AJAXPanel, but then the issue I had was that instead of the whole page "blinking" on a refresh, the RADGrid completely valished, then re-appeared. I looked at several of the Demo's on the Telerik site, and I have no clue how they get their RADGrid to use the spinning circle refresh method for just the RADGrid.

I tried setting the page's "Support Partial Rendering" to true, but then what happens is that the whole page gray's out with the spinning circle. I just want to mimic the same behavior as shown on the Telerik Demo's.

::Frustrated::
0
Elliott
Top achievements
Rank 2
answered on 18 Apr 2012, 04:50 PM
did you try an asp UpdatePanel?
it works better with RadAjaxManager than theTelerik equivalent

maybe code an Ajax Manager in HTML, view the source rendered and view source on the dynamically created control?

you checked this out, right?
http://www.telerik.com/help/aspnet-ajax/ajax-user-controls.html
0
Ben
Top achievements
Rank 1
answered on 18 Apr 2012, 07:11 PM
Marianne,

Thanks again for the input. I tried placing the controls manually on the page to do a comparison as you suggested.  Unfortunately as I was trying to test it, I realized since my controls are being created dynamically amoungst other things, this "direct" placement doesn't work for me (unless I were to re-write a bunch of code to get it to work, which I rather not if at all avoidable).

I tried using the ASP:UpdatePanel too, but for some strange reason I get a "...is not a known element" error when placing the ASP:UpdatePanel on my ASCX file. Might have something to do with how the web.config is setup on DotNetNuke. I tried seeing if I could fix the problem, but Googling the error brings up a bunch of stuff that doesn't pertain to my situation from what I can tell.

Lastly I did check out the website link you provided. And I have to say, I'm confused a little. I think the Proxy is used if I wanted to manipulate the grid in "design view" on my ASCX page directly? If that is the case, then the Proxy does me no good either because all my controlls and setting are done programmatically...there is nothing to edit at design time.

I'm sorry about all the negative results...but I am very appreciative of the ideas.  They all seemed like good ideas and clues, until something foiled my attempt.  LOL 

I am open to any other suggestions...  :-)  Anyone?
0
Ben
Top achievements
Rank 1
answered on 19 Apr 2012, 01:55 PM
EUREKA! I figured it out. My problem was such a silly one. I have an IF statement on my Page_Load() event that check if IsPostBack. I was only registering the AjaxSettings on the RADAjaxManager if IsPostPack = False. I didn't realize that the RADAjaxManager was being recreated on each PostBack, and therefor I was losing all my AjaxSettings, so I moved the method that did the AjaxSettings registration outside of the IF statement so it always run on every page load, and voilĂ ! It worked!

1) I tested the "Grouping" ability, and it works, however...when I drag a column, you don't "see" the collumn being dragged. All you see is a "crosshair" cursor as you are dragging the column. In the Demo's, when you start dragging a box with the column name inside it appears so you have a visual experience of the "drag/drop" feature. How do I get that same functionality? Anyone know?
Tags
Grid
Asked by
Ben
Top achievements
Rank 1
Answers by
Elliott
Top achievements
Rank 2
Ben
Top achievements
Rank 1
Share this question
or