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,
See the attached sample below, this works for all html form controls that contains in current control. Another way to achieve this is to set a class to itemTemplate and you can create selector with this itemTemplate class.
If you have further questions, please feel free to contact us.
In my solution there are many pages containing grids. Is it possible to write this script only once rather then writing it on every page. I had tried to create a base class with page_prerender method containing this script but it didn't work.
Moreover, my page is contained within Tabs. So, same script is not working.
Now my script had started to work. My Query is: suppose in base class I had defined 'EnteringEditMode', so as to implement it on whole of the site's grid. Is it possible to override this cell enteringmode on some individual page which require additional functionality.
basically if you can to extend base class on application level you should can to extend it on page level too. You can try to achieve this.
If you need further assistance please provide me an isolated working sample to look better what exactly happened in your scenario.