Announcement

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

    ListGridField and filter on nester data

    Hi,
    I have Datasource(RestDataSource) with nested Datasource. SmartGWT v12 LGPL
    ListGridField , for example gridfield1,on DataSourceField,with nested data is set - gridfield1.setDataPath(dataPath);

    Data success get from database and veiw in ListGrid. I exact one filter under gridfield1 corresponding on field of nested datasource, but have much filters. How setting one filter for this gridfield1 ?

    #2
    if use smartgwt 4.0, with same code i have ONE filter on ListGridField with dataPath to nested datasource field, all work fine. But in new library created MANY filters on one ListGridField

    Comment


      #3
      We're having trouble understanding what you mean. It sounds like you're talking about the dataPath system, which is intended for legacy architectures only, so you may be using it against best practices. As far as what's going on, you describe multiple filters going on, but we're not sure what that means - something is slow because filtering is being repeated, maybe?

      The best approach is probably to show a ready-to-run, minimal test case that demonstrates the problem.

      Comment


        #4
        simpe pseudo example source data that i have:
        DataSource nestedDS:
        DataSourceField nestedField1 = new DataSourceField ("nestedField1")
        DataSourceField nestedFueld2 = new DataSourceField("nestedField2")

        DataSource mainDS
        DataSourceField field1= new DataSourceField("field1")
        DataSourceField field2= new DataSourceField("field2")
        field2.setTypeAsDataSource(nestedDS);

        data load from DB through RestDataSource and correct veiw in grid


        grid.setDataSource(mainDS);
        ListGridField f1 = new ListGridField("field1")
        ListGridField f2 = new ListGridField("field2") -- in this ListGridField i see nestedField2 data
        f2.setDataPath("field2/nestedField2");

        in total view filter on f1, 2 filters on same view place f2(i see clikicked tab button - nestedField1, nestedField2 ). if i click tab button, filter on f1(and all) stay not visible, only filter f2 visible

        what are best practices i need use?

        Comment


          #5
          This isn't code we can run, and we still don't understand what you even mean by "filter" in this case. In SmartClient, the word "filter" is used to mean showing only data that match criteria. We're not really sure what you mean by it here - you aren't showing any criteria.

          So again, a minimal, ready-to-run test case showing surprising behavior, with a description of what you expected, is the way to go here.

          Comment


            #6
            1. yes, filter is an criteria(in me case restdatasource, they in tag "data" in fetch request after set filter).see screenshots
            2. that are best practices in you past mention?
            3. test case will try
            Attached Files

            Comment


              #7
              In general, the use of dataPath is only for legacy systems that must deliver data as a single blob of many nested records of different types, rather than allowing separate loading and saving of each record type, which is more flexible and efficient.

              The screenshots are not really helping us to understand the issue you’re having, so we look forward to a runnable test case.

              Comment

              Working...
              X