Cell border color depend on row number

7 posts, 1 answers
  1. MEG.IR
    MEG.IR avatar
    8 posts
    Member since:
    Aug 2011

    Posted 03 Feb 2015 Link to this post

    hi
    I used RadHeatMap for dispaly busy rooms of a hotel liek Picture1. How can i have style like Picture2(seprate each floor by a bold line)
    thanks
  2. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 06 Feb 2015 Link to this post

    Hi Mostafa,

    This is not possible out-of-the-box with RadHeatMap as unlike other controls from our suite RadHeatMap renders to WriteableBitmap thus there are no ways that you can style it after being rendered. What I can suggest is that you create a custom control that will position Horizontal Lines over the HeatMapColorGrid.

    Regards,
    Evgenia
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
  4. MEG.IR
    MEG.IR avatar
    8 posts
    Member since:
    Aug 2011

    Posted 06 Feb 2015 Link to this post

    Thank you for your response. But perhaps I am not able rightly to say. The photos are just for show is what I want. I wish I had something like RowStyleSelectors in RadGridView. I want 5th and 10th and 15th rows have thicker bottom border. And how can i use style to do that?

    Thanks
  5. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 10 Feb 2015 Link to this post

    Hi,

    Please mind that RadHeatMap is quite different than RadGridView. It doesn't have notion for rows and columns. In fact it is a matrix-like control that encode colored values along two axes. These values (cells) can not be styled independently as the control uses a bitmap-based rendering i.e. as I previously mentioned renders a WriteableBitmap image. You can easily see this if you inspect the control's visual tree with XAML Spy for example. So practically there is no way that you can have Grid-like styles applied on an image. What we can suggest you is that you create your own custom control and plug it to the HeatMapColorGrid template. What this control should do is calculate the rows count and columns count of the HeatMap and provide some logic for drawing a horizontal line after a specified row position.

    Regards,
    Evgenia
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. MEG.IR
    MEG.IR avatar
    8 posts
    Member since:
    Aug 2011

    Posted 11 Feb 2015 Link to this post

    Thanks for your reply. Can you give me a sample using of HeatMapColorGrid.
    thanks again
  7. Answer
    Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 13 Feb 2015 Link to this post

    Hello Mostafa,

    I am attaching a simple project where I have demonstrated Evgenia's proposal. You need to retemplate the heat map so that you can plug in a custom control right next to the heat map color grid. The custom control is the one that is responsible for rendering the horizontal lines.

    Surely this is just an example project and you will need to modify it so that it fulfills your exact requirements. Let us know how it goes.

    Regards,
    Petar Marchev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  8. MEG.IR
    MEG.IR avatar
    8 posts
    Member since:
    Aug 2011

    Posted 19 Feb 2015 Link to this post

    Hi Evgenia
    Thank you so much. Perfect answer.
    Thanks again

    Regards
Back to Top
DevCraft banner