Click here to Skip to main content
16,006,440 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can I find out which key was pressed Pin
snouto15-Aug-05 22:17
snouto15-Aug-05 22:17 
GeneralDataGrid Pin
econner15-Aug-05 19:04
econner15-Aug-05 19:04 
GeneralRe: DataGrid Pin
Alomgir Miah16-Aug-05 3:54
Alomgir Miah16-Aug-05 3:54 
GeneralDesigner problem Pin
Kerby15-Aug-05 18:34
Kerby15-Aug-05 18:34 
GeneralDateTimePicker in Datagrid Pin
deep715-Aug-05 17:57
deep715-Aug-05 17:57 
GeneralRe: DateTimePicker in Datagrid Pin
Alomgir Miah16-Aug-05 3:43
Alomgir Miah16-Aug-05 3:43 
GeneralRe: DateTimePicker in Datagrid Pin
deep716-Aug-05 20:52
deep716-Aug-05 20:52 
GeneralRe: DateTimePicker in Datagrid Pin
Alomgir Miah17-Aug-05 5:39
Alomgir Miah17-Aug-05 5:39 
Please override the Edit method of the DataGridDateTimePickerColumn control and Fire a custom event. Subscribe to the event in the usercontrol and do the processing.

protected override void Edit(System.Windows.Forms.CurrencyManager source, int row, System.Drawing.Rectangle bounds, bool readOnly, string instantText, bool cellIsVisible)
{
CustomEventArgs e = null;

this.row = row;
//
//Fire Event and Take Decision
//
if (this.CustomEvent != null)
{
e = new CustomEventArgs(row, this.column, isEnabled, bounds);
this.CustomEvent(this, e);
this.isEnabled = e.IsEnable;
this.isReadOnly = e.IsReadOnly;
}
if (this.isEnabled)
{
if (((CurrencyManager) source).Position == row)
{
base.Edit(source, row, bounds, readOnly, instantText, cellIsVisible);
this.source = source;
}
}
else
{
if (this.isReadOnly)
{
if (((CurrencyManager) source).Position == row)
{
base.Edit(source, row, bounds, true, instantText, cellIsVisible);
}
}
}
}


This is in the usercontrol

private void OnGridEnableDisable(object sender, CustomEventArgs e)
{
try
{
if (
this.hitTestGridInfo != null &&
this.hitTestGridInfo.Type == DataGridEx.HitTestType.RowHeader
)
{
e.IsEnable = false;
}
else
{
switch (e.Column) // remember to initialize the picker column with this index
{
case 4: // i.e. To Date
// put your logic
case 5: // From Date
}
}
}
catch
{
}
}

I hope this helps.

Live Life King Size
Alomgir Miah
Generalstil having csc.exe problems Pin
Heinz_15-Aug-05 17:49
Heinz_15-Aug-05 17:49 
GeneralRe: stil having csc.exe problems Pin
Vasudevan Deepak Kumar15-Aug-05 18:55
Vasudevan Deepak Kumar15-Aug-05 18:55 
GeneralRe: stil having csc.exe problems Pin
Guffa15-Aug-05 18:57
Guffa15-Aug-05 18:57 
Generalruntime compile problem Pin
sduhd15-Aug-05 16:36
sduhd15-Aug-05 16:36 
QuestionDo timers run out ? Pin
Christian Graus15-Aug-05 15:38
protectorChristian Graus15-Aug-05 15:38 
AnswerRe: Do timers run out ? Pin
S. Senthil Kumar15-Aug-05 23:49
S. Senthil Kumar15-Aug-05 23:49 
GeneralRe: Do timers run out ? Pin
Christian Graus16-Aug-05 13:21
protectorChristian Graus16-Aug-05 13:21 
GeneralRe: Do timers run out ? Pin
Robert M Greene16-Aug-05 15:05
Robert M Greene16-Aug-05 15:05 
GeneralRe: Do timers run out ? Pin
Christian Graus16-Aug-05 15:18
protectorChristian Graus16-Aug-05 15:18 
GeneralRe: Do timers run out ? Pin
Robert M Greene16-Aug-05 15:25
Robert M Greene16-Aug-05 15:25 
GeneralRe: Do timers run out ? Pin
Christian Graus16-Aug-05 15:29
protectorChristian Graus16-Aug-05 15:29 
GeneralRe: Do timers run out ? Pin
S. Senthil Kumar16-Aug-05 19:41
S. Senthil Kumar16-Aug-05 19:41 
GeneralRe: Do timers run out ? Pin
Christian Graus16-Aug-05 19:44
protectorChristian Graus16-Aug-05 19:44 
GeneralRe: Do timers run out ? Pin
S. Senthil Kumar17-Aug-05 1:01
S. Senthil Kumar17-Aug-05 1:01 
GeneralRe: Do timers run out ? Pin
Christian Graus17-Aug-05 11:43
protectorChristian Graus17-Aug-05 11:43 
Questionhow to pass data that i get from another computer to my database instead of to a text file? Pin
nidhelp15-Aug-05 15:24
nidhelp15-Aug-05 15:24 
AnswerRe: how to pass data that i get from another computer to my database instead of to a text file? Pin
Christian Graus15-Aug-05 15:30
protectorChristian Graus15-Aug-05 15:30 

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.