How to disable elements in a grid How to disable elements in a grid sql sql

How to disable elements in a grid


i changed my answer based on op's comment

so you basically have two options here.

  1. remove the Ids server side after you query the db. (affects response performance but safer).
  2. do it on client side with js and remove them from the grid.


In your SELECTs, the LEFT JOIN part is useless. Your WHERE clause only uses the ITEMS table, so it has no impact on the set of rows returned, and since the other table has no corresponding row, the columns for this other table are all NULL.

You can thus have a single SELECT * FROM ITEMS i (+ filter) and adjust your UI based on the CategoryId, PromotionId, etc. columns being NULL.