how to hide a row in datagridview in vc# 2005 ?
-
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++; }
-
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++; }
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!!!