The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.
One of the improvements introduced in Sitefinity 3.6 have been very fast and responsive grids in Generic Content modules. We have switched from standard ASP.NET GridView controls to the feature rich Telerik RadGrid control and took the advantage of the built-in client side data binding mechanism.
While, client side data binding in general is still not as trivial as it should be, we have provided few enhancements that will allow you to take advantage of this attractive technique with minimal effort.
Client side data binding of RadGrid allows us to use very similar syntax and approach of traditional data binding, but however, the actual binding happens on the client. This results in a tremendously faster and more responsive user experience. Namely, since there is no postback, when we page through items or sort items - only the values of columns get replaced and do so on the client.
In this topic we will examine how has this approach been adjusted to Generic Content grids and how can you take advantage of it to provide fast and responsive grids in your Generic Content based modules.
When binding the grid on the client side, you will actually work against lightweight version of the CmsContentBase object (Generic Content item). You can bind to following members of the SimpleContent object:
<telerik:GridTemplateColumn |
UniqueName="Price" |
SortExpression="Price" |
HeaderText="<%$ Resources:Price %>"> |
</telerik:GridTemplateColumn> |
<telerik:ClientTemplate Name="Price" runat="server"> |
{#MetaFields.Price#} |
</telerik:ClientTemplate> |
var requiredMetaFields = ['Name', 'Price', 'SKU']; |
After you have finished these three steps, your client side data bound grid is ready.
/// <summary> |
/// Gets the name of the current content data provider. |
/// </summary> |
public virtual string ProviderName |
{ |
get |
{ |
return this.Manager.Provider.Name; |
} |
} |
var dataProviderName = "<%= Parent.Parent.ProviderName %>"; |
*** BEGIN NOTE ***
var dataProviderName = "<%= ((Telerik.Samples.Products.WebControls.Admin.Products.ProductsItemListView)Parent.Parent).ProviderName %>"; |
View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.
Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.
Learn MoreSubscribe to get all the news, info and tutorials you need to build better business apps and sites
Progress collects the Personal Information set out in our Privacy Policy and the Supplemental Privacy notice for residents of California and other US States and uses it for the purposes stated in that policy.
You can also ask us not to share your Personal Information to third parties here: Do Not Sell or Share My Info
We see that you have already chosen to receive marketing materials from us. If you wish to change this at any time you may do so by clicking here.
Thank you for your continued interest in Progress. Based on either your previous activity on our websites or our ongoing relationship, we will keep you updated on our products, solutions, services, company news and events. If you decide that you want to be removed from our mailing lists at any time, you can change your contact preferences by clicking here.