Click here to Skip to main content
15,897,315 members
Home / Discussions / C#
   

C#

 
QuestionHow do I get a image_click to work more than once? Pin
Fenix26-Oct-09 13:08
Fenix26-Oct-09 13:08 
AnswerRe: How do I get a image_click to work more than once? Pin
Christian Graus6-Oct-09 13:24
protectorChristian Graus6-Oct-09 13:24 
GeneralRe: How do I get a image_click to work more than once? Pin
Fenix26-Oct-09 14:22
Fenix26-Oct-09 14:22 
Generalwrong forum Pin
Luc Pattyn6-Oct-09 14:59
sitebuilderLuc Pattyn6-Oct-09 14:59 
GeneralRe: wrong forum Pin
Fenix26-Oct-09 16:12
Fenix26-Oct-09 16:12 
GeneralRe: wrong forum Pin
Fenix26-Oct-09 16:24
Fenix26-Oct-09 16:24 
GeneralRe: wrong forum Pin
Fenix26-Oct-09 16:25
Fenix26-Oct-09 16:25 
QuestionHow to change the button's value in Datagrid Pin
dwark1066-Oct-09 12:00
dwark1066-Oct-09 12:00 
Hi Everyone,

I am using button's obj in datagridview and set the flag as true to show the text value of the button (Name of the Button). If user clicks on the button, its changes the button’s name based upon the criteria. I am doing very simple code here.

I set button’s name as “buttonColumn.UseColumnTextForButtonValue = true;”

Now If I want to change the value with following settings. It did not work it out.

dataGridView1[e.ColumnIndex, e.RowIndex].Value = "America"; It is still taking "Name"

Can you please help me on this?

private void CreateButtonColumn()
{
// Initialize the button column.
DataGridViewButtonColumn buttonColumn = new DataGridViewButtonColumn();
// Add the button column to the control.


buttonColumn = new DataGridViewButtonColumn();

buttonColumn.Name = "Name";
buttonColumn.Text = "Name";
buttonColumn.Width = 110;
buttonColumn.UseColumnTextForButtonValue = true;
dataGridView1.Columns.Insert(0, buttonColumn);
dataGridView1.Rows.Add(2);
dataGridView1.CellClick += new DataGridViewCellEventHandler(dataGridView1_CellClick);
}

void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (Convert.ToInt32(e.ColumnIndex) == 0)
{
dataGridView1[e.ColumnIndex, e.RowIndex].Value = "America";
}
}


Thanks.
AnswerRe: How to change the button's value in Datagrid Pin
Henry Minute6-Oct-09 12:36
Henry Minute6-Oct-09 12:36 
GeneralRe: How to change the button's value in Datagrid Pin
dwark1066-Oct-09 13:58
dwark1066-Oct-09 13:58 
GeneralRe: How to change the button's value in Datagrid Pin
Henry Minute6-Oct-09 15:04
Henry Minute6-Oct-09 15:04 
QuestionHow do I pin an object in C#? [modified] - FIXED Pin
Richard Andrew x646-Oct-09 11:07
professionalRichard Andrew x646-Oct-09 11:07 
AnswerRe: How do I pin an object in C#? Pin
DaveyM696-Oct-09 11:35
professionalDaveyM696-Oct-09 11:35 
QuestionBackgroundworker disposal Pin
vsaratkar6-Oct-09 10:49
vsaratkar6-Oct-09 10:49 
AnswerRe: Backgroundworker disposal Pin
Christian Graus6-Oct-09 10:52
protectorChristian Graus6-Oct-09 10:52 
AnswerRe: Backgroundworker disposal Pin
DaveyM696-Oct-09 11:42
professionalDaveyM696-Oct-09 11:42 
GeneralRe: Backgroundworker disposal Pin
vsaratkar7-Oct-09 3:36
vsaratkar7-Oct-09 3:36 
GeneralRe: Backgroundworker disposal Pin
DaveyM697-Oct-09 8:57
professionalDaveyM697-Oct-09 8:57 
GeneralRe: Backgroundworker disposal Pin
vsaratkar8-Oct-09 2:54
vsaratkar8-Oct-09 2:54 
GeneralRe: Backgroundworker disposal Pin
vsaratkar9-Oct-09 10:17
vsaratkar9-Oct-09 10:17 
GeneralRe: Backgroundworker disposal Pin
DaveyM6910-Oct-09 3:25
professionalDaveyM6910-Oct-09 3:25 
Question.NET Runtime 2.0 Error Event ID: 5000 Pin
PrasannaKulkarni6-Oct-09 10:47
PrasannaKulkarni6-Oct-09 10:47 
AnswerRe: .NET Runtime 2.0 Error Event ID: 5000 Pin
Christian Graus6-Oct-09 10:50
protectorChristian Graus6-Oct-09 10:50 
QuestionC# grapihcs Pin
nosheen awan6-Oct-09 7:26
nosheen awan6-Oct-09 7:26 
AnswerRe: C# grapihcs Pin
Eddy Vluggen6-Oct-09 8:05
professionalEddy Vluggen6-Oct-09 8:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.