Results 1 to 4 of 4

Thread: [2005] gridview col visible =false

  1. #1

    Thread Starter
    Fanatic Member vishalmarya's Avatar
    Join Date
    Feb 2001
    Location
    New Delhi , INDIA
    Posts
    858

    Resolved [2005] gridview col visible =false

    i am populating a gridview control using its datasource property.

    visible prop of one of the columns of the gridview control is set false

    now on reading values from this hidden column , empty string is returned " ".

    my code :

    textbox1.text= mygrid.rows(0).cells(0).text

    it gives correct result if column is visible.

    but if i apply same code to datagrid control , it works fine.

    any suggestions

    thanks.
    Last edited by vishalmarya; Jan 13th, 2007 at 07:00 AM. Reason: resolved
    Vishal Marya, MCP .net 3.5
    My Site
    http://www.vstoolsgallery.com/
    http://visualstudiogallery.msdn.micr...b-f87a909b9266





    Please indicate what version of vb you use.
    Please mark your thread resolved using the Thread Tools above.
    -----------------------------------------

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] gridview col visible =false

    When a column is visible, you can read the data from it. Else you can't.

  3. #3

    Thread Starter
    Fanatic Member vishalmarya's Avatar
    Join Date
    Feb 2001
    Location
    New Delhi , INDIA
    Posts
    858

    Re: [2005] gridview col visible =false

    Quote Originally Posted by mendhak
    When a column is visible, you can read the data from it. Else you can't.
    thats horrible then. something which is available in datagrid ( .net 1.1) , it is not in gridview ( .net 2.0)

    i use hidden columns for my ids .
    Vishal Marya, MCP .net 3.5
    My Site
    http://www.vstoolsgallery.com/
    http://visualstudiogallery.msdn.micr...b-f87a909b9266





    Please indicate what version of vb you use.
    Please mark your thread resolved using the Thread Tools above.
    -----------------------------------------

  4. #4

    Thread Starter
    Fanatic Member vishalmarya's Avatar
    Join Date
    Feb 2001
    Location
    New Delhi , INDIA
    Posts
    858

    Re: [2005] gridview col visible =false

    Ok i got my answer. my apologies. i take my previous reply back.

    answer lies in DataKeyNames.

    http://forums.asp.net/897693/ShowPost.aspx
    Vishal Marya, MCP .net 3.5
    My Site
    http://www.vstoolsgallery.com/
    http://visualstudiogallery.msdn.micr...b-f87a909b9266





    Please indicate what version of vb you use.
    Please mark your thread resolved using the Thread Tools above.
    -----------------------------------------

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