FarPoint Forums

The FarPoint Message Boards
Welcome to FarPoint Forums Sign in | Join | Help
in Search

It doesn't appear that ColumnEdit / ColumnEditName and DataColumn and DataColumnName are synchronized

Last post 11-13-2008, 7:03 AM by scotts. 12 replies.
Sort Posts: Previous Next
  •  08-27-2008, 5:11 PM 68347

    It doesn't appear that ColumnEdit / ColumnEditName and DataColumn and DataColumnName are synchronized

    Hello,

    Are these related properties ever synchronized at run time? If not, how can I tell which one to use? Also, could the two integer properties be initialized to -1 instead of 0 so that you can tell whether or not a value has acutally been set? Thanks in advance for any ideas and/or suggestions!

  •  08-27-2008, 5:58 PM 68350 in reply to 68347

    Re: It doesn't appear that ColumnEdit / ColumnEditName and DataColumn and DataColumnName are synchronized

    Hello,

    These properties are used to set what columns in a MultiColumnCombobox are used for writing values back to the editbox (ColumnEdit/ColumnEditName) and tell which columns are bound to which fields in the bound DataSource (DataColumn/DataColumnName). You can use either property to make these settings, but we do not automatically set the other property so you can query using either property. We just give two properties so you can use column index numbers or column names.

    These properties have nothing to do with the item selected. So I am not sure about the second part of your inquiry.


    Scott S.
    FarPoint Technologies, Inc.
  •  08-27-2008, 6:10 PM 68352 in reply to 68350

    Re: It doesn't appear that ColumnEdit / ColumnEditName and DataColumn and DataColumnName are synchronized

    Thanks Scott! It seems to me that you would want to keep them in sync so that you could use them interchangeably. This is especially true since the ColumnEdit and DataColumn properties initialize to 0 instead of -1. Since 0 is a valid column index, you are setting a defacto default. Does the internal code check the Name property first and then the index property second if the Name property is not valid?
  •  08-28-2008, 7:18 AM 68360 in reply to 68352

    Re: It doesn't appear that ColumnEdit / ColumnEditName and DataColumn and DataColumnName are synchronized

    Hello,

    We use a method GetDataColumnIndex and GetColumnEditIndex to determine what columns are being queried. This method queries the DataColumnName and ColumnEditName properties to see if they are set. If they are set, we find the index of the column using those names. If they are not set, we use the indexes set in DataColumn and ColumnEdit. So, we are probably default ColumnEdit and DataColumn to 0 to have a valid column set. Otherwise there would not be anything bound or anything written to the editbox.


    Scott S.
    FarPoint Technologies, Inc.
  •  09-02-2008, 9:48 AM 68545 in reply to 68360

    Re: It doesn't appear that ColumnEdit / ColumnEditName and DataColumn and DataColumnName are synchronized

    Thanks Scott!
  •  11-12-2008, 7:01 AM 71575 in reply to 68545

    Re: It doesn't appear that ColumnEdit / ColumnEditName and DataColumn and DataColumnName are synchronized

    How would I reference GetDataColumnIndex and GetColumnEditIndex in my own subclassed MutliColumnComboBoxCellType since they provide the exact functionality I am currently doing in my code? Thanks in advance for any ideas and/or suggestions!
  •  11-12-2008, 9:35 AM 71583 in reply to 71575

    Re: It doesn't appear that ColumnEdit / ColumnEditName and DataColumn and DataColumnName are synchronized

    Hello,

    These methods are not public so you are not able to call them.


    Scott S.
    FarPoint Technologies, Inc.
  •  11-12-2008, 9:45 AM 71584 in reply to 71583

    Re: It doesn't appear that ColumnEdit / ColumnEditName and DataColumn and DataColumnName are synchronized

    Is ther any reason why they could not be made Public, or at least as Friend or Protected so subclassed code could reference them? Otherwise, I have to write redundant code to do accomplish the exact same purpose.

  •  11-12-2008, 10:04 AM 71586 in reply to 71584

    Re: It doesn't appear that ColumnEdit / ColumnEditName and DataColumn and DataColumnName are synchronized

    Hello,

    I looked at the source and the function is public. The issue is the class is marked internal, so you can not get at this function.


    Scott S.
    FarPoint Technologies, Inc.
  •  11-12-2008, 11:01 AM 71590 in reply to 71586

    Re: It doesn't appear that ColumnEdit / ColumnEditName and DataColumn and DataColumnName are synchronized

    Can I use reflection to get them?
  •  11-12-2008, 12:31 PM 71600 in reply to 71590

    Re: It doesn't appear that ColumnEdit / ColumnEditName and DataColumn and DataColumnName are synchronized

    Hello,

    Yes.


    Scott S.
    FarPoint Technologies, Inc.
  •  11-12-2008, 6:37 PM 71611 in reply to 71600

    Re: It doesn't appear that ColumnEdit / ColumnEditName and DataColumn and DataColumnName are synchronized

    Which class do they belong to, the Parent Spread, the CellType or the SubEditor? I'm guessing the cell type. Thanks in advance for any ideas and/or suggestions.
  •  11-13-2008, 7:03 AM 71629 in reply to 71611

    Re: It doesn't appear that ColumnEdit / ColumnEditName and DataColumn and DataColumnName are synchronized

    Hello,

    These methods belong to the SubEditor control.


    Scott S.
    FarPoint Technologies, Inc.
View as RSS news feed in XML
     FarPoint Forums Home