Click here to Skip to main content
15,914,608 members
Home / Discussions / C#
   

C#

 
GeneralRe: VISIO SDK OfficePlanSample Pin
Anonymous18-Apr-04 22:16
Anonymous18-Apr-04 22:16 
GeneralRe: VISIO SDK OfficePlanSample Pin
Heath Stewart19-Apr-04 2:26
protectorHeath Stewart19-Apr-04 2:26 
GeneralRe: VISIO SDK OfficePlanSample Pin
Anonymous19-Apr-04 21:28
Anonymous19-Apr-04 21:28 
GeneralRe: VISIO SDK OfficePlanSample Pin
Anonymous20-Apr-04 3:22
Anonymous20-Apr-04 3:22 
GeneralRe: VISIO SDK OfficePlanSample Pin
Heath Stewart20-Apr-04 3:30
protectorHeath Stewart20-Apr-04 3:30 
GeneralRe: VISIO SDK OfficePlanSample Pin
Heath Stewart20-Apr-04 3:31
protectorHeath Stewart20-Apr-04 3:31 
GeneralRe: VISIO SDK OfficePlanSample Pin
Anonymous20-Apr-04 4:36
Anonymous20-Apr-04 4:36 
GeneralSet CurrentCell Focus Pin
DucLinh11-Apr-04 22:21
DucLinh11-Apr-04 22:21 
I'm working with DataGrid in winforms application. I need to set focus() to a specific cell in the DataGrid.

I used the CurrentCell property to set the cell focus:

private void ColumnChangingHandler(object sender, DataColumnChangeEventArgs args)
{
switch (args.Column.ColumnName)
{
case "acsID":
{
string value = args.ProposedValue.ToString();
if (!IsNumber(value))
{
SetCellWithFocus(this.dataGrid2);
dataGrid2_GotFocus(sender, args);
}
break;
}
}
}

private void SetCellWithFocus(DataGrid myGrid)
{
myGrid.CurrentCell = new DataGridCell(1,1);
}

private void dataGrid1_GotFocus(object sender, EventArgs e)
{
MessageBox.Show(dataGrid1.CurrentCell.ColumnNumber +
" " + dataGrid1.CurrentCell.RowNumber);
}

but the focus was returned in the next cell.
Please help me.
Thanks

Mr Duc Linh Nguyen
GeneralRe: Set CurrentCell Focus Pin
Mazdak11-Apr-04 22:36
Mazdak11-Apr-04 22:36 
GeneralCurrent Path in C# Pin
Saleh Alshadheli11-Apr-04 21:03
Saleh Alshadheli11-Apr-04 21:03 
GeneralRe: Current Path in C# Pin
Stefan Troschuetz11-Apr-04 21:29
Stefan Troschuetz11-Apr-04 21:29 
GeneralRe: Current Path in C# Pin
Tom Larsen12-Apr-04 5:06
Tom Larsen12-Apr-04 5:06 
GeneralRe: Current Path in C# Pin
Heath Stewart12-Apr-04 5:10
protectorHeath Stewart12-Apr-04 5:10 
GeneralCustom attribute in Active Directory user account Pin
hd4478011-Apr-04 20:29
hd4478011-Apr-04 20:29 
GeneralRe: Custom attribute in Active Directory user account Pin
Mazdak11-Apr-04 20:58
Mazdak11-Apr-04 20:58 
GeneralRe: Custom attribute in Active Directory user account Pin
Heath Stewart12-Apr-04 5:32
protectorHeath Stewart12-Apr-04 5:32 
GeneralRe: Custom attribute in Active Directory user account Pin
hd4478012-Apr-04 7:07
hd4478012-Apr-04 7:07 
QuestionIs it possible to split a class into several files ? Pin
Andres Coder11-Apr-04 20:11
Andres Coder11-Apr-04 20:11 
AnswerRe: Is it possible to split a class into several files ? Pin
Colin Angus Mackay11-Apr-04 23:42
Colin Angus Mackay11-Apr-04 23:42 
GeneralMDI Client Area Color Pin
Riaan van der Westhuizen11-Apr-04 20:08
Riaan van der Westhuizen11-Apr-04 20:08 
GeneralRe: MDI Client Area Color Pin
STW11-Apr-04 22:45
STW11-Apr-04 22:45 
GeneralAudio & Video chat Pin
Member 33502211-Apr-04 19:27
Member 33502211-Apr-04 19:27 
GeneralRe: Audio & Video chat Pin
DucLinh11-Apr-04 23:53
DucLinh11-Apr-04 23:53 
GeneralRe: Audio & Video chat Pin
Anonymous30-May-04 17:05
Anonymous30-May-04 17:05 
GeneralEmbedding VC++.NET code in VC#.NET Project Pin
Nagendra Kamath K11-Apr-04 19:06
Nagendra Kamath K11-Apr-04 19:06 

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.