Click here to Skip to main content
15,890,579 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to edit Dataset value (NOT DATA GRID) Pin
kstls4-Aug-09 0:25
kstls4-Aug-09 0:25 
GeneralRe: How to edit Dataset value (NOT DATA GRID) Pin
sacr834-Aug-09 1:42
sacr834-Aug-09 1:42 
GeneralRe: How to edit Dataset value (NOT DATA GRID) Pin
sacr834-Aug-09 1:47
sacr834-Aug-09 1:47 
GeneralRe: How to edit Dataset value (NOT DATA GRID) Pin
kstls4-Aug-09 2:14
kstls4-Aug-09 2:14 
AnswerRe: How to edit Dataset value (NOT DATA GRID) Pin
Fired.Fish.Gmail4-Aug-09 1:36
Fired.Fish.Gmail4-Aug-09 1:36 
GeneralRe: How to edit Dataset value (NOT DATA GRID) Pin
sacr834-Aug-09 2:01
sacr834-Aug-09 2:01 
AnswerRe: How to edit Dataset value (NOT DATA GRID) Pin
vinodkrebc4-Aug-09 2:20
vinodkrebc4-Aug-09 2:20 
QuestionChange the EditedFormattedValue of a cell in a DataGridView Pin
RobScripta3-Aug-09 23:51
professionalRobScripta3-Aug-09 23:51 
Hello,

I have a bound DataGridView with one of the columns bound to a date field. If date is entered as 31-08-2009 everything works fine, but user wants to fill in the date as 31082009 (European format).

On the cell leave event I have:

if (this.dgvInvoice.Columns[e.ColumnIndex].Name == "DateColumn")
{
string DateText = this.dgvInvoice.Rows[e.RowIndex].Cells["DateColumn"].EditedFormattedValue.ToString();

try
{

this.dgvInvoice.Rows[e.RowIndex].Cells["DateColumn"].Value =
customfunction(DateText);

}
catch
{
this.dgvInvoice.Rows[e.RowIndex].Cells["DateColumn"].Value = DateTime.Today;
}
}

}

The customfunction returns a date like 31-08-2009. The try goes well, but still I have an exception that it's not a valid DateTime.
The EditedFormattedValue is not writeable, and after I set the Value, the EditedFormattedValue is still the same.

How can I solve this ?

Thanks in advance.

Rob
AnswerRe: Change the EditedFormattedValue of a cell in a DataGridView Pin
Hristo-Bojilov4-Aug-09 0:27
Hristo-Bojilov4-Aug-09 0:27 
GeneralRe: Change the EditedFormattedValue of a cell in a DataGridView Pin
RobScripta4-Aug-09 0:45
professionalRobScripta4-Aug-09 0:45 
GeneralRe: Change the EditedFormattedValue of a cell in a DataGridView Pin
Hristo-Bojilov4-Aug-09 0:57
Hristo-Bojilov4-Aug-09 0:57 
GeneralRe: Change the EditedFormattedValue of a cell in a DataGridView Pin
RobScripta4-Aug-09 1:01
professionalRobScripta4-Aug-09 1:01 
GeneralRe: Change the EditedFormattedValue of a cell in a DataGridView Pin
Hristo-Bojilov4-Aug-09 1:35
Hristo-Bojilov4-Aug-09 1:35 
GeneralRe: Change the EditedFormattedValue of a cell in a DataGridView Pin
RobScripta4-Aug-09 2:28
professionalRobScripta4-Aug-09 2:28 
AnswerRe: Change the EditedFormattedValue of a cell in a DataGridView Pin
RobScripta4-Aug-09 0:51
professionalRobScripta4-Aug-09 0:51 
QuestionHow to compare the text in two files using c#? Pin
svt gdwl3-Aug-09 23:46
svt gdwl3-Aug-09 23:46 
AnswerRe: How to compare the text in two files using c#? Pin
stancrm4-Aug-09 0:01
stancrm4-Aug-09 0:01 
AnswerRe: How to compare the text in two files using c#? Pin
vinodkrebc4-Aug-09 2:25
vinodkrebc4-Aug-09 2:25 
QuestionClass/Control Document File Viewer Pin
egpuyos3-Aug-09 23:44
egpuyos3-Aug-09 23:44 
AnswerRe: Class/Control Document File Viewer Pin
dan!sh 4-Aug-09 1:12
professional dan!sh 4-Aug-09 1:12 
GeneralRe: Class/Control Document File Viewer Pin
egpuyos4-Aug-09 2:34
egpuyos4-Aug-09 2:34 
GeneralRe: Class/Control Document File Viewer Pin
dan!sh 4-Aug-09 5:34
professional dan!sh 4-Aug-09 5:34 
GeneralRe: Class/Control Document File Viewer Pin
egpuyos4-Aug-09 15:06
egpuyos4-Aug-09 15:06 
Questionconvert video to flash format Pin
RajaAhmed3-Aug-09 23:24
RajaAhmed3-Aug-09 23:24 
AnswerRe: convert video to flash format Pin
stancrm3-Aug-09 23:38
stancrm3-Aug-09 23:38 

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.