In Webdatagrid, how can one disable dropdown, checkbox placed inside template field?
How can one check if a template field contains dropdown/checkbox?
Hi Birendra Aujla,
Thank you for posting in our community!
I would like to present you the sample on our page: Using Cell and Column Templates. I think there you can find good example how to create template cell content.
On your second question: when you retrieve the cell data of template, it will return the mark-up of the template. Then you can check it for what you want.
Thanks Petko for replying. But my issue is that I had placed asp control like textBox, checkbox, dropdown inside Template field. How can I get the type of the control and disable them.
Hello Birendra Aujla,
You can use some specific jQuery selector on client-side to get all the components you need to disable. Then change their "disable" property to "true". This should do the job. I'm sending you a sample that shows how to archive this scenario.
Thanks for the sample. But the problem is that I want to disable dropdown inside grid only and not that are placed on the page. How can we target the dropdown inside grid only to enable disable?
Both my checkbox & dropdown are inside separate Template field and both are not disabled.