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

Get Cell FontWeight On ElementExporting Event

3 Answers 39 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jignesh Sodvadiya
Top achievements
Rank 1
Jignesh Sodvadiya asked on 22 Jul 2015, 01:33 PM

Hello,

 

I am Using Silverlight RadGridView Control for Report Purpose.

 

On CellLoading Event I am set some Font Style like as Font Weight or Font Style while I am exporting then how I access Font Style.

 

 

Thanks,

Jignesh

 

 

 

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 27 Jul 2015, 10:24 AM
Hello Jignesh,

I assume that you meant CellLoaded event of RadGridView, as the control does not expose CellLoading one. However, applying styles in such way directly on the visual elements is not recommended due to the virtualized nature of the control. I suggest you using the CellStyle property of GridViewDataColumn instead. You can check the Styling Cells topic for more information on the matter.

As for your question, can you please share some details which exporting functionality of RadGridView are you using and what is your intention to access the applied style?

Best Regards,
Stefan X1
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Jignesh Sodvadiya
Top achievements
Rank 1
answered on 27 Jul 2015, 10:57 AM

Hi Stefan,

 Thanks for your reply.

Sorry you not getting me.

 I am set Cell FontWeight Property on CellLoading Event and It working Fine.But I want that FontWeight Value on ElementExporting Event.

 

Thanks,

JIgnesh

    
0
Stefan
Telerik team
answered on 29 Jul 2015, 12:02 PM
Hi Jignesh ,

You can check RadGridView's API reference, as a confirmation that CellLoading event is not supported. I am pretty sure that you meant the CellLoaded one.

As I mentioned in my previous post, styling the elements directly is not recommended, and that is why you won't find a clean approach for getting the styles applied in ElementExporting event handler. Basically, the control is not meant to be used in such way, due to its virtualized nature.

The proper way would be to work on data-level. You can define a CellStyleSelector and through the ElementExported event you can get the currently exported item through GridViewElementExportedEventArgs Context property, thus determine the applied visual modifications.

Hope this helps.

Best Regards,
Stefan
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
Jignesh Sodvadiya
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Jignesh Sodvadiya
Top achievements
Rank 1
Share this question
or