Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. data grid styles

data grid styles

Scheduled Pinned Locked Moved Visual Basic
helpcssdatabasewpfquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kowplunk
    wrote on last edited by
    #1

    what if you want different table styles pointing to the same table. The app that I am working on is one that is used to correct tests. There is more than one type of error. Right now I have all the data being retrieved and thrown into the same table. I may have to change this is base the query on the correction mode and insert the data into different datatables, I really should do this, but I am still curious of the present problem. I would like to create tablestyles, which I though that I did, so that in the different correction modes different columns are displayed, but I get an error when I try to do this: An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll Additional information: The data grid table styles collection already contains a table style with the same mapping name. Now they are the same mapping name, because the mapping name is the name of the table right? Thanks for the help

    J 1 Reply Last reply
    0
    • K kowplunk

      what if you want different table styles pointing to the same table. The app that I am working on is one that is used to correct tests. There is more than one type of error. Right now I have all the data being retrieved and thrown into the same table. I may have to change this is base the query on the correction mode and insert the data into different datatables, I really should do this, but I am still curious of the present problem. I would like to create tablestyles, which I though that I did, so that in the different correction modes different columns are displayed, but I get an error when I try to do this: An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll Additional information: The data grid table styles collection already contains a table style with the same mapping name. Now they are the same mapping name, because the mapping name is the name of the table right? Thanks for the help

      J Offline
      J Offline
      Jim Matthews
      wrote on last edited by
      #2

      hey kowplunk, sorry about the delay in my response, i was out of town for a few days. :-D anyways, the cleaner way to handle it would be to have the different data loaded into different tables and have the appropriate tablestyle handle the appropriate table. however, i can't say for sure that this is the case as i have no idea what the table structure looks like, what the resulting data looks like etc. i guess if you have the same data but you want to display it in different ways you could just load everything into the same table, then when you need to change the way the data is displayed, release the mapping name of the current tablestyle (via code) and then set the mapping name of the secondary one. as you found out you can't have two tablestyles pointing to the same table at the same time. however, if you're intention is to show different columns etc. at different points, i think you might be better off with the multiple table solution.


      -jim

      K 1 Reply Last reply
      0
      • J Jim Matthews

        hey kowplunk, sorry about the delay in my response, i was out of town for a few days. :-D anyways, the cleaner way to handle it would be to have the different data loaded into different tables and have the appropriate tablestyle handle the appropriate table. however, i can't say for sure that this is the case as i have no idea what the table structure looks like, what the resulting data looks like etc. i guess if you have the same data but you want to display it in different ways you could just load everything into the same table, then when you need to change the way the data is displayed, release the mapping name of the current tablestyle (via code) and then set the mapping name of the secondary one. as you found out you can't have two tablestyles pointing to the same table at the same time. however, if you're intention is to show different columns etc. at different points, i think you might be better off with the multiple table solution.


        -jim

        K Offline
        K Offline
        kowplunk
        wrote on last edited by
        #3

        Thanks for the help. Actually the error message was pretty descriptive. In the different styles that I had there was column mapping names that were the same and it doesn't like that, but it is easy to change. Everything is working awesome now. Thanks again.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups