Author Topic: need alternative detail models  (Read 2117 times)

peterchaim

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 5
    • View Profile
need alternative detail models
« on: January 03, 2018, 10:33:39 pm »

Hi,

My team has a need for multiple detail models. In other words, alternative ways to drill down into detail for each row.

This topic gives me hope that the detail model can be reinitialized at run time, is that true?

   Topic: detail Model turning on / off at run time  (Read 191 times)

If not, what suggestions might you have? For example, I could imagine changing the titles of columns at runtime, hiding and un-hiding columns at runtime, or other similar work arounds.

Thanks,
Peter

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: need alternative detail models
« Reply #1 on: January 03, 2018, 10:43:15 pm »
detailModel.init is a callback function that is called every time detail view is initialized for each row.

So yes, you can have different detail views for different rows.

peterchaim

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: need alternative detail models
« Reply #2 on: January 03, 2018, 11:20:56 pm »

Paramvir, thanks for your reply.

My question is whether the same row can have different detail models at different times? Perhaps, by re-initializing with different detail models.

Or do you think this will lead to problems? In which case, what would you suggest?

Thanks,
Peter

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: need alternative detail models
« Reply #3 on: January 04, 2018, 12:03:36 pm »
grid caches the detail view by default for performance reasons.

If you need different detailModel at different times for same row, you can call rowInvalidate() before using new detailModel.

https://paramquery.com/pro/api#method-rowInvalidate