Saturday, September 8, 2007

Get Cell data from a Syncfusion Grid

Jul 27 2006 : Alex Markevich

Get Cell data from a Syncfusion Grid

'========================================
' Name: FnReadingGridControlCell
' Description: Will read contents of any Syncfusion Grid Control Cell, will return StyleInfo extract as Array
' Inputs: [iRow], [iColl]
' Outputs: Array contaning all StyleInfo extracts
'=======================================
Function FnReadingGridControlCell(iRow,iColl)
' 01 ==== Defining Variables
Dim sLineContent, aMenu
' 02 ==== Reading Cell Style Info
Environment.Value("E_Object_SwfObject_name") = "_gridControl"
sLineContent = SwfWindow("GreenStar Apex").SwfObject("Generic_SwfObject").Object.GetViewStyleInfo (iRow, iColl)
If sLineContent = "" Then aMenu = Split("EXIT EXIT", " ") : FnReadingGridControlCell = aMenu : Exit Function
' 03 ==== Packing Array
aMenu = Split(sLineContent, vbLf) '== Building array / were "vbLf" is a constant defined for Line Feed (char 10)
' 04 ==== Returning Array
FnReadingGridControlCell = aMenu
' 05 === Killing Array object
Set aMenu = Nothing
End Function

Thank you Alex.

No comments: