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

Rad Grid Self hierarchy

7 Answers 123 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Murthy
Top achievements
Rank 1
Murthy asked on 26 Jul 2010, 11:32 AM
Hi,

Greetings,

I am working on displaying the data in self hierarchy using Rad grid. I have taken the code given by the Rad grid demo page.
When iam displaying the data in Web application, i am getting the data in self hierarchy and it is working perfectly.

Then i am trying to display the same grid in visual web part (share point 2010) and after deploying it in the share point, when iam loading the web part, iam getting an message "Stop running the script, if you are trying to run the script your browser will be non -responsive" and then my Page_Prerender event is not firing. In that event, when there are no nested items, hiding the expand collapse image is not working.

I am working on Windows 7 machine having Sharepoint foundation. I am deploying my visual web parts in that share point foundation.

Could any one please let me know if you have a work a round for this.

Thanks
Murthy

7 Answers, 1 is accepted

Sort by
0
Murthy
Top achievements
Rank 1
answered on 26 Jul 2010, 03:57 PM
Hi telerik team,

In IE8, Iam getting the "Stop running the script" problem.
In mozilla and Safari, iam not getting this problem.

Please let me know if any one knows about this problem,

Thanks,
Murthy
0
kumar S
Top achievements
Rank 1
answered on 27 Jul 2010, 10:17 AM
Hi Murthy,
               Please refer below link to fix the javascript error in IE8.

http://www.telerik.com/help/aspnet-ajax/troubleshooting-treeview-script-causes-ie-run-slowly.html

Thanks,
Kumar...
             
0
Murthy
Top achievements
Rank 1
answered on 30 Jul 2010, 03:36 PM
Hi Kumar,

Thanks for the reply,

it does a trick for me.

Thank you very much.

Thanks,
Murthy.
0
Murthy
Top achievements
Rank 1
answered on 30 Jul 2010, 03:48 PM
Hi telerik Team,

I am using Rad Grid in my application. I am displaying data in self hierarchy in the Rad Grid.

I am displaying rad Grid with self hierarchy in a visual web part in a model dialog in Share point 2010.

Could any one please let me know, how to post back the selected row values to the parent form client side.

As i am using self hierarchy grid, i need to find the selected row information. The selected row can be there in any nested table.

please let me know what is the correct event to use for this work around.

Thanks in advance.

Thanks,
Murthy
0
Radoslav
Telerik team
answered on 05 Aug 2010, 09:11 AM
Hello Murthy,

You could try attaching the client side event handler to the RadGrid1.ClientSettings.ClientEvents.OnRowSelected event:
RadGrid1.ClientSettings.ClientEvents.OnRowSelected = "OnRowSelected";

Into OnRowSelected event handler function, you could get the itemIndexHierarchical of the current selected row and remove the string after the last ":" symbol. In this way you will receive the parent item's itemIndexHierarchical. For example if you only one child level:
<script type="text/javascript">
 function OnRowSelected(sender, eventArgs)
 {
    var itemIndexHierarchical = eventArgs.get_itemIndexHierarchical();
    var parentItemIndexHierarchical = itemIndexHierarchical.substring(0,itemIndexHierarchical.indexOf(":"));
    var parentItem = sender.get_masterTableView().get_dataItems()[parentItemIndexHierarchical];  
 }
 </script>

Please give it try and let me know if it helps you.

Kind regards,
Radoslav
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
Brinda
Top achievements
Rank 1
answered on 08 Dec 2010, 02:38 PM
Hi,

I am having a result set with the structure of
Level1                         Level2           Level3               CalcField
---------------------------------------------------------------------------
Akron                Cleveland OH         2007-QTR 1     206172.0000
Akron                Cleveland OH         2007-QTR 2     225291.0000
Akron                Cleveland OH         2007-QTR 3     210866.0000
Allen                  Dallas-Fort Worth  TX 2009-QTR 1 27241.0000
Allen                  Dallas-Fort Worth  TX 2009-QTR 2 62850.0000
Allen                  Dallas-Fort Worth  TX 2009-QTR 3 100539.0000

And the output of the grid should be,
Akron
        Cleveland OH               642329.0000
               2007-QTR 1         206172.0000
               2007-QTR 2         225291.0000
               2007-QTR 3         210866.0000
Allen  
       Dallas-Fort Worth         90091.0000
               TX 2009-QTR 1   27241.0000
               TX 2009-QTR 2   62850.0000

I have gone through the samples with ParentKeyname and DataKeyNames Concept.But i dont have the parentid concept in my query.
Can anyone help me..its urgent..
Any best way to achieve this?
0
Radoslav
Telerik team
answered on 11 Dec 2010, 09:53 AM
Hello Brinda,

If you do not have Parent->Child relation you could not use the Self-Reference RadGrid. However in your case you could try using the grouping and group by Level1 and Level2. For example:
<GroupByExpressions>
   <telerik:GridGroupByExpression>
      <GroupByFields>
         <telerik:GridGroupByField FieldName="Level1" />
      </GroupByFields>
      <SelectFields>
         <telerik:GridGroupByField FieldName="Level1" />
      </SelectFields>
   </telerik:GridGroupByExpression>
   <telerik:GridGroupByExpression>
      <GroupByFields>
         <telerik:GridGroupByField FieldName="Level2" />
      </GroupByFields>
      <SelectFields>
         <telerik:GridGroupByField FieldName="Level2" />
      </SelectFields>
   </telerik:GridGroupByExpression>
</GroupByExpressions>

Additionally I am sending you a simple example which demonstrates the RadGrid grouping. Please check it out and let me know if it helps you.

Kind regards,
Radoslav
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.
Tags
Grid
Asked by
Murthy
Top achievements
Rank 1
Answers by
Murthy
Top achievements
Rank 1
kumar S
Top achievements
Rank 1
Radoslav
Telerik team
Brinda
Top achievements
Rank 1
Share this question
or