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
1415
Hide/show/disable rowselectors in Igx Hierarichal grid load on demand
posted

Hi Team,

Using 9.1.28 version of Infragistics Hierarichal grid load on demand.

Requirement: I have rowSelectors in the child grid of Hierarichal Grid and a button in the Toolbar of the child Grid.

I want to show/hide the row selectors and also disable row selection for the rows whose row selector is hidden.

HTML
Parent Grid:

          <igx-hierarchical-grid #grid1 [data]="srcData" [autoGenerate]="false" [primaryKey]="'OrderID'" [columnWidth]='"70px"'
            [allowFiltering]='true' [height]="null" [width]="'100%'" [rowHeight]="'50px'" [showToolbar]="true" [paging]="false" [perPage]="200"
            [emptyGridMessage]="emptyMessage" [isLoading]="gridLoading" [filterMode]="'excelStyleFilter'" [displayDensity]="'compact'" (onRowToggle)="rowToggle($event)">
Child Grid:

<igx-row-island #childGrid  [autoGenerate]="false" [allowFiltering]='true' [filterMode]="'excelStyleFilter'" [primaryKey]="'customerId'" [autoGenerate]="false" cellSelection="none"
            (onGridCreated)="gridCreated($event)" (onGridInitialised)="loadCustomerDetails($event)" [rowSelection]="'multiple'" [showToolbar]="true" [hideRowSelectors]="hideRowSelectors"
            [width]='"1200px"' [columnWidth]='"180px"' (onRowSelectionChange)="handleRowSelectionChange($event)">

TS:
Default all rows are selected and once we un-select and select first 2 rows in the child Grid and click a button, the selected row's row selectors should hide and if i relaod the page, and expand same parent ID, by default first 2 rows should be unselected and in read-only mode. Also the button in toolbar should be disabled.

Please help me to achieve.

P.S: i cannot use onRowSelectionChange() event bcz the child grid created only once and later it shows the cache version which messes up my validation. 

Please reply ASAP.


Parents Reply
  • 2660
    Offline posted in reply to Shobhana Suara

    Hi Shobhana,

    I can suggest reviewing the approach and sample from this other forum thread I have recently assisted you with.

    There you will find an example of the requested updating and rebinding child grid data on its parent row toggle.

    Why it does not currently work for you, I cannot tell because I cannot know what code does the “this.getChildData” method executes, whether or not it is async, what is the “this.apiResponse” variable, etc. Additionally, you will have to make sure you have the proper reference to a child grid to assign its data. Debugging might help here.

    Again, please, refer to the sample and approach from the other thread, which I believe will address the same questions.

    Best regards,
    Bozhidara Pachilova

Children
No Data