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

RadGrid problems binding ONLY to WCF

6 Answers 178 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Steele
Top achievements
Rank 1
Steele asked on 19 Oct 2008, 10:17 PM
I really love RadGrid, but we have a scenario where we have 4 grids on a page and need to use WCF to populate them or risk severe performance problems (which in fact my client rejected an approach using AjaxPanels for performance reasons).

I am having several problems with even the simplest of grids in this scenario.
I start by binding the grid with an Empty List(Of Items) on Page_Load. Then the WCF binding happens asynchronously from Client-side events.

A) nothing gets formatted properly when binding unless you have bound Server-side with a populated datasource first. (for example, numbers are 0 for GridNumericColumn.)
B) it is impossible without writing a ton of script to conditionally format using OnRowDataBound beacue it doesn't have an EditMode to find.
C) .editAllItems() causes a postback and destroys the grid (unless it's rebound on pageload which completely defeats the purpose of WCF binding).
D) .editItem() does not work (probably because the edit controls don't exist).
E) I tried even extreme samples like: RadGridClientSideEditWithTemplates and the code makes no sense, and actually does not work unless you bind from the server first, just llok at the code for toggleEdit(), this is rediculous to have to do.
F) no editing is allowed at all without first binding on the server, then refreshing with WCF. Inspecting the MasterTableView shows there are no edit controls present to show or hide, did I completely miss something to enable this?
G) there is no reasonable way to access the footers from the client (for totals).

When it does populate, it is superfast, which is good andf why we need this approach instead of AjaxPanels and throwing away 80% of the page.

I can't produce a sample at this time, but just look at the WCF and Webservice samples in the blogs and try to change one to do any of these scenarios and they fail.

So I now have an application that has been in production for several years with Telerik controls that I now am going to remove the grid and start over because of these significant limitations.  I have been fighting with this for 2 weeks to get it working and everytime I try anything other than displaying raw data, it falls flat.

Seriously guys, all your blog demos of MVC and WCF are cool, but try doing something other than rudimentary binding  (and not rebind AFTER you bind on the server first...) and you will see how incredibly difficult it is to use RadGrid.

As we move further into using WCF and MVC, we really need to have most of the features on the server-side that makes RadGrid so great.

Prove me wrong and show me that this is possible, even in a new release!
Hopefully this will provide some direction for the next set of releases.

Steele Price

6 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 23 Oct 2008, 02:51 PM
Hi Steele,

Thank you very much for your feedback. You are right - currently it is not very easy to accomplish editing with client-side data-binding however I'm happy to inform you that with Q3 release will will introduce completely codeless client data-bind support for edited grid items no matter of editing type - standard columns, template columns, FormTemplate, UserControl edit form, etc. Unfortunately most probably we will no be able to provide straightforward way for calculations and aggregates with Q3 version however we will do our best to provide this in Q3 service packs.

All the best,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Steele
Top achievements
Rank 1
answered on 13 Dec 2008, 08:40 PM
I don't see this working in Q3 sp1.

Did it get implemented?
Binding works, but it does not retain ItemTemplates
0
Sebastian
Telerik team
answered on 17 Dec 2008, 03:09 PM
Hello Steele,

Indeed creating controls in template columns with client-side binding (meaningful for html controls since server controls cannot be instantiated purely on the client) is not supported in the present version of RadGrid for ASP.NET AJAX.
As a workaround you may consider intercepting the OnRowDataBound client event of the grid (as in this demo) and inject an html control inside the respective template column cell.

Kind regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
NetDeveloper1107
Top achievements
Rank 1
answered on 22 Apr 2010, 01:06 PM
Hi,

We are using 2009.2.826.20 version of Telerik.We are trying to use feature of Client side binding where we need to have ItemTemplate column which will contain Linkbutton inside it. But the data is not binded to this column when we bind data from client side.

Can you provide some examples to achieve this,

Thanks.
0
Sebastian
Telerik team
answered on 22 Apr 2010, 01:31 PM
Hi NetDeveloper1107,

It is not meaningful to use binding expressions for your link button (I assume that you are using the code posted here) with client-side binding as they will not be evaluated in this context. The possible solution for your case is depicted in one of the sections of this documentation article (intercepting the OnRowDataBound client event).

Kind regards,
Sebastian
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
NetDeveloper1107
Top achievements
Rank 1
answered on 23 Apr 2010, 05:25 AM
Hi,

I have gone through the example posted here but no luck.

http://www.telerik.com/help/aspnet-ajax/client-side-binding-specifics.html

I have linkbutton inside template column.But this does not binds the data. this link button will display data whe data binded from client side. but all other fields get binded in grid but template column does not gets binded.

                                 <telerik:GridTemplateColumn DataField="taskName">
                                  <ItemTemplate>
                                  <asp:LinkButton runat="server" id="taskName"></asp:LinkButton>
                                  </ItemTemplate>
                                  </telerik:GridTemplateColumn> 
Can you help me in this.

Thanks.



Tags
Grid
Asked by
Steele
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Steele
Top achievements
Rank 1
Sebastian
Telerik team
NetDeveloper1107
Top achievements
Rank 1
Share this question
or