Results 1 to 2 of 2

Thread: Set format for datagrid as a whole

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Posts
    219

    Question Set format for datagrid as a whole

    Is there a way to set the format for a datagrid as a whole in code? I know how to set it in design time but I want to set it in run time. Is there a way? If there is, would you mind providing the code or point me to a section that talks about it.

    Many thanks for any suggestion.

    ljCharlie

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Posts
    219

    Question

    I have three datasets that uses one datagrid to display the data. I need to format this datagrid to fit each dataset. However, I couldn't figure out how. Here's what I found out so far. In the DataGridTableStyle Collection Editor, I have created three members: 0, 1, 2. In each of these members, I have defined a GridColumnStyles collection in DataGridColumnStyle Collection Editor their properties. The problem I have right now is how do I call the DataGridTableStyle member at run time. I have three datasets that uses the same datagrid that is why I have three members in the DataGridTableStyle. But I can not figure out how to call the member that will correspond with a dataset that it is bind to the datagrid. Any help to do this task is greatly appreciated!

    ljCharlie

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