How to programatically trigger GraphicalViewItemFormatting

1 Answer 8 Views
GanttView
Ian
Top achievements
Rank 2
Bronze
Iron
Iron
Ian asked on 16 Jul 2025, 09:03 AM

Simple question: I want to change the color of some tasks, to show when they are on the critical path.

So I simply want to trigger GraphicalViewItemFormatting, which does all the coloring. At the monent, the event fires when i move the mouse over the task ,which proves it all works, but I need to trigger the re-draw from my calculateCritcalPath method. 

 

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 16 Jul 2025, 11:55 AM

Hello, Ian,

To programmatically trigger the GraphicalViewItemFormatting event and force the RadGanttView to redraw its tasks after your calculateCriticalPath method, you can call the Update method on the GraphicalViewElement. This will refresh the view and apply your custom formatting logic immediately.

Here’s how you can do it:

this.radGanttView1.GanttViewElement.GraphicalViewElement.Update(RadGanttViewElement.UpdateActions.Reset);

    I hope this helps. If you have any other questions, please let me know.

    Regards,
    Nadya | 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 17 Jul 2025, 11:06 AM

    Perfect!!!

    (A slightly related question: I'm now using ChatGPT in both Visual Studio, and externally, to help write my code. And it's really, really bad at helping me to use your tools - it sort of makes-up method names which it thinks might work, and they mostly don't. Is there anything you can do to make this any better? Maybe an AI instance on your site which really knows what your code does? Over the many years I've been using your frameworks, their size and complexity is a real barrier to use: AI might be missing piece of the puzzle.  Feel free to move this to  more appropriate place)

    But your online support is still excellent!

    Nadya | Tech Support Engineer
    Telerik team
    commented on 17 Jul 2025, 01:15 PM

    Hello, Ian,

    I am really glad to hear that the suggested approach works. 

    Thank you for sharing your feedback about working with AI tools. I am thrilled to inform you that we are working in the direction to provide to our customers with a solution that can interact with AI and assist you while developing applications, specifically with Telerik controls. For now, we have officially launched the AI Coding Assistant available for Telerik Blazor product.

    We also have it in our plans to introduce a similar tool for code generation for Telerik UI for WinForms soon. You can cast your vote for this item or add your comments to it: AI Coding Assistant - WinForms.

    Regards,
    Nadya

     

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