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

Customize OrgChart example with SharePointList

4 Answers 94 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Helga
Top achievements
Rank 1
Helga asked on 15 Jan 2014, 08:25 AM
Hello,

i want to customize the OrgChart Example http://demos.telerik.com/silverlight/#Diagrams/OrgChart. The OrgChart will be shown in a SharePoint WebPart.
i have already changed the way of inputting data in here. My data come from a SharePoint 2010 List with the help of
clientcontext.ExecuteQueryAsync(OnSuccess, OnFailed);  The Method OnSuccess gives the data within a customize class type back to OrgChartViewModel with the help of Deployment.Current.Dispatcher.BeginInvoke(() => _callBack(rootPerson));
Now the Problem is, that the UI Thread is running further and try to create the connections and binding the initial positions of the nodes (with not the correct Data in there).
I have found

 

http://www.telerik.com/community/forums/silverlight/diagram/orgchart-example.aspx this thread in the forum, but i think i have not quite the same problem. Because it is putting some positions and connections, but not with the complete HierarchicalDataSource.

Is here maybe someone who knows this huge code project good enough, that can say which ViewModel or Links i must restart after i came back from my clientcontext thread?
Or is there a chance for stopping the UI thread until my getting data thread is ready?

Your sincerely

4 Answers, 1 is accepted

Sort by
0
Accepted
Pavel R. Pavlov
Telerik team
answered on 17 Jan 2014, 04:41 PM
Hi,

As far as I understand your scenario, you need to load the GraphSource of the RadDiagram control asynchronously. It is most likely that when the GraphSource is loaded the data is not yet populated and the rendered shapes are not visualized correctly.

In order to overcome this issue you need to make sure that your business data is properly loaded before visualizing the GraphSource will work as expected. For your convenience we created a sample project demonstrating how you can use an event to make sure that the data is loaded.

Please take a look at the OrgChartViewModel.cs file and let us know if you need any further assistance.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Helga
Top achievements
Rank 1
answered on 28 Jan 2014, 12:25 PM
Dear Pavel,

thanks a lot for your answer. I figured out, how i could fix my problem.
There was only one thing: it looks like we have used complete different versions of the example project. In mine there is for example no ItemDisplayMode, there is still all the stuff in OrgTeamViewModel and there is still the OrgTeamMemberViewModel existing. (Mine is the version that is shown in http://demos.telerik.com/silverlight/#Diagrams/OrgChart)

Because it would need so much time to change all the stuff, so that it will work. We decided to use the telerik asp.net OrgChart in RadOrgChart and not the silverlight one.

With best regards
0
Bala
Top achievements
Rank 1
answered on 07 Feb 2014, 08:44 AM
Hi,

    Is it possible to export the entire content to xml & import it back  in same format as is in the form of raddiagramshapes.
0
Pavel R. Pavlov
Telerik team
answered on 11 Feb 2014, 07:28 AM
Hi Bala,

Yes. You are allowed to export the RadDiagram in XML and after that to import it again. This functionality is provided by the Serialization feature of the control. You can find more information in our documentation. Our FirstLook example demonstrates how this feature can be implemented.

I hope this information is helpful. Please do not hesitate to ask if you need any further assistance.

Regards,
Pavel R. Pavlov
Telerik

Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

Tags
Diagram
Asked by
Helga
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Helga
Top achievements
Rank 1
Bala
Top achievements
Rank 1
Share this question
or