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

Q3 2008 Grid Question

1 Answer 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 11 Nov 2008, 08:53 PM
In my page I have a search form above the grid.  The previous version 2008 Q2 displayed an empty box that when I clicked on the submit button would render the RadAjaxManager.  I have updated to Q3 2008 and the empty Grid is gone.  When someone clicks submit you don't see anything until the grid returns results.  This is a problem because it looks like the submit is not doing anything, because it is a rather large query and can take 5-10 seconds to return results. 

There are two alternatives that could resolve this issue for me.

1. Disable the button to let the user know something is happening.
2. Expand the empty container again for the grid so the user sees the RadAjaxManager with the loading graphic.

How can I preform either?  The ajax in the page is keeping the submit button from being enabled after the results come back.  I would like to re-enable it but if not at least show the empty grid before results are returned.

I look forward to your responses.

1 Answer, 1 is accepted

Sort by
0
Mike
Top achievements
Rank 1
answered on 12 Nov 2008, 02:36 PM
I found this on asp.net forums and it works like a charm.

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">         
        <script type="text/javascript">  
            // Disable and re-enable the submit buttons  
            var pbControl = null;  
            var prm = Sys.WebForms.PageRequestManager.getInstance();  
            prm.add_beginRequest(BeginRequestHandler);  
            prm.add_endRequest(EndRequestHandler);  
            function BeginRequestHandler(sender, args) {  
                pbControl = args.get_postBackElement();  //the control causing the postback  
                pbControl.disabled = true;  
            }  
            function EndRequestHandler(sender, args) {  
                pbControl.disabled = false;  
                pbControl = null;  
            }  
            </script>  
    </telerik:RadCodeBlock> 
Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Answers by
Mike
Top achievements
Rank 1
Share this question
or