Results 1 to 2 of 2

Thread: Controlling forecolor on wpf datagrid row at app startup

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2009
    Location
    Garland TX
    Posts
    2

    Controlling forecolor on wpf datagrid row at app startup

    I am using VS2013 express wpf vb.net. On startup, I have the app populate a datagrid bound to an observablecollection, so that the datagrid acts like an activity log. I dynamically add rows to that datagrid. However, on that datagrid based activity log, I want to be able to add selective rows with a red forecolor, as a way of logging when a system problem has occurred and needs attention.

    The problem that I am facing is that I can programmatically select a specific datagrid row and change its forecolor, but only after I have clicked the datagrid with the mouse. On startup, I cannot anticipate that the user will click the datagrid with the mouse, so I would like a workaround. How do I gain control of programmatic datagrid row selection if the datagrid never gets clicked by the mouse?

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,986

    Re: Controlling forecolor on wpf datagrid row at app startup

    Moved to WPF.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width