Questions tagged [datagridviewbuttoncolumn]

The DataGridViewButtonColumn is a DataGridViewColumn implementation for Button cells

Learn more about DataGridViewButtonColumn on MSDN.

39 questions
0
votes
0 answers

Is it possible to save an currently selected row to a database?

In the DataGridView if you just have edited an field, you have to deselect or change the currently selected row in order for the changes to be applied in the database. I was wondering if there is way to deselect the current row so I can update the…
0
votes
1 answer

Get value of button clicked in DataGridView bound to a DataTable

I have a DataGridView bound to a DataTable. I added a DataGridViewButtonColumn that serves as the delete button for the row. Since it is bound to a DataTable, I'd like to be able to get the object of the row with the delete button clicked so I can…
Kate B
  • 65
  • 8
0
votes
0 answers

Datagridview Cell Index is changing or is incorrect VB.net

I have a datagridview that populates with two datagridviewbuttoncolumns(column 0 & 1) when the form loads. The datagridview is on a tab control.The tab with the datagridview is not the first tab to be shown. I need to be able to reference the cells…
0
votes
0 answers

Why will the new button column that I added not show up after I have added it?

Follow up from a previous question I have made: Getting and error I cannot fix when trying to add a button column After making the aforementioned corrections given by the accepted answer, my code will now build successfully. However, neither the…
0
votes
1 answer

Getting and error I cannot fix when trying to add a button column

I am having trouble fixing an error that I keep getting when I try to add a button column to my table. The error is: Argument 1: cannot convert from 'System.Windows.Forms.DataGridViewButtonColumn' to 'System.Web.UI.WebControls.DataControlField' It…
0
votes
1 answer

Manually fire button click event in DataGridView

I've got a DataGridView including a DataGridViewButtonColumn. The user should be able to use the button directly so I set EditMode to EditOnEnter. But, the first click didn't fire the Click event - It seems like the first click selects/focus the…
tmieruch
  • 191
  • 4
  • 14
0
votes
0 answers

Button event in GridView not responding. C#

I have a problem with my buttons in the grid view. It is not responding to my Response.Redirect("secondHistory.aspx") and my Console.WriteLine("hih"). Here is the HTML code
Chloven Tan
  • 65
  • 1
  • 6
0
votes
0 answers

How to disable a button in datagrid asp.net

I just want to ask how can I disable the first button (the one with "Test1") in datagrid (see attached picture). Below is my code in aspx page Please help in creating the codes in its code behind.
Gilbert
  • 11
  • 6
0
votes
1 answer

Set value to button in datagridview

I set value to button in datagridview in formload by the code below: DataGridViewButtonColumn btnDelete = new DataGridViewButtonColumn(); btnDeleteText = "Delete"; btnDelete.HeaderText = "Delete"; …
0
votes
1 answer

How to transfer text from From2 to dataGridView cell in Form1 in C#

I have a form that contains dataGridView with button cells. I also have a second form that has a textBox. how do I transfer the text from Form2 to the dataGridView on Form1? for example: I click on the dataGridView button cell to launch the second…
0
votes
0 answers

DataGridView button column image depends on the value

I have a button column in my grid that can have 0-1 integer value and it will show up(1) or down(0) image depends on the value. Also with the click event i want to toggle this value with image. btnClmnA1.HeaderText = ""; …
CanESER
  • 301
  • 1
  • 3
  • 19
0
votes
1 answer

DataGridView Button Column not showing image on CellPainting

I have a DataGridView with one button column. When I use the following code with image unblock3.png the image is displayed, but when I replace it with another image check1.png nothing is displayed. I tried resizing check1.png to smaller size but it…
Shoshotto
  • 93
  • 2
  • 8
0
votes
1 answer

Openfile on event

I am getting my feet wet with VB .Net programming (total novice). I have a DataGridView with amongst other information, a file path to where a particular document is stored. I have added a DataGridViewButtonColumn to the DataGridView, but I cannot…
Basil
  • 3
  • 4
0
votes
1 answer

Add DataGridViewComboBoxColumn to DataGridView, with different values in each row

Found many articles online, but to no avail for the solution I am looking for. My task: Add DataGridViewComboBoxColumn to datagridview, but each row should have different values in it's respective combobox. This is my code,…
scorpion35
  • 944
  • 2
  • 12
  • 30