Get Cell FontWeight On ElementExporting Event

4 posts, 0 answers
  1. Jignesh Sodvadiya
    Jignesh Sodvadiya avatar
    10 posts
    Member since:
    May 2010

    Posted 22 Jul 2015 Link to this post

    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

     

     

     

  2. Stefan X1
    Admin
    Stefan X1 avatar
    523 posts

    Posted 27 Jul 2015 Link to this post

    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
  3. DevCraft banner
  4. Jignesh Sodvadiya
    Jignesh Sodvadiya avatar
    10 posts
    Member since:
    May 2010

    Posted 27 Jul 2015 in reply to Stefan X1 Link to this post

    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

        
  5. Stefan X1
    Admin
    Stefan X1 avatar
    523 posts

    Posted 29 Jul 2015 Link to this post

    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
Back to Top