I want to select values in a datagridview.
then select a value from a dropdown box
then press a button and have the value selected in the drop down box populate all the values that were selected (highlighted) in the datagridview.
I am using c# winform application.
Thank you in advance for any help. I've been trying to search all over the web and unable to find a way to do this. Thank you again.
Sarah GoodPosted Jan 9, 2017, 4:29 PM
This is what I've got so far. I am receiving errors however on what is highlighted in yellow.
ERROR Description: Error 4 'object' does not contain a definition for 'Value' and no extension method 'Value' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?) C:\Users\nbk50hw\Documents\Visual Studio 2013\Projects\beta1\beta1\Form1.cs 109 68 beta1
private void button1_Click(object sender, EventArgs e)
{
foreach (var c in advancedDataGridView1.SelectedCells)
{
db_reconDataSet.Rows[c.RowIndex][c.ColumnIndex] = c.Value;
}
advancedDataGridView1.DataSource = db_reconDataSet;
}
Sarah GoodPosted Jan 9, 2017, 1:35 PM
how do I get the row number for the of the selected rows of datagridview?
AnkushPosted Jan 9, 2017, 12:42 PM
Sarah GoodPosted Jan 9, 2017, 9:27 AM
So when ever some one presses the button "Update Selected Datagridview" I want the value of "Mike" to replace the highlighted blue values in the datagridview. Is that possible?
Sarah GoodPosted Jan 9, 2017, 9:12 AM
AnkushPosted Jan 8, 2017, 11:39 PM