'Insert Chart' dialog

3 Answers 25 Views
ChartView Spreadsheet
Ian
Top achievements
Rank 2
Bronze
Iron
Iron
Ian asked on 17 Aug 2023, 03:34 PM

Is there a way to call the Telerik 'insert chart' dialog for a RadSpreadsheet?

I don't want to include the whole ribbon bar, as it has lots of options which would make a mess of my data if a user tried to use it, but I'd REALLY like to let them to be able to add charts.

Otherwise, ss I had to do with the find/replace dialog, I'll have to replciate your UI, which is silly.

3 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 21 Aug 2023, 01:17 PM

Hello Ian,

You can work with charts programmatically as well. For more information about the available API, refer to the documentation of the library used as a model of RadSpreadsheet - RadSpreadProcessing: Charts API.

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Ian
Top achievements
Rank 2
Bronze
Iron
Iron
answered on 12 Oct 2023, 10:41 AM

Thanks Dinko,

 I had already seen the API which lets me use all of the charting function: I guess I'm looking for something a lot closer to the default charting experience which the user gets from using the ribbon bar.

As described elsewhere, I can't use the default ribbon bar because (1) its really slow and (2) i need to remove lots of function which I can't let users use and (3) I have lots of specialised stuff I need to add.

This is why I want to use your 'insert chart' dialog.

Is this possible via the API?

0
Dinko | Tech Support Engineer
Telerik team
answered on 16 Oct 2023, 07:17 AM

Hello Ian,

If I have correctly understood your question, you want to start the insert chart dialog from code. In this case, you can execute the InserChart command. This way you can execute the command on a separate button click and you will need to use the ribbon. Let me know if this is what you are looking for.

this.radSpreadsheet1.SpreadsheetElement.CommandDescriptors.InsertChart.Command.Execute(null);

As a side note, each option in the RadSpreadsheetRibbonBar is exposed via property. You can hide each of the buttons depending on your case. 

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Ian
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 16 Oct 2023, 07:59 AM

Ah - that looks excellent -I'll give it a try.

As for disabling buttons on the Ribbon Bar, do you know it this improves the performance, if I disable lots of options?

Dinko | Tech Support Engineer
Telerik team
commented on 16 Oct 2023, 11:08 AM

I hope the suggested code will work for you. As for the spreadsheet ribbon bar, disabling the buttons won't take a role in the performance. The internal logic of binding the commands will still be executed.

Tags
ChartView Spreadsheet
Asked by
Ian
Top achievements
Rank 2
Bronze
Iron
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Ian
Top achievements
Rank 2
Bronze
Iron
Iron
Share this question
or