Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Calling setFieldState() after create() doesn't set field state

    SmartClient version 7.0:

    Calling ListGrid.setFieldState() immediately after ListGrid.create() with autoDraw: false doesn't set the view state. The problem is that this.completeFields is not initialized, so ListGrid.setFieldState() exits without updating the field state.

    Calling setFields(listGrid.fields) after create() and before setFieldState() solves the problem, but souldn't completeFields be initialized in setFieldState() if it is null, in the same way as in some other cases (prepareForDraw(), startEditing(), editField()) ?


    Should be:

    setFieldState : function (fieldState) {
    //!OBFUSCATEOK
    if (this.completeFields == null) this.setFields(this.fields);
    ...

    instead of:

    setFieldState : function (fieldState) {
    //!OBFUSCATEOK
    if (this.completeFields == null) return;
    ...

    Borut

    #2
    Agreed - and thanks for the suggested fix. This change will be present in the 7.0 final release

    Comment

    Working...
    X