We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

gridgroupingcontrol and openfiledialog

I am using a custom celltype from the sample CellButtons. (4.3 syncfusion)

gridGroupingControl1.TableModel.CellModels.Add("OpenFileDialog", new EllipsisCellModel(gridGroupingControl1.TableModel));
gridGroupingControl1.TableDescriptor.Columns["file"].Appearance.AnyRecordFieldCell.CellType = "OpenFileDialog";

This seems to be working fine.

The GGC is bound to an MSAccess table.

I am using the TableControlCellButtonClicked to launch my openfiledialog.

I want to set the contents of the ellipsis cell to the filename returned from the openfiledialog.

This is the code I am using to update the cell.


GridCurrentCell cc = gridGroupingControl1.TableControl.CurrentCell;
//gridGroupingControl1.BeginUpdate();
// how does a ggc suspend binding?
cc.BeginEdit(true);
gridGroupingControl1.TableControl.Model[cc.RowIndex, cc.ColIndex].Text = filename;
cc.EndEdit();
//gridGroupingControl1.EndUpdate(true);

I do not see my update on the ggc.
I have also tried other cells besides the current cell with no luck.
I am not sure what I am doing wrong.

Thanks for the help.

Ray.

1 Reply

AD Administrator Syncfusion Team October 27, 2006 04:03 PM UTC

Nevermind.

I have to use:

gridGroupingControl1.TableControl.CurrentCell.MoveTo(e.Inner.RowIndex, e.Inner.ColIndex, GridSetCurrentCellOptions.SetFocus);

before I use CurrentCell.

Ray.

>I am using a custom celltype from the sample CellButtons. (4.3 syncfusion)

gridGroupingControl1.TableModel.CellModels.Add("OpenFileDialog", new EllipsisCellModel(gridGroupingControl1.TableModel));
gridGroupingControl1.TableDescriptor.Columns["file"].Appearance.AnyRecordFieldCell.CellType = "OpenFileDialog";

This seems to be working fine.

The GGC is bound to an MSAccess table.

I am using the TableControlCellButtonClicked to launch my openfiledialog.

I want to set the contents of the ellipsis cell to the filename returned from the openfiledialog.

This is the code I am using to update the cell.


GridCurrentCell cc = gridGroupingControl1.TableControl.CurrentCell;
//gridGroupingControl1.BeginUpdate();
// how does a ggc suspend binding?
cc.BeginEdit(true);
gridGroupingControl1.TableControl.Model[cc.RowIndex, cc.ColIndex].Text = filename;
cc.EndEdit();
//gridGroupingControl1.EndUpdate(true);

I do not see my update on the ggc.
I have also tried other cells besides the current cell with no luck.
I am not sure what I am doing wrong.

Thanks for the help.

Ray.

Loader.
Live Chat Icon For mobile
Up arrow icon