Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Default First row selection
posted

Hi,

i am able to select first row default but its not binding values.

i am using below code.

    <igx-grid #grid [data]="data" width="100%" height="500px" [primaryKey]="'ProductID" [rowSelectable]="true">

ngAfterViewInit(){
this.grid.selectRows([1]);
this.grid.markForCheck();

please help me to bind values.

  • 640
    Offline posted

    Hello Shravani,

    Thank you for posting in our community.

    I will need some additional information regarding your scenario in order to ensure that your question is addressed correctly. Can you please clarify what do you refer to with “it is not binding values”.

    I assume that you need to retrieve the values of the selected row`s cells. Having this in mind I have created a small sample where I am using selectedRows method оf IgxGrid to get the selected rows IDs and then I am displaying them in a dialog window. On my side everything works as expected and I am able to access the selected rows.

    Please test the sample on your side and let me know how it behaves. If this is not an accurate demonstration of what you are trying to achieve, please feel free to modify it and send it back to me along with steps to reproduce. Alternatively, if the behavior cannot be replicated, please feel free to provide your own sample.

    Having a working sample on my side, which I can debug, is going to be very helpful in finding the root cause of this behavior.

    Thank you for your cooperation.

    Looking forward to hearing from you.

    Regards,
    Viktor Kombov
    Entry Level Software Developer
    Infragistics, Inc.