When i doubleclick on grid table data is rendered other wise empty

Posted by: bemes9226 on 23 June 2021, 4:36 pm EST

    • Post Options:
    • Link

    Posted 23 June 2021, 4:36 pm EST - Updated 3 October 2022, 12:03 pm EST

    grid data not loaded, when i click dbl click on jurisdiction headername data is loaded.checlk below screnshot;

    this.data = new wjcCore.CollectionView(this.JurisdictionLookup);

    this.data.filters.push(

    this.getFilterMethod.call(this, “JurisdictionName”, “JurisdictionName”)

    );

  • Posted 25 June 2021, 12:12 am EST

    data is available in this.data but not render

  • Posted 25 June 2021, 6:55 am EST

    Hi bemes9226,

    Please check your this.getFilterMethod.call(this, “JurisdictionName”, “JurisdictionName”) method. It is possible that none of the items pass this filter due to which the grid becomes empty.

    Regards,

    Ashwin

  • Posted 25 June 2021, 7:08 am EST - Updated 3 October 2022, 12:03 pm EST

    that issue resolved.

    when i click cell data is visible,other wise it is hiding

  • Posted 27 June 2021, 11:13 pm EST

    This means that you may have added Cell type cell template on the HTML but it does not render anything. Please make sure that you either remove this template or add the required template to display the text.

    ~regards

  • Posted 28 June 2021, 10:59 am EST

    i have one input field when i type something in text “ame*” related data filter in grid.

    ame*(Search with asterisk symbol )

  • Posted 28 June 2021, 11:00 am EST - Updated 3 October 2022, 12:03 pm EST

  • Posted 30 June 2021, 12:53 am EST

    Hi,

    As per my understanding, you want to search the text with an asterisk(*). I have created a sample demonstrating the same:

    https://stackblitz.com/edit/angular-9-0-0-rc-1-r6jrv1

    In the above sample adding * in the prefix of the searched text shows items having searched text in the prefix(starts with), and adding * at the end of the searched text will make the grid show text ending with searched text. You can also search text without an asterisk.

    Let us know if you have any other requirements than this. Also if that’s the case please give more information about the requirement so that can help you more.

    ~regards

  • Posted 1 July 2021, 2:47 am EST - Updated 3 October 2022, 12:04 pm EST

    i have searched firstname as “pa” but got other data check below

  • Posted 2 July 2021, 2:30 am EST - Updated 3 October 2022, 12:04 pm EST

    leave above issue.

    i have new query now.

    1)when i search with * it working fine without error.



    2)when i search same in without *.

    data not getting(empty data) am getting dataItem undefined error

  • Posted 2 July 2021, 2:31 am EST - Updated 3 October 2022, 12:04 pm EST

  • Posted 2 July 2021, 2:34 am EST

    below are the code

    private getFilterMethod(binding, prop) {

    return items => {

    if (this[prop] != ‘’) {

    if (this[prop].toLowerCase().startsWith(‘‘)) {

    let searchedText = this[prop].toLowerCase().substring(1);

    let arr = Object.values(items);

    return arr

    .map(v =>

    v

    .toString()

    .toLowerCase()

    .endsWith(searchedText)

    )

    .indexOf(true) > -1

    ? true

    : false;

    } else if (this[prop].toLowerCase().endsWith(’
    ’)) {

    let searchedText = this[prop]

    .toLowerCase()

    .substring(0, this[prop].length - 1);

    let arr = Object.values(items);

    return arr

    .map(v =>

    v

    .toString()

    .toLowerCase()

    .startsWith(searchedText)

    )

    .indexOf(true) > -1

    ? true

    : false;

    } else {

    let searchedText = this[prop]

    .toLowerCase()

    .substring(0, this[prop].length - 1);

    let arr = Object.values(items);

    return arr

    .map(v =>

    v

    .toString()

    .toLowerCase()

    .startsWith(searchedText)

    )

    .indexOf(true) > -1

    ? true

    : false;

    }

    } else {

    return items;

    }

    };

    }

    this.data1.filters.push(

    this.getFilterMethod.call(this, ‘Name’, ‘EntityName’),

    this.getFilterMethod.call(this, ‘Number’, ‘EntityNumber’),

    this.getFilterMethod.call(this, ‘TenantName’, ‘ClientName’),

    this.getFilterMethod.call(this, ‘TenantNumber’, ‘ClientNumber’)

    );

    search with * working as expected, but search without * not filtering data it is empty

  • Posted 2 July 2021, 2:35 am EST - Updated 3 October 2022, 12:04 pm EST

  • Posted 2 July 2021, 5:31 am EST

    Hi,

    Sorry for the inconvenience, I have fixed the issue and updated the sample. Please refer to the updated sample below:

    https://stackblitz.com/edit/angular-9-0-0-rc-1-zkuzgf

    ~regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels