Hi,
I've been searching on the net for some while to see if there's a way to do this. I'll try my best to formulate what I mean in an understandable way.
Take this view for instance. I was wondering if there's any way to specifiy a parameter to the Action.
What I essentially am trying to do is this; I have a organizational diagram of some business. And say this map only contains the names of the employees and departments. But the view contains different checkboxes for altering the map. If I for instance press a certain checkbox, I would like to see the organizational map with both names AND titles of the employees. So in that case I want to send an int value of for example 1 to the Action to indicate what values the diagram should contain. Is there a way to declare this in the view?
6 Answers, 1 is accepted
You can provide additional parameters to the DataSource methods as described in this forum thread:
http://www.telerik.com/forums/pass-additional-parameters-to-read-ajax-datasource-method---mvc
Regards,
Stamo Gochev
Telerik by Progress
You can access the Diagram client instance and call its DataSource read() method like this:
$(
"#diagram"
).data(
"kendoDiagram"
).dataSource.read();
Regards,
Tsvetina
Telerik by Progress
Can you confirm that you are calling this line at a point of time when the Diagram is created (already visible) and that your Diagram Name is indeed "diagram"? The id used to find the Diagram jQuery element corresponds to the Name value you set for the Diagram.
Can you show the code that you are trying to run, maybe update the Pastebin?
Regards,
Tsvetina
Telerik by Progress
Yes, I'm calling it after the Diagram is created and already visible. My diagram name is definitely "diagram".
It did however work when I used this code, which I didn't find on your website but after some google searching.
$(
"#diagram"
).getKendoDiagram().dataSource.read();
$("
#diagram"
).getKendoDiagram().refresh();