I have a Form where some Controls update according to the current displayed Rows (and their positions) in a DataGridView. So inside the dataGridView1.VerticalScrollBar.ValueChanged event I iterate through all rows and check wether they are displayed…
I want deepcopy of DataGridViewRows.
I have an DataGridViewRow array generated by DataGridView.Rows.CopyTo() function.
Is the array dgvra still reference to the same memory as items in DataGridView.Rows?
DGV_Comp is a DataGridView…
How do I find the section of a specified column and row?
I am having a datagridview as a table,as you can see in the picture below.
In the datagridview, the cells are containing rules. (TE',1) means it is the rule TE', and it is the 1st rule.
My…
I am attempting to store an exact copy of a DataGridViewRow into the same row's tag, everything works fine and the results are as it should be... except that when I try to retrieve the value using the column Name(at the last line of the code), it…
Curious behaviour of the DataGridViewControl cost me quite some time today.
TL;DR: Rows.Add(MyOwnFancyRow) adds a clone of MyOwnFancyRow to the DGV whereas Rows.AddRange(new MWERow[]{MyOwnFancyRow}) adds MyOwnFancyRow itself. Figured that out after…
I am trying to filter data in a DataGridView and I need to hide all rows and columns. I try to do this using looping list LINQ & lambda expressions because if I use a foreach it is slow when I try to filter 3000 rows.
The following code executes…
I have a DataGridView with a CheckBox first column.
I use the following Linq to get all the checked rows.
DataGridViewRow[] drs = dgvMain.Rows.Cast().Where(x =>(!Convert.IsDBNull(x.Cells[0].Value) &&…
I want to get user's input on how many rows he/she wants and then add that number of rows to the datagridview, while the datagridview is being populated with it's data.
This way an ecxeption occurs,System.InvalidOperationException.
Is there a work…
I have a list of DataGridViewRows like this
List DataGridViewRows list = new List DataGridViewRows ();
And i want to add it to my dataGridView and display it.
Sorry for missing <> in declare List, I'm new in StackOverFlow.
Thanks for your help.
I am developing a windows form application for a Books Store. In this application have a datagridview to select books for sale. If there are no items available in the stock I need to clear the current row values.So how can I do this. I tried…
Hi I am trying to remove rows from data grid view on certain conditions. I am successfully deleted rows however this is only working on the 1st condition.
When cell 6 is "" it is removed however when cell 6 is Status it is not. Could you please help…
Is there a way to increase the ToolTip display time on the ErrorText in a DataGridView Row? Its defaulted to 5 seconds (as all ToolTips are) but you can modify the time on a ToolTip when you create one, but I cant seem to change it on a…
I haven't found exactly what i need in the forums. I don't want to move selection or scroll index, all what I need to is to change the entire row with a specific index to be the last line in my datagridview.
I need this to happen automatically when…
Hi I am trying to change the data grid view rows back color. I managed to do this for one grid but for some reason another data gridview is not working.
The datagridviews are placed on a 2 different tabs using Tab Control. It works perfect for…
I have this error no matter what I do; I get an InvalidEnumArgumentException thrown when using the DataGridViewAutoSizeRowMode enum. I'm using Visual Studio 2015 currently, but the error also seems to be present in 2017.
Steps to reproduce:
create…