How to disable elements in a grid
i changed my answer based on op's comment
so you basically have two options here.
- remove the Ids server side after you query the db. (affects response performance but safer).
- do it on client side with js and remove them from the grid.
In your SELECT
s, 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
.