using toggle in datagrid
-
using toggled value with in the column like stop and start when clicking start stop should be hide and again when clicking stop then start should be hide so i have tried this using div but could not get result so anybody has suffering from such kinds of troubled and have solution then give me the hints i will be appreciates for u. hikbnet
-
using toggled value with in the column like stop and start when clicking start stop should be hide and again when clicking stop then start should be hide so i have tried this using div but could not get result so anybody has suffering from such kinds of troubled and have solution then give me the hints i will be appreciates for u. hikbnet
In your datasource, there should be a column which denotes start or stop. let start is denoted by 1 and stop by 0. What you have to do is just write a function which will toggle the values. Or if you are using image, it will show the image of start when it is 0, and the image of stop when it is 1. the code will be something like
<%# GetToggledValue(DataBinder.Eval(Container, "DataItem.Status")) %>
here status is the name of the column for start and stop, and GetToggledValue() is the function.Pradipta Basu
-
In your datasource, there should be a column which denotes start or stop. let start is denoted by 1 and stop by 0. What you have to do is just write a function which will toggle the values. Or if you are using image, it will show the image of start when it is 0, and the image of stop when it is 1. the code will be something like
<%# GetToggledValue(DataBinder.Eval(Container, "DataItem.Status")) %>
here status is the name of the column for start and stop, and GetToggledValue() is the function.Pradipta Basu
-
Thank's for your kinds hints but it may works like data list but it is difficult to implement in case of data grid if any further suggestion plz reply me okey thank's a lot . hikbnet
It works with DataGrid. You have to use TemplateColumn
Pradipta Basu