Questions tagged [datagridviewrow]

Represents one row in DataGridView

Learn more about DataGridViewRow on MSDN.

110 questions
0
votes
1 answer

C# DataGridViewRow.Displayed bug for first row?

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…
Robin
  • 123
  • 7
0
votes
0 answers

Is array generated by CopyTo() still reference to its parent memory?

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…
Stan
  • 1
  • 2
0
votes
2 answers

How can I find the value of a cell that is a section of a datagridview specified row and column?

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…
0
votes
1 answer

How to Retrieve a new declared DataGridViewRow's value by Column Name (Not by index)?

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…
Ryan Tan
  • 344
  • 2
  • 11
0
votes
0 answers

.Net DataGridView difference between Rows.Add and Rows.AddRange with custom DataGridViewRow

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…
lhiapgpeonk
  • 457
  • 1
  • 5
  • 18
0
votes
1 answer

Hide all rows in DataGridView using VB

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…
0
votes
2 answers

Datagridview to array missing one row

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) &&…
PiggyChu001
  • 440
  • 6
  • 20
0
votes
0 answers

'Rows cannot be programmatically added to the DataGridView's rows collection when the control is data-bound.'

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…
0
votes
0 answers

Add a list of dataGridViewRows to DataGridView

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.
0
votes
2 answers

How to empty the current row of a DataGridView in C#?

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…
Kith
  • 117
  • 3
  • 17
0
votes
2 answers

Removing a row from data grid view

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…
Carla Fenech
  • 19
  • 2
  • 6
0
votes
0 answers

DataGridView ErrorText Tooltip more than 5 seconds

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…
Tizz
  • 820
  • 1
  • 15
  • 31
0
votes
1 answer

Vb.net Move A Datagridview Row to the last row when being edited

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…
charles
  • 55
  • 1
  • 10
0
votes
2 answers

DataGridView color rows

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…
0
votes
0 answers

DataGridViewAutoSizeRowMode enum value not valid

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…
Phillmac
  • 109
  • 7