The Columns definition as described in help is missing ?!
<telerik:GridBoundColumn Aggregate="Count" DataField="CustomerID" DataType="System.String" HeaderText="CustomerID" SortExpression="CustomerID" UniqueName="CustomerID"> </telerik:GridBoundColumn>
Here is the code of my webpart:
<WpNs1:TelerikSPRadGridWebPart runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{A4DEC18D-8081-41BC-95C2-3891DA62D7D2}" ><WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2">
<Title>Marketing Research</Title>
<FrameType>None</FrameType>
<Description>Telerik SPRadGrid Web Part</Description>
<IsIncluded>true</IsIncluded>
<ZoneID>g_35F88101A875412AA8912B7EAAF29F1A</ZoneID>
<PartOrder>2</PartOrder><FrameState>Normal</FrameState><Height /><Width /><AllowRemove>false</AllowRemove><AllowZoneChange>false</AllowZoneChange><AllowMinimize>false</AllowMinimize><AllowConnect>true</AllowConnect><AllowEdit>false</AllowEdit><AllowHide>false</AllowHide><IsVisible>true</IsVisible><DetailLink /><HelpLink /><HelpMode>Modeless</HelpMode><Dir>Default</Dir><PartImageSmall /><MissingAssembly>Cannot import this Web Part.</MissingAssembly><PartImageLarge /><IsIncludedFilter /><ExportControlledProperties>true</ExportControlledProperties><ConnectionID>00000000-0000-0000-0000-000000000000</ConnectionID><ID>g_a4dec18d_8081_41bc_95c2_3891da62d7d2</ID><SqlDataStructure xmlns="Telerik.Ajax.SharePoint"><Connection><IntegratedSecurity>false</IntegratedSecurity></Connection><Columns /><DetailTables /><Relations /><PrimaryKeys /><EnableSorting>false</EnableSorting><EnablePaging>false</EnablePaging><EnableFiltering>false</EnableFiltering><EnableRowSelect>false</EnableRowSelect><EnableContextMenu>false</EnableContextMenu><EnableColumnReorder>false</EnableColumnReorder><AllowInsert>false</AllowInsert><AllowUpdate>false</AllowUpdate><AllowDelete>false</AllowDelete><AllowSelection>false</AllowSelection><AllowMultipleSelection>false</AllowMultipleSelection><PagerMode>NextPrev</PagerMode><Layout>Grid</Layout><InsertItemPosition>None</InsertItemPosition><Skin>Simple</Skin><UserInternalEditing>false</UserInternalEditing></SqlDataStructure><SPListDataStructure xmlns="Telerik.Ajax.SharePoint"><DetailTables /><Relations /><EnableSorting>false</EnableSorting><EnablePaging>false</EnablePaging><EnableFiltering>false</EnableFiltering><EnableRowSelect>false</EnableRowSelect><EnableContextMenu>false</EnableContextMenu><EnableColumnReorder>false</EnableColumnReorder><ShowGroupFooter>true</ShowGroupFooter><AllowInsert>false</AllowInsert><AllowUpdate>false</AllowUpdate><AllowDelete>false</AllowDelete><AllowSelection>false</AllowSelection><AllowMultipleSelection>false</AllowMultipleSelection><PagerMode>NextPrev</PagerMode><Layout>Grid</Layout><InsertItemPosition>None</InsertItemPosition><Skin>Simple</Skin><UserInternalEditing>false</UserInternalEditing></SPListDataStructure><ViewID xmlns="Telerik.Ajax.SharePoint">00000000-0000-0000-0000-000000000000</ViewID><ShowToolbar xmlns="Telerik.Ajax.SharePoint">false</ShowToolbar><EnableHeaderContextMenu xmlns="Telerik.Ajax.SharePoint">false</EnableHeaderContextMenu><EnableInserting xmlns="Telerik.Ajax.SharePoint">false</EnableInserting><EnableEditing xmlns="Telerik.Ajax.SharePoint">false</EnableEditing><EnableDeleting xmlns="Telerik.Ajax.SharePoint">false</EnableDeleting><Skin xmlns="Telerik.Ajax.SharePoint">Windows7</Skin><BindingMode xmlns="Telerik.Ajax.SharePoint">SPListSingle</BindingMode><ListID xmlns="Telerik.Ajax.SharePoint">94de5d0f-7f51-4c89-9e65-26c5074250bf</ListID></WebPart></WpNs1:TelerikSPRadGridWebPart>
Regards and help for support
Chris
12 Answers, 1 is accepted
There should be no problem enabling the group footer aggregates in Sharepoint as well. Your grid declaration should look similar to the one in this live demo.
All the best,Marin
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Is this correct?
I did hope to beeing able to use the designer created code as a starting plattform.
best regards
Christof
When you create a Sharepoint Visual Web Part project in Visual Studio you can add RadGrid to the user control for the web part and use the RadGrid designer in Visual Studio to configure the structure and set column aggregates. More information is available in this help topic.
Greetings,Marin
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
i am not using VS i do it with Sharepoint Designer.
And so i did not try to build my own webpart but would like to use your webpart.
Could i do the job:
-colum agregates and grouping
- Filtering by querystring
with customizing your webpart or do i need to develop my own wp??
br
Christof
In order enable grouping aggregates you should bind to SP Lists that are configured to aggregate (group) the data so that the grid can show the aggregates automatically. Filtering can be enbled from the SP RadGrid web part designer. Currently filtering by query by string is not supported out of the box.
Greetings,Marin
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
i configured the list view with agregates. It works in th list view but not in rad grid.
Btw: Same behaviour with rounding.
regards
Christof
It depends what you are building:
- if you want a web part with RadGrid that can bind to SPList you can add a standard web part property that can be configured through the web part editor and chose the SPList there. That's pretty much what the SPRadGridWebPart provides.
Another option is to add such property by inheriting the RadGrid control and improving its databinding to handle SPList objects. Fortunately this is too already implemented. In the Telerik.Ajax.SharePoint.dll assembly that you get when you install the Telerik Web Parts there is a SPRadGrid control. It is basically a RadGrid that allows databinding to SPList. You can use the NeedDataSource event and pass the SPList directly to the control:
protected
void
RadGrid1_NeedDataSource(
object
sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
RadGrid1.List = someSPList;
RadGrid1.DataSource = someSPList;
}
Regards,
Marin
Telerik
In my radgrid I am binding the sp list using code(GridDataBound columns).What I need is an OOTB component(or custom component if that is not possible) that lets me change my data source to another list/excel file in my SP web page itself. No code changes should be involved in it to enhance reusability. In my web part properties I should get an option to change the list which is populating the grid,choose columns etc. as an end user.
Does SPradgridwebpart provide this functionality?
You can check the features that the SPRadGridWebPart provides here:
http://sharepoint.telerik.com/aspnet-ajax/web-parts/Pages/Single-List-Binding.aspx
When the web part is in edit mode you can pick a SPList that will be used to databind the grid in the web part. Similar configuration is also available through the custom web part designer which also lets you change settings and pick datasource for the web part.
Another option is to mimic this same behavior in your web part so that when it is in edit mode it allows a SPList to be picked which on postback will be set as datasource for the RadGrid to show the new data.
I hope this helps. Let me know if you have any other questions.
Best Regards,
Marin
Telerik
Thanks in advance.
Implementing similar features in your web part may require some additional custom code. For example you can add a custom property where you keep the name of the SPList you want to bind to:
http://msdn.microsoft.com/en-us/library/dd584174(v=office.11).aspx
You can also modify the built-in toolpart editor of the web part so that the user can enter or pick the name of the SPList when the web part is in edit mode. Further guidance can be found here:
http://msdn.microsoft.com/en-us/library/dd584178(v=office.11).aspx
Once you have the name of the SPList - you can find it by using the Sharepoint server-side API and bind the RadGrid to it.
The SPRadGridWebPart for example creates the whole RadGrid control in code behind in the default CreateChildControls or CreateControlHierarchy methods from the base WebPart class and after all the settings and structure of the control is setup there it proceeds to handle the NeedDataSource event of the grid and set the datasource there.
I hope this helps. Let me know if you have any other questions.
Best Regards,
Marin
Telerik