Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
805
Two columns bound to one key?
posted

One of my users would like to see a timestamp (optionally) separated into separate Time and Date columns. It's easy to create one or the other with the appropriate format string, but can I have two columns both bound to the same key?

Maury

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi Maury,

    What you could do is hide the "real" bound column and add a couple of unbound columns. You would use the InitializeRow event of the grid to copy the value of the bound column into both unbound columns. Then you could format one unbound column for the dates and one for the times.

    If these fields are updateable, then you would need to reverse this process and combine the date and time from the unbound columns into a single value and update the bound column - probably using the BeforeRowUpdate event.

Children