Hello,
First, I just want to say that I'm really enjoying all of the functionality, simplicity and capabilities built into the RadControls for ASP AJAX. There's a lot to digest, but for the most part I've been able to figure out how to accomplish everything I set out to accomplish. That said, I have a scenario where I've been unable to discover a solution. I'm hoping that there is a simple, elegant solution to my problem.
I have built an application that dynamically creates RadDocks and loads them into a Layout using an UpdatePanel (based on your dynamic RadDock demo, of course). These RadDocks contain one RadGrid each. I want the RadDocks to load up immediately with a "loading, please wait" animation playing while the RadGrid in the dock is updated (a la PageFlakes). Based on this usage requirement, it seems that each grid needs to get data via a client-side Web Service call based on parameters provided by the user. Here's where I run into problems:
Of all the solutions I listed, number 1 was the closest to working as I'd hoped. It was even pretty elegant in its approach. If I could get a RadGrid to render properly in that scenario, that would be great. That said, I'm more interested in knowing the "right" way to do this vs. the easiest. I do want it to be reusable and easy to maintain, but if I can get that without writing my massive JavaScript library... that would be great!
I'll appreciate any help,
Eric Dzikowski
First, I just want to say that I'm really enjoying all of the functionality, simplicity and capabilities built into the RadControls for ASP AJAX. There's a lot to digest, but for the most part I've been able to figure out how to accomplish everything I set out to accomplish. That said, I have a scenario where I've been unable to discover a solution. I'm hoping that there is a simple, elegant solution to my problem.
I have built an application that dynamically creates RadDocks and loads them into a Layout using an UpdatePanel (based on your dynamic RadDock demo, of course). These RadDocks contain one RadGrid each. I want the RadDocks to load up immediately with a "loading, please wait" animation playing while the RadGrid in the dock is updated (a la PageFlakes). Based on this usage requirement, it seems that each grid needs to get data via a client-side Web Service call based on parameters provided by the user. Here's where I run into problems:
- I found an example in the forums (I can't find the thread again, but the sample project file was called '125798_webservice.zip') that almost works as I'd like. It does everything I described above, and even returns a view of the data pre-bound to a control and sent as HTML rather than a collection of rows, which I think is a better approach, but it builds the view using an asp:Repeater control instead of a RadGrid. All attempts to use a RadGrid (or even an asp:GridView) in this way have failed. The exception thrown instructs me to put the grid control in a form tag with runat="server" as an attribute. I've done this, but that throws all kinds of other problems...
- Since that didn't work, I figured I'd try and attach to a RadGrid's 'Initialize' or 'Created' event and load the data via client-side databinding. I can add empty RadGrids to the RadDocks when I create them, but I'm having a very difficult time getting each grid to go fetch data and update the view. I can't seem to successfully attach to a RadGrid create event and cause the grid to fetch and update. Even if I could capture the event properly, I can't seem to get a handle to the MasterTableView of the RadGrid. Another bummer is that I want autogenerated columns for most of these RadGrids, and I learned today that client-side databinding requries explicitly defined columns... so client-side databinding isn't the answer.
- I tried using client script to fetch the data and programatically add rows to the grid, but this requires a TON of JavaScript (not ideal) - especially considering that I have no idea what the columns will look like for each RadGrid. I did get this to work for one type of table, but I don't know how I can generalize this code enough to cover all the potential table layouts I will encounter. I suppose I COULD figure out all the possible column combinations and write script to handle them, but wow... I really don't want to do that.
Of all the solutions I listed, number 1 was the closest to working as I'd hoped. It was even pretty elegant in its approach. If I could get a RadGrid to render properly in that scenario, that would be great. That said, I'm more interested in knowing the "right" way to do this vs. the easiest. I do want it to be reusable and easy to maintain, but if I can get that without writing my massive JavaScript library... that would be great!
I'll appreciate any help,
Eric Dzikowski