I have an Editable Data grid which is pulling data from a SQL query one of the field has a Y or N answer and therefore needs to be a checkbox however in Edit Mode it shows as a field and errors if I put this in
<asp:CheckBox ID="ALFSUPR" runat="server" Checked='<%# Bind("pric_c_alfsupreq") %>'></asp:CheckBox>
Is there a simple way of converting the Text Field to a CheckBox which when Checked has a value = Y
Thanks
Try something like this:
UPDATE:
Since you’re using an old DataGrid (you should be using DataGridView nowadays), you should have something similar to this in your
DataGriddefinition:See the OnUpdateCommand…
Now the method that should run when you’re applying an update to the row’s data:
Hope you get the idea. If you need this code in any other moment you can place it in the
OnEditCommand,OnDeleteCommand, etc…