Welcome to Dream.In.Code
Become an Expert!

Join 150,060 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,737 people online right now. Registration is fast and FREE... Join Now!




ASP.NET and VB.NET: problem with GridView's "disabled" b

 
Reply to this topicStart new topic

ASP.NET and VB.NET: problem with GridView's "disabled" b, How to edit data in datagrid that appears "disabled."

trosoft
24 Feb, 2008 - 01:49 PM
Post #1

New D.I.C Head
*

Joined: 24 Feb, 2008
Posts: 5



Thanked: 1 times
My Contributions
___________________

I have pulled data from SQL Server into a datagrid control.
Two of the columns are checkbox fields. But during run-time,
I am unable to click either of those columns to enter a check.
Are they disabled by default.

I need to allow the user to indicate whether they approve or deny a request; and then, I shall be able to update the corresponding columns in the originating database table.

What must I do to solve this problem?

I added these two columns to the existing ones in run-time:

-----
CODE

Dim myCol1 As New DataColumn("Approved")
Dim myCol2 As New DataColumn("Denied")

myCol1.DataType = System.Type.GetType("System.Boolean")

myCol2.DataType = System.Type.GetType("System.Boolean")

myDataSet.Tables(0).Columns.Add(myCol1...
myDataSet.Tables(0).Columns.Add(myCol2...
myDataSet.Tables(0).AcceptChanges()

-----

The datagrid control's Enabled and AutoPostBack properties are set to True.

The problem is not with the two columns that I added during run-time, as the same situation occurs when there are checkbox fields that originate from the datasource, and are automatically displayed in the datagrid control.
______________________

This post has been edited by jayman9: 25 Feb, 2008 - 01:09 AM
User is offlineProfile CardPM
+Quote Post

bhandari
RE: ASP.NET And VB.NET: Problem With GridView's "disabled" B
25 Feb, 2008 - 12:24 AM
Post #2

D.I.C Addict
Group Icon

Joined: 31 Jan, 2008
Posts: 747


Dream Kudos: 900
My Contributions
hey man!

put your code within [*code] your code [*/code] tags (without astericks)
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 10:37PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month