Problem using CheckBoxField in GridView Control  
Author Message
Christiaanpmg





PostPosted: Windows Forms Data Controls and Databinding, Problem using CheckBoxField in GridView Control Top

Hi,

I am developing an ASP.NET Web Page in Visual Basic.NET.

I am displaying data in a GridView control, the fields of my table are: Number_Id Varchar(10), FirstName Varchar(15), SecondName Varchar(15), Status Bit.

When I execute the web page that I developed, I can see that GridView control displays Number_Id, FirstName,SecondName and Status, but Status field has a CheckBoxFields, CheckBoxFields are checked if Status fields are 1.

In executed web page, I am trying to change the status of CheckBoxField and it is imposible because CheckBoxFields are disabled.

I want to know what steps or procedures or methods are necessary to change status in CheckBoxFields, if someboy knows how to do it.

Its necessary mention that using of Status field is not obligatory and if you know any mechanism to solve this problem, and if you have sample code, I would be thankful

Thank you again

Best Regards.



Windows Forms10  
 
 
Sohail Iqbal





PostPosted: Windows Forms Data Controls and Databinding, Problem using CheckBoxField in GridView Control Top

Hi!

It would have been easier to suggest accurately had you posted some code or provided more details. Anyways lets troubleshoot.

When page will be displayed it'll appear in read only mode in grid and if you have enabled editing/updating(by adding "Edit" button column) on grid in design mode from property sheet then only it allow you to update the row of the table. If you see edit button then clicking it will take you to edit mode. When done click update to save changes.

Finally you must provide all the DML/SQL commands to your data source object so that updation can be done.

cheers

--Sohail.



 
 
Christiaanpmg





PostPosted: Windows Forms Data Controls and Databinding, Problem using CheckBoxField in GridView Control Top

Is posible to use a checkboxField y GridView control without using a datafield
 
 
Sohail Iqbal





PostPosted: Windows Forms Data Controls and Databinding, Problem using CheckBoxField in GridView Control Top

Hi!

Yes you can use it without setting any value to datafield.

cheers

Sohail.