Thread: GridViewControl

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    385

    GridViewControl

    I am using a "GridViewControl" with 14 columns and with this code below I can set the number "1" to the First Column and 21 Rows down.
    What I wonder is how I access for example column 3 and row 1 or column 4 and row 2 etc...
    What is the way/syntax to do this ?
    I am not sure wich one of all column.. members to use here.

    Code:
    String^ Numbers = "1";
    
    for( int i = 0; i < 20; i++)
    {
    	MainResultGrid->Rows->Add(Numbers);
    }

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    I can't really make out what you're asking, but if you're trying to access the cell at a specific row and column you could use something this:
    Code:
    int Row = 12;
    int Column = 34;
    dataGridView1.Rows[Row].Cells[Column].Value = "Hello";
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    385
    Great thanks, that was exactly what I was looking for and it works fine.

Popular pages Recent additions subscribe to a feed