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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can''t set value in GGC

Thread ID:

Created:

Updated:

Platform:

Replies:

75785 Aug 8,2008 09:13 PM UTC Aug 11,2008 09:54 AM UTC WinForms 3
loading
Tags: Test Studio
Bruce Bradford
Asked On August 8, 2008 09:13 PM UTC

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.


Bruce Bradford
Replied On August 8, 2008 09:15 PM UTC

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

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

Sorry.

Thanks!


Nirmal Raja [Syncfusion]
Replied On 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



Nirmal Raja [Syncfusion]
Replied On 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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;