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
close icon

Can''t set value in GGC

I have a GGC and I'm unable to set the cell data. And I want to update a checkbox in a cell in the grid that is in the last row in the grid.
Here is my code

set objGrid = SwfWindow("xxx").SwfWindow("yyy").SwfObject("grid")
num = objGrid.Object.Table.NestedDisplayElements.Count

objGrid.Object.Table.NestedDisplayElements.Item(2).GetRecord().BeginEdit()

objGrid.Object.Table.NestedDisplayElements.Item(num-1).GetRecord().SetValue("colName", true)

and this is the error I get:
Invalid procedure call or argument: 'GetRecord().SetValue'

Lets assume "colName" is the actual column name and we know that the value we need to pass in is the value true.

Thanks for the help.


3 Replies

BB Bruce Bradford August 8, 2008 09:15 PM UTC

Typo: .Item(2).GetRecord()..

Should read .Item(num-1).... just like the line below it.

Sorry.

Thanks!



NR Nirmal Raja Syncfusion Team August 11, 2008 07:36 AM UTC


Hi,

Thank you for your interest in Syncfusion product.

The GridGroupingControl has property called SetCellData, where the data of a cell can be changed.
The SetCellData property has to be passed three arguments, the first one is the cell row position,second one is the cell column position and the third is the string of the data.
If it is a CheckedBox cell then the state of the CheckedBox can be specified in the data argument as if the state is to be checked then the string value should be "ON", if the state is to be unchecked then the string value should be "OFF".

Please refer the below sample code:
SwfWindow("GridControl").SwfObject("gridControl1").SetCellData 4,1,"ON"

Let me know if you have any queries.

Regards,
Nirmal




NR Nirmal Raja Syncfusion Team August 11, 2008 09:54 AM UTC

Hi,

Sorry for the inconvenience caused. Here is the correct update.

The GridGroupingControl has method called SetCellCheckBox, where the state of a CheckedBox cell can be changed.
The SetCellCheckBox method takes three arguments, the first one is the cell row position,second one is the cell column name which is to be given as string, and the third is the string of the

Checked state.
If the state is to be checked then the string value should be "ON", if the state is to be unchecked then the string value should be "OFF", and if the state is to be in intermediate then the

string value should be "INDETERMINATE".

Please refer the below sample code:
SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetCellCheckBox 5,"ColumnName","ON"

Let me know if you have any queries.

Regards,
Nirmal


Loader.
Live Chat Icon For mobile
Up arrow icon