With SharePoint 2010’s popularity on the rise, TelerikSPRadGrid Web Part has also gained a major boost in terms of nice features and functionality. Our SP 2010 grid web part has been extended with a new structure-and-data designer that makes it possible to display and manipulate a hierarchy of data coming from tables lying on SQL Server databases and SharePoint lists. Thus, the TelerikSPRadGrid Web Part now provides at the hand of developers a complete solution when it comes to operate with data supplied from the two most popular data storages used with SharePoint 2010. And here is how to take advantage of this cool new improvement:

To employ the designer’s capabilities you need to first load it through the Web Part’s menu:


The Web Part designer is very similar in logic and organization  to RadGrid's Visual Studio designer. It provides the option to construct the general hierarchical structure of the grid adding/deleting detail table views, set some important properties of the latter (such as Paging, Filtering, Sorting and others) and specify the data source to which the table views should be bound.


To start constructing with the Web Part designer, first select a table view from the upper-left tree view. The bottom right one is now loaded with two options to select from: General Settings and DataBinding. Clicking upon the General Settings node will allow you to set the most important properties for the selected table view. Do note that the Client Row Selection & Columns Reorder features are enabled/disabled on the grid, not table-view level, and will be delegated accordingly to the master and detail tables.


The other option in the bottom left region will load the SQL and SP lists explorer into the top right pane. Each one of those is hosted within a separate tab with a relevant name. Selecting the SQL tab will display a basic SQL Server Instances Explorer, again in the structure of a tree view control. When an instance of an SQL server is chosen as the data source for a given table view, the user will be prompted to provide his/her credentials before being able to browse the server's content:


The next level in the tree will list the databases under the SQL server instance. Still on the next level all the tables within a given database will be enumerated. Clicking upon a table will tell the designer to assign it to the selected table-view as its underlying data source and will display in the bottom right splitter region a grid control listing its columns. Now you have the opportunity to select the columns you’d like to see displayed in the web part. If no columns are selected, no table view will be constructed and any detail tables under it will be skipped by the designer too. 

If the currently selected  grid table view is a detail one you will be given the additional option to specify a master-child relation:

No log-in credentials will be required when binding to SP Lists as the current user's account is taken into consideration. Furthermore, no columns are selected for the SP list chosen, but instead the deepest level in the SP Lists Explorer tree will be populated with the views of the corresponding list. All the columns in the selected view will, upon saving the web part’s settings, become columns of SPRadGrid. 

On a final note, let us be aware that the SPRadGrid Designer does not preclude the use of the Web Part's Tool Part and it has been left as an additional option if you need to bind the grid control to just a single SharePoint list without opening the designer. What's new in the Tool Part is that the Grid Settings Panel now features a Binding Mode property that tells the Web Part what type of data-source should be used. The relevant Binding Mode options are respectively: SQL, SPList and Single SP List.

So, there is one nice valuable enhancement to our ASP.NET AJAX controls suite and the Q3 release will be coming with many more of the kind. But before it’s officially out and about, you can try it for yourself by downloading the beta of the TelerikSPRadGrid Web Part and see a live example of its new functionality at:


About the Author

Iana Tsolova

is Product Manager at Telerik’s DevTools division. She joined the company back in the beginning of 2008 as a Support Officer and has since occupied various positions at Telerik, including Senior Support Officer, Team Lead at one of the ASP.NET AJAX teams and Technical Support Director. Iana’s main interests are web development, reading articles related to geography, wild nature and latest renewable energy technologies.

Related Posts


Comments are disabled in preview mode.