Questions tagged [datagridviewrow]

Represents one row in DataGridView

Learn more about DataGridViewRow on MSDN.

110 questions
2
votes
0 answers

Why does it fail to access the cell value of a new DataGridViewRow after insertion to the DGV?

I know there are a couple of ways to create a new DataGridViewRow, see How to add a new row to datagridview programmatically I am currently creating a class that inherits from DGVR, so I cannot let the DGV create it by just adding values, I must…
Tobias Knauss
  • 3,361
  • 1
  • 21
  • 45
2
votes
1 answer

DataGridViewRow thread safety in Windows Forms .NET

In my continual quest to better understand thread-safe programming in .NET, I can't seem to get clarity on a question, so I'm hoping that someone on SO might be able to assist. I understand that a Windows Form Control should not be accessed by a…
blitz_jones
  • 1,048
  • 2
  • 10
  • 22
2
votes
2 answers

C# Dynamically add DataGridViewRow malfunction

I have a program that will add rows dynamically in certain conditions, I've tried implement the function in this way: if (student.UUID == AppliedStudent) { using (DataGridViewRow row = new DataGridViewRow()) { row.SetValues(new…
user1494994
1
vote
1 answer

Why doesn't my DataGridView have an index row or first row on the first load form in vb.net

Why doesn't my DataGridView have an index row or first row on the first load form in vb.net. is there something wrong with my code? Thanks Public Class Form1 Private itemtransfer As New List(Of ItemTransfer)() Private Sub…
roy
  • 693
  • 2
  • 11
1
vote
1 answer

How to rename and save files which are already on the list

my app has a function to read file names and display them in the first column one by one in the DataGridView. What I want to do is, if users type in new names in the second column next to its original name, and then press the 'save as' button, files…
LFLJM
  • 65
  • 10
1
vote
1 answer

C# using index r in other functions

I'm a C# beginner and like your input! I have a datagridview and want to do some stuff with the selected rows. I dont want to place all the tasks in one large function..... I'd like to split it up in seperate task-functions. I'm using 'r' to have…
Christophe
  • 39
  • 12
1
vote
1 answer

WPF how can i bind multiple properties in datagridrow

I've bind the static property in DataGridRow (not DataGridTextcolumn). How can I bind it? I already have bind a static property in a normal grid manually. Code is shown below(But now how to bind a property in DataGridRow-Wise).
CoderGreat
  • 11
  • 2
1
vote
1 answer

Rows is rendered twice when using RowPrePaint event of DataGridView

I tried using RowPrePaint event of DataGridView to set rows' BackColor conditionally. When I started my application, rows were rendered correctly but there was a problem that the rows were rendered twice. I am building an application using Windows…
1
vote
3 answers

Unable to change the background color of DataGridView cells

I'm attempting to loop through the rows within a datagridview and change the colour of a single cell depending on its stored value. I have tried the two methods below but neither work and no exceptions are thrown. 1: row.Cells[8].Style.BackColor =…
1
vote
2 answers

Why I am not getting value of last row of editable column of datagridview in C# winForms application?

I created user control which has datagridview control. And datagridview is getting data from textfile to create row and columns dynamically. I added that user control to panel. One column of dgv is editable. I want that editable column values in a…
User0804
  • 77
  • 2
  • 12
1
vote
2 answers

how to select datagridview row programmatically in c#

I need to select an entire row if a cell in column 0 contains specified value. I have a TextBox and DaraGridView.when I put a value exist in gridview row selected without problem But when a put doesn't exist in gridview the program throws an…
KAMAL96
  • 37
  • 1
  • 3
  • 8
1
vote
1 answer

C# DataGridView: combine multiple rows to one but keep originals

First of all: I am going to provide an answer to this question myself, as soon as I'm done. But you may help me on my way to it, I will appreciate all of your advices. I have a DataGridView with different rows that belong together. My problem is to…
Tobias Knauss
  • 3,361
  • 1
  • 21
  • 45
1
vote
1 answer

Extending DataGridViewRow to have container span under columns

I am wondering if is possible to extend a DataGridVewRow so that I can a container like a Panel that spans under the usual columns. This will be filled with another DataGridView populated with child data. The Panel will be shown/hidden via a…
Hank
  • 2,456
  • 3
  • 35
  • 83
1
vote
2 answers

database connection to datagridview's row only

I Have requirement to fill the datagridview row by row . i.e. if 3rd row is currently selected then data needs to be filled in 3rd row (my query returns always single row ) . same for every row. some what like DataTable dt = new…
speedyraz
  • 335
  • 1
  • 5
  • 18
1
vote
0 answers

Inserting A Blank Row into DatagridView

All. I have a datagridview with Columns. I need to be able to add blank rows to an already populated grid. I have 10 textboxes in place along with a button "ADD." Upon the button click event it should add the blank row to the datagridview, however,…
JTroy
  • 7
  • 3