GridView that toggles percentages of counts
I am using a SqlDataSource
that returns a table of raw counts. One of these columns is the "total". I would like to give the user the ability to show thes开发者_如何转开发e counts as a percentage of total using some sort of toggle switch.
My initial idea was to have two CSS classes and somehow put <span class="raw">
and <span class="perc">
around each value and then make one or the other invisible using Javascript. I'm not sure how I would go about doing this though.
I would appreciate any suggestions as to how I could approach this.
My suggestion would be to add a handler to the RowDataBound event of the GridView control and change what the column displays based on the toggle value.
Have you tried changing the column visibility based on a button press event?
精彩评论