Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
258
How to use GetColumnControl method for SwfTable(Infragistics.Win.UltraWinGrid.UltraGrid)
posted

How to identify the arguments required for the function GetColumnControl

From the help I can find

column

The column path in the following format "[Band Index];[Column Key]"

What values should I give for band index and Column key.

This how the recorder script comes

TableObject.SetCellData "0","CurrencyGuid","43219"

If I use TableObject.GetColumnControl("0;CurrencyGuid") , I am getting th error "Object required: 'GetColumnControl(...)'"

and if I use TableObject.GetColumnControl("1;CurrencyGuid") , I am getting the error,

Key not found
Parameter name: key

How can I know the correct values for the Column Key,

 

Parents
  • 7695
    Offline posted

    Your first assumption of what the values for band and column were correct. You are getting the "Object required: ..." error because you are using the following notation:

    SET colEditorControl = ...

    Your GetColumnControl method call will return a value of -1 if the column in question does not have an EditorControl of some type specified. The value of -1, not being an object but a value type, is the reason for the error. Other than that it appears that you are calling the method correctly.

    If you are looping through the columns some having editorControls and others not I would do a test somewhat like this:

    SET grid = SwfWindow("Form1").SwfTable("ultraGrid1")

    colEditorControlValue = grid.GetColumnControl("nBandIndex;sColumnKey")
    IF colEditorControlValue <> -1 THEN
           SET colEditorControl = grid.GetColumnControl("nBandIndex;sColumnKey")
            ...
    END IF

    I hope this answers your question,

Reply Children