Hi everyone, thanks for the continuing great support
Using v3.2.1. of GGC. Our code recalcs the entire grid and then sets the focus to a specific row/col using grid.Table.CurrentRecordManager.CurrentField and currentRecord
I''ve noticed just recently that although the required CurrentCell does have the focus, the user cannot start editing as the TextBox does not appear to have focus - if I use arrow keys to move left and then right the TextBox gets the focus and I cna start typing.
I''ve tried various things on CurrentCell like Reactivate and GridControlBase.Focus() but it doesn''t seem to work.
any ideas?
thanks in advance
Jason
AD
Administrator
Syncfusion Team
June 15, 2005 11:00 PM UTC
I tried to set a sample up to see this problem but could not. Here is what I tried. http://www.syncfusion.com/Support/user/uploads/GGC_DragText_f0a39f81.zip
What is the state of the grid when you start this process? Maybe that is what is affecting this behavior? You might try calling CancelEdit before you start your update.
this.gridGroupingControl1.Table.CurrentRecord.CancelEdit();
Can you see the problem in the above sample?
JH
Jason Hales
June 16, 2005 12:51 PM UTC
Hi,
It''s hard to determine the state of the grid as it is heavily customised. I had it working in a previous version of our code but must have chnaged a property deep down in the guts of your grid.
I''ve noticed that when I tab to the next cell it also doesn''t show the focus rectange until i manually click on the cell.
However, if I do a CurrentCell MoveLeft the MoveRight it does show the focus rectangle.
If it''s any help I have set .TableModel.Options.ActivateCurrentCellBehavior to SelectAll
I''m so desperate to sort this that I''m currently writing a class that uses reflection to scan the groupingGrid and write out all of the properties at runtime so that I can compare that with my previous source code?!?!?!?
TIA
Jason
JH
Jason Hales
June 16, 2005 02:36 PM UTC
in addition to above comment I''ve given up trying to create a class that compares the properties of an object...another day
Which of the vast number of objects should I be manually inspecting to see if a property''s been amended between two groupingGrids (v3.2.1.0)
Thanks
Jason
AD
Administrator
Syncfusion Team
June 16, 2005 03:40 PM UTC
Hi Jason,
a good way to inspect properties in the grid is to show a property grid with all properties. Then you can experiment with changes at runtime.
To show the property grid use the following code in form.OnLoad
private void Form1_Load(object sender, System.EventArgs e)
{
GridGroupingControlSchemaBrowser frm = new GridGroupingControlSchemaBrowser(this.gridGoupingControl1);
frm.Show();
}
It''s hard to guess what might be wrong.
You can check the status of the current cell by printing out grid.TableControl.CurrentCell.ToString().
You could also try manually calling CurrentCell.MoveTo instead of CurrentRecord.SetCurrent.
When you call MoveTo the row index should be Table.DisplayElements.IndexOf(record);
The column index should be field number + GroupedColumns.Count + 1
One question: Do you handle any events, especially current cell events?
Do you have a screenshot of your grid?
Stefan
>in addition to above comment I''ve given up trying to create a class that compares the properties of an object...another day
>
>Which of the vast number of objects should I be manually inspecting to see if a property''s been amended between two groupingGrids (v3.2.1.0)
>
>Thanks
>
>Jason
JH
Jason Hales
June 17, 2005 08:10 AM UTC
Thanks Stefan/Clay for your suggestions...for some strange reason this behaviour seems to have fixed itself!! I think I''ll leave it there. Thanks again
JB
James Blibo
May 8, 2007 02:29 PM UTC
I am experiencing the same issue with the focus rectangle moving to the new cell after issuing the CurrentCell MoveTo command.
JB
James Blibo
May 8, 2007 02:36 PM UTC
the snippet below...
GridRecord rec = this.gridGroupingControl1.Table.Records[2] as GridRecord;
rec.SetCurrent("Col2");
...worked for me.