Click here to Skip to main content
15,881,882 members
Home / Discussions / C#
   

C#

 
QuestionTrimEnd? Pin
dec824-Nov-08 22:21
dec824-Nov-08 22:21 
AnswerRe: TrimEnd? Pin
Ashfield4-Nov-08 22:25
Ashfield4-Nov-08 22:25 
GeneralRe: TrimEnd? Pin
dec824-Nov-08 22:47
dec824-Nov-08 22:47 
AnswerRe: TrimEnd? Pin
Guffa5-Nov-08 2:53
Guffa5-Nov-08 2:53 
GeneralRe: TrimEnd? Pin
Guffa5-Nov-08 3:22
Guffa5-Nov-08 3:22 
AnswerRe: TrimEnd? Pin
Pedram Behroozi4-Nov-08 23:43
Pedram Behroozi4-Nov-08 23:43 
AnswerRe: TrimEnd? [modified] Pin
Guffa5-Nov-08 3:21
Guffa5-Nov-08 3:21 
Questiondatagridview checkbox [modified] Pin
arkiboys4-Nov-08 20:57
arkiboys4-Nov-08 20:57 
I have a checkbox field in the datagridview control as column 1 called "Select" as the name of the column.
When the user selects this checkbox for any row, I would like to run some code and based on an if statement to set this checkbox to false.
I am running this as follows but the checkbox is set to true i.e checked and can not change it to unchecked.
What am I doing wrong please?

private void dgv_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex >= 0)
{
if (dgv.Columns[e.ColumnIndex].Name.ToLower() == "select")
{
int intSecuritySetting = Convert.ToInt32(dgv.Rows[e.RowIndex].Cells["SecuritySetting"].Value);

if (intSecuritySetting == 0)
{
//Make sure the security check is set to false...
dgv.Rows[e.RowIndex].Cells["Select"].Value = CheckState.Unchecked;

}
}
}
}

modified on Wednesday, November 5, 2008 4:06 AM

AnswerRe: datagridview checkbox Pin
cocoonwls4-Nov-08 23:25
cocoonwls4-Nov-08 23:25 
AnswerRe: datagridview checkbox Pin
dan!sh 5-Nov-08 0:24
professional dan!sh 5-Nov-08 0:24 
QuestionCreating a number of buttons with different onclick commands Pin
Matjaz-xyz4-Nov-08 19:39
Matjaz-xyz4-Nov-08 19:39 
AnswerRe: Creating a number of buttons with different onclick commands Pin
cocoonwls4-Nov-08 20:30
cocoonwls4-Nov-08 20:30 
AnswerRe: Creating a number of buttons with different onclick commands Pin
Pedram Behroozi4-Nov-08 22:32
Pedram Behroozi4-Nov-08 22:32 
GeneralRe: Creating a number of buttons with different onclick commands Pin
cocoonwls4-Nov-08 23:15
cocoonwls4-Nov-08 23:15 
GeneralRe: Creating a number of buttons with different onclick commands Pin
Pedram Behroozi5-Nov-08 0:21
Pedram Behroozi5-Nov-08 0:21 
GeneralRe: Creating a number of buttons with different onclick commands Pin
Matjaz-xyz5-Nov-08 5:02
Matjaz-xyz5-Nov-08 5:02 
QuestionHow to detect arrows key in key press event handler? Pin
cocoonwls4-Nov-08 19:12
cocoonwls4-Nov-08 19:12 
AnswerRe: How to detect arrows key in key press event handler? Pin
Pedram Behroozi4-Nov-08 19:33
Pedram Behroozi4-Nov-08 19:33 
AnswerRe: How to detect arrows key in key press event handler? [modified] Pin
Matjaz-xyz4-Nov-08 19:34
Matjaz-xyz4-Nov-08 19:34 
AnswerRe: How to detect arrows key in key press event handler? [modified] Pin
cocoonwls4-Nov-08 20:10
cocoonwls4-Nov-08 20:10 
GeneralRe: How to detect arrows key in key press event handler? Pin
Pedram Behroozi4-Nov-08 22:35
Pedram Behroozi4-Nov-08 22:35 
GeneralRe: How to detect arrows key in key press event handler? Pin
cocoonwls4-Nov-08 23:12
cocoonwls4-Nov-08 23:12 
AnswerRe: How to detect arrows key in key press event handler? Pin
dan!sh 4-Nov-08 22:03
professional dan!sh 4-Nov-08 22:03 
GeneralRe: How to detect arrows key in key press event handler? Pin
cocoonwls4-Nov-08 23:15
cocoonwls4-Nov-08 23:15 
GeneralRe: How to detect arrows key in key press event handler? Pin
dan!sh 5-Nov-08 0:16
professional dan!sh 5-Nov-08 0:16 

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.