Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Dynamic Column Creation Problem with Telerik RadGrid

As part of a large eCommerce project, I Needed to be able to extend a Grid control into a custom control and dynamically add columns.  I needed to change the order of events that determined when and how columns would be added.  After a rather large modification of several hundred lines of code, I found that the grid would throw  errors such as "Cannot create column with the specified type name".  AJAX sorting, filtering, and refreshes threw this error every time after the initial grid display.  This vexed me for over two days until I found the Telerik forums post at http://www.telerik.com/community/forums/aspnet-ajax/grid/dynamic-creation-of-columns.aspx.  The solution was to set the EnableColumnsViewState property of the MasterTableView to false and create the columns on Page.Init or on each Page.Load.

Sometimes, the easiest changes fix the most hair-pulling problems.  :-)



This post first appeared on Demtron.com Blog | Milwaukee Area SEO, SEM, ASP, please read the originial post: here

Share the post

Dynamic Column Creation Problem with Telerik RadGrid

×

Subscribe to Demtron.com Blog | Milwaukee Area Seo, Sem, Asp

Get updates delivered right to your inbox!

Thank you for your subscription

×