Results 1 to 11 of 11

Thread: [RESOLVED] Hide row in datagrid

  1. #1

    Thread Starter
    Fanatic Member amrita's Avatar
    Join Date
    Jan 2007
    Location
    Orissa,India
    Posts
    888

    Resolved [RESOLVED] Hide row in datagrid

    How to hide a row in a data grid in VB.NET 2003 ?

  2. #2
    Hyperactive Member mrmojorisin's Avatar
    Join Date
    Oct 2007
    Location
    London Town Vocation: Garden Cricket Genuis
    Posts
    439

    Re: Hide row in datagrid

    Have a look here, may help?

  3. #3

    Thread Starter
    Fanatic Member amrita's Avatar
    Join Date
    Jan 2007
    Location
    Orissa,India
    Posts
    888

    Re: Hide row in datagrid

    Thanks.But Its in a web app (ASP.NET).I need this functionality in a windows form.

  4. #4
    Lively Member
    Join Date
    Apr 2008
    Posts
    92

    Re: Hide row in datagrid

    Did you try:

    Code:
    DataGridView1.Rows(X).Visible = False
    Where x is the index of the row you want hidden?

  5. #5

    Thread Starter
    Fanatic Member amrita's Avatar
    Join Date
    Jan 2007
    Location
    Orissa,India
    Posts
    888

    Smile Re: Hide row in datagrid

    I can't find DataGrid.Rows property ?

    its in vb.net VS 2003

    Did you try that one ?

  6. #6
    Hyperactive Member mrmojorisin's Avatar
    Join Date
    Oct 2007
    Location
    London Town Vocation: Garden Cricket Genuis
    Posts
    439

    Re: Hide row in datagrid

    DataGridView has that property but im not sure DataGrid does.

    Try DataGrid.Item(x)

  7. #7
    Lively Member
    Join Date
    Apr 2008
    Posts
    92

    Re: Hide row in datagrid

    My mistake, I missed that it wasn't a DataGridView. That's what not paying attention gets you.

  8. #8

    Thread Starter
    Fanatic Member amrita's Avatar
    Join Date
    Jan 2007
    Location
    Orissa,India
    Posts
    888

    Re: Hide row in datagrid

    Got it solved in a different way..thanks anyways.
    thanks
    amrita

  9. #9
    Hyperactive Member mrmojorisin's Avatar
    Join Date
    Oct 2007
    Location
    London Town Vocation: Garden Cricket Genuis
    Posts
    439

    Re: [RESOLVED] Hide row in datagrid

    How did u do it, if you dont mind. Would be good to know for future reference?!

  10. #10

    Thread Starter
    Fanatic Member amrita's Avatar
    Join Date
    Jan 2007
    Location
    Orissa,India
    Posts
    888

    Re: [RESOLVED] Hide row in datagrid

    I've added a new column as IsVisible to the main table and as per my condition made to have values True or false

    Then impoted only those rows which has a value of True in InVisible column to a new datatable and made it the source of grid.
    thanks
    amrita

  11. #11
    Hyperactive Member mrmojorisin's Avatar
    Join Date
    Oct 2007
    Location
    London Town Vocation: Garden Cricket Genuis
    Posts
    439

    Re: [RESOLVED] Hide row in datagrid

    Sounds like a plan! Good luck!

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