>When the cell got focus data time picker control apeare.ok
So you derived from DataGridColumnS tyle. Maybe you don't write the selected
value(in the DateTime picker) into the row of your datasource.
You should associate an eventhandler to the event
DateTime.Select edValueChanged. In this event handler you need to write
something like:
private void myDTPicker(obje ct sendere, EventArgs e)
{
this.ColumnStar tedEditing(this .myDateTimePick er);
}
You also should associate an event handler to the Leave event of the
DateTimePicker control
private void myDTPicker(obje ct sendere, EventArgs e)
{
myDTPicker.Hide ();
}
And finally, you should override the Commit method of the base class:
protected overrides bool Commit(System.W indows.Forms.Cu rrencyManager
dataSource , int rowNum )
{
if(rowNum>-1 && dataSource!=nul l)
this.SetColumnV alueAtRow(dataS ource, rowNum,
myDtPicker.Sele ctedValue);
}
Be also sure you are painting(in the Paint method) the value from the
DataSource, that is: (DateTime)this. GetColumnValue( source,rowNum)
Ernest
"Qumer Mumtaz" <an*******@disc ussions.microso ft.com> wrote in message
news:CB******** *************** ***********@mic rosoft.com...
Values is disapeared..... ..............t here is no value in the cell
intially. When the cell got focus data time picker control apeare.ok I make a selction of date, so for as the focus is on the current cell data
time picker is visible. when focus is lost the control is disappeared and value as well. What I
wanna do is,when focus is lost the cell date time control must disappeare
and the selected value becomes the current text of the cell.Just as happened
in MS Project's Gentt Chart.