Announcement

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

    ListGrid Filtering Problem

    Hi,

    We are using smartgwt pro 3.0 version.

    In our application we have overritten createRecordComponent() method of ListGrid to customize two fields look and feel as mentioned below

    fiListGrid = new ListGrid()
    {
    @Override
    protected Canvas createRecordComponent(final ListGridRecord record, Integer colNum)
    {
    if (getFieldName(colNum).equals("operation_field"))
    {
    //return some custome HLayout
    }
    else if (getFieldName(colNum).equals("action_field"))
    {
    //return some custome HLayout
    }
    else
    {
    return super.createRecordComponent(record, colNum);
    }
    }
    };


    we also enabled the filter on the ListGrid, we wanted the each filter call to be sent to server, code is as follows

    DataSource ds = DataSource.get("fi");
    fiListGrid.setAutoFetchData(true);
    fiListGrid.setShowFilterEditor(true);
    ResultSet resultSet = new ResultSet(ds);
    resultSet.setUseClientFiltering(false);
    fiListGrid.setData(resultSet);

    What we are observing is for the customize field ("operation_field", "action_field")the filter call is going to server whereas for otherfield we are not getting any call on server.

    Can you please help us to find the root cause of this behaviour?

    #2
    Use setDataProperties(), not setData(), if you are trying to affect the ResultSet that is auto-created by fetchData(). Your attempt below has no effect because the call to fetchData() (via autoFetchData) overwrites your ResultSet that you applied via setData().

    Comment

    Working...
    X