Updating gridview checkbox
To illustrate this, let s take an example from the table and a Grid View that renders this data.Our goal is to extend this example to allow for the user to delete products via the Grid View.
When I click the Edit button the checkbox becomes active and is checked depending on whether the data has a 0 or a 1. New Values seems to work for other edittemplate fields ok. New Values["webname"] = "randomvalue"; I think I want to be able to do this... @masterpass - The Toggle method works fine in checking or unchecking the Edit Template checkbox. Maybe it will help: It's actually fairly easy to get the info you want once you know the trick. Data Bind(); To populate the New Values collection, put the following code in the Row Updating event: Grid View gv = (Grid View)sender; for (int i = 0; i Thanks 13598, I don't quite understand what you code is does but I found a work around myself. One is a hidden field that containes 0 or 1 depending on the data and the other is a checkbox that we can also set depending on 0 or 1.
When the Sql Data Source control s method is invoked either programmatically or automatically from a data Web control a connection to the database is established, the parameter values are assigned to the query, and the command is shuttled off to the database.
The results are then returned as either a Data Set or Data Reader, depending on the value of the control s value has been specified, the Enable Inserting, Enable Editing, or Enable Deleting option in the corresponding data Web control s smart tag will become available.
What I want to do is, after the selections are made and after the "OK" button is clicked I want to display the selected items of the checkboxlist seperated by commas, (ex, French, English, German) in the textbox which was the targetcontrol of the popupextender.
I have the following code Frinavale, what you have replied to is exactly my question.
Figure 5: Clicking the Delete Button in the Grid View Invokes the Sql Data Source s SQL statements can be specified through the Properties window or the control s declarative syntax.