jQuery UI Widgets Forums Grid show unique values in grid

This topic contains 3 replies, has 2 voices, and was last updated by  Nadezhda 8 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • show unique values in grid #70438

    tak
    Participant

    Hello,

    i need to show unique values of two column in my grid .for example…i am getting data from backend in below format
    COLUMN1 COLUMN2 COLUMN3
    ————————–
    A1 X1 P1
    A1 X1 P2
    A2 X2 P1
    A2 X2 P2

    I need to show in grid such a way that it shows

    COLUMN1 COLUMN2
    —————-
    A1 X1
    A2 X2

    currently if i remove the 3rd columns from display it show 4 rows but according to my requirement i need to show only 2 rows.
    is it possible to do in UI.

    i can do this by using group by functionality in sql but i can not do changes in backed sql.that is the constrain. so is there any possible logic which i can apply in UI.

    show unique values in grid #70445

    Nadezhda
    Participant

    Hello tak,

    Have you tried to set ‘pagesize’ property? I think it may help you achieve your requirement.

    Best Regards,
    Nadezhda

    jQWidgets team
    http://www.jqwidgets.com/

    show unique values in grid #70448

    tak
    Participant

    how does pagesize will help in my case….pagesize is to set the no of records to display in a page….this is totally different from what i am looking for…please have a look at the requirement again.

    show unique values in grid #70488

    Nadezhda
    Participant

    Hi tak,

    I would suggest you to use ‘beforeLoadComplete’ method of jqxDataAdapter. It is called before the data is fully loaded so you can check for unique values in body of this method. If the function returns an array, the dataAdapter’s records field will be set to it.

    Best Regards,
    Nadezhda

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.