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. C#
  4. how to hide a row in datagridview in vc# 2005 ?

how to hide a row in datagridview in vc# 2005 ?

Scheduled Pinned Locked Moved C#
helpcsharptutorialquestion
2 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.
  • H Offline
    H Offline
    hdv212
    wrote on last edited by
    #1

    hi i want to set myDatagridView.Rows[i].Visible = false; but the Following error has shown me : Row associated with the currency manager's position cannot be made invisible How to solve problem and hide each Row that i select at runtime without this error ? My Code is : int i = 0; while (i < this.dataGridView1.Rows.Count) { DataGridViewRow GridViewrow = this.dataGridView1.Rows[i]; if (GridViewrow.Cells[0].ToString() == "True") { } else GridViewrow.Visible = false; //error in this line i++; }

    V 1 Reply Last reply
    0
    • H hdv212

      hi i want to set myDatagridView.Rows[i].Visible = false; but the Following error has shown me : Row associated with the currency manager's position cannot be made invisible How to solve problem and hide each Row that i select at runtime without this error ? My Code is : int i = 0; while (i < this.dataGridView1.Rows.Count) { DataGridViewRow GridViewrow = this.dataGridView1.Rows[i]; if (GridViewrow.Cells[0].ToString() == "True") { } else GridViewrow.Visible = false; //error in this line i++; }

      V Offline
      V Offline
      vykom
      wrote on last edited by
      #2

      Well I'm not totally sure, but I can tell you're having a BindingSource problem. In my expirience, I wouldn't be able to edit almost nothing usingn BingdingSource or TableAdapters, because we can not mess with the internal managment of the .NetFramework. Solution: Fill the DataGridView manually using sql querry, it should solve the problem.. (I mean manually exactly how it sounds.. row by row and Cell by Cell) good luck. (sorry my english)

      ___________________________ vykom's best. Free your mind! use GPL. up to open source!!!

      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