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. Managed C++/CLI
  4. datagridview data

datagridview data

Scheduled Pinned Locked Moved Managed C++/CLI
questiondata-structureshelp
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.
  • X Offline
    X Offline
    Xeef
    wrote on last edited by
    #1

    hi agein to all array^row0 = {"11/22/1968","29"}; DataGridView1->Rows->Add( row0 ); row0[0]="2"; Object^ a= DataGridView1->DataSource; a[0]="123"; error C3915: 'System::Object' has no default indexed property (class indexer) how do i acces the rows after they are created / aplyed i havent try it but i am prety sure i coud overwrite it like DataGridView1->Rows->Add( somethingelse ); mayby not whit add :p it woud just append / push it in this case any way the question is how can i acces it streigt to replace data something like DataSource[row][col]= "my new value"; i not wana use databinding to a data base as the data are live generated and i dont think it woud make thinks easyer any way ;) on top if this is there any way to list the content and types whats in an object some recursive loop wich woud rotate truh all elements of the object by it an array a mullti dim array or what ever object combination

    T 1 Reply Last reply
    0
    • X Xeef

      hi agein to all array^row0 = {"11/22/1968","29"}; DataGridView1->Rows->Add( row0 ); row0[0]="2"; Object^ a= DataGridView1->DataSource; a[0]="123"; error C3915: 'System::Object' has no default indexed property (class indexer) how do i acces the rows after they are created / aplyed i havent try it but i am prety sure i coud overwrite it like DataGridView1->Rows->Add( somethingelse ); mayby not whit add :p it woud just append / push it in this case any way the question is how can i acces it streigt to replace data something like DataSource[row][col]= "my new value"; i not wana use databinding to a data base as the data are live generated and i dont think it woud make thinks easyer any way ;) on top if this is there any way to list the content and types whats in an object some recursive loop wich woud rotate truh all elements of the object by it an array a mullti dim array or what ever object combination

      T Offline
      T Offline
      teejayem
      wrote on last edited by
      #2

      If i'm following you right i think you wanna do something like this

                  DataGridView^ dgv = gcnew DataGridView();
      
                  //---Add rows to the DataGridView
      
      
                  //this
                  dgv->Rows\[0\]->Cells\[0\]->Value = "new date";
                  dgv->Rows\[0\]->Cells\[1\]->Value = "new number";
      
                  //or this
                  dgv\[0, 0\]->Value = "new date";
                  dgv\[0, 1\]->Value = "new number";
      

      Don't be overcome by evil, but overcome evil with good

      X 1 Reply Last reply
      0
      • T teejayem

        If i'm following you right i think you wanna do something like this

                    DataGridView^ dgv = gcnew DataGridView();
        
                    //---Add rows to the DataGridView
        
        
                    //this
                    dgv->Rows\[0\]->Cells\[0\]->Value = "new date";
                    dgv->Rows\[0\]->Cells\[1\]->Value = "new number";
        
                    //or this
                    dgv\[0, 0\]->Value = "new date";
                    dgv\[0, 1\]->Value = "new number";
        

        Don't be overcome by evil, but overcome evil with good

        X Offline
        X Offline
        Xeef
        wrote on last edited by
        #3

        :-D thx a lot ! exctly what i need

        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