473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

writeable checkbox in datagrid from bit field in table

I am having a very difficult time with what should be an easy task.

I simply want to select these fields from the database table into the
GridView control and have checkboxes appear for which the user can select
which columns to include in a report.
The checkboxes are always read only, even when I set the value for readonly
to false in the BoundField GridView tasks (EditColumn).
Does anyone know of an example I can see, an article or just another way of
looking at what I may be missing here?
I can update the table in the database so I must have permissions to change
the table, at least from sql management studio. Maybe I need permissions
from within the website. Maybe thats why when I go into the wizard and
choose the advance option to create an UPDATE/INSERT query, it doesn't allow
me to check that box. Thanks, -Greg

SELECT COLUMN_NAME as [Data Item Name],

Column_ID as [Column Id],

Include_in_Report as [Include in Report] -- a bit data value

FROM ColumnsToSelect


Apr 27 '06 #1
4 3424
Your checkbox will remain read only while your gridview is in readonly mode.
If you flip it into edit mode then it will become editable, although in order
for the cahnge to be written back to the DB you need to specify some kind of
insert command to the bound datasource.

"hazz" wrote:
I am having a very difficult time with what should be an easy task.

I simply want to select these fields from the database table into the
GridView control and have checkboxes appear for which the user can select
which columns to include in a report.
The checkboxes are always read only, even when I set the value for readonly
to false in the BoundField GridView tasks (EditColumn).
Does anyone know of an example I can see, an article or just another way of
looking at what I may be missing here?
I can update the table in the database so I must have permissions to change
the table, at least from sql management studio. Maybe I need permissions
from within the website. Maybe thats why when I go into the wizard and
choose the advance option to create an UPDATE/INSERT query, it doesn't allow
me to check that box. Thanks, -Greg

SELECT COLUMN_NAME as [Data Item Name],

Column_ID as [Column Id],

Include_in_Report as [Include in Report] -- a bit data value

FROM ColumnsToSelect


Apr 27 '06 #2
I'm looking into this. Thank you.

"clickon" <cl*****@discussions.microsoft.com> wrote in message
news:7A**********************************@microsof t.com...
Your checkbox will remain read only while your gridview is in readonly
mode.
If you flip it into edit mode then it will become editable, although in
order
for the cahnge to be written back to the DB you need to specify some kind
of
insert command to the bound datasource.

"hazz" wrote:
I am having a very difficult time with what should be an easy task.

I simply want to select these fields from the database table into the
GridView control and have checkboxes appear for which the user can select
which columns to include in a report.
The checkboxes are always read only, even when I set the value for
readonly
to false in the BoundField GridView tasks (EditColumn).
Does anyone know of an example I can see, an article or just another way
of
looking at what I may be missing here?
I can update the table in the database so I must have permissions to
change
the table, at least from sql management studio. Maybe I need permissions
from within the website. Maybe thats why when I go into the wizard and
choose the advance option to create an UPDATE/INSERT query, it doesn't
allow
me to check that box. Thanks, -Greg

SELECT COLUMN_NAME as [Data Item Name],

Column_ID as [Column Id],

Include_in_Report as [Include in Report] -- a bit data value

FROM ColumnsToSelect


Apr 27 '06 #3
Oh my gosh....the table I was using for the update didn't have an identity
column. Visual Studio is not going to let someone update a table it can't
update. Wheww!!! Bonehead me !!

"clickon" <cl*****@discussions.microsoft.com> wrote in message
news:7A**********************************@microsof t.com...
Your checkbox will remain read only while your gridview is in readonly
mode.
If you flip it into edit mode then it will become editable, although in
order
for the cahnge to be written back to the DB you need to specify some kind
of
insert command to the bound datasource.

"hazz" wrote:
I am having a very difficult time with what should be an easy task.

I simply want to select these fields from the database table into the
GridView control and have checkboxes appear for which the user can select
which columns to include in a report.
The checkboxes are always read only, even when I set the value for
readonly
to false in the BoundField GridView tasks (EditColumn).
Does anyone know of an example I can see, an article or just another way
of
looking at what I may be missing here?
I can update the table in the database so I must have permissions to
change
the table, at least from sql management studio. Maybe I need permissions
from within the website. Maybe thats why when I go into the wizard and
choose the advance option to create an UPDATE/INSERT query, it doesn't
allow
me to check that box. Thanks, -Greg

SELECT COLUMN_NAME as [Data Item Name],

Column_ID as [Column Id],

Include_in_Report as [Include in Report] -- a bit data value

FROM ColumnsToSelect


Apr 27 '06 #4
but how do I get the checkbox value to stick?
After I select it, it gets checked.
But when I move onto the next row, it reverts back to an empty box.
hmmm.

"clickon" <cl*****@discussions.microsoft.com> wrote in message
news:7A**********************************@microsof t.com...
Your checkbox will remain read only while your gridview is in readonly
mode.
If you flip it into edit mode then it will become editable, although in
order
for the cahnge to be written back to the DB you need to specify some kind
of
insert command to the bound datasource.

"hazz" wrote:
I am having a very difficult time with what should be an easy task.

I simply want to select these fields from the database table into the
GridView control and have checkboxes appear for which the user can select
which columns to include in a report.
The checkboxes are always read only, even when I set the value for
readonly
to false in the BoundField GridView tasks (EditColumn).
Does anyone know of an example I can see, an article or just another way
of
looking at what I may be missing here?
I can update the table in the database so I must have permissions to
change
the table, at least from sql management studio. Maybe I need permissions
from within the website. Maybe thats why when I go into the wizard and
choose the advance option to create an UPDATE/INSERT query, it doesn't
allow
me to check that box. Thanks, -Greg

SELECT COLUMN_NAME as [Data Item Name],

Column_ID as [Column Id],

Include_in_Report as [Include in Report] -- a bit data value

FROM ColumnsToSelect


Apr 27 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Randy | last post by:
Hello, I'm creating a table on the fly that is used by a datagrid. I'm also creating a tableStyle that is used for the datagrid to make it look like I want. I'm using the DataGridBoolColumn to...
0
by: Just D | last post by:
Hi All, Does anybody know how to write the following code? I have a database table with a few columns including: ID , "Task" , ForceRun . I need to show the DataGrid on the ASPX page with...
10
by: Jennyfer J Barco | last post by:
Hello, I have a datagrid that brings some information from a query. I need to have a checkbox in each row so the user can select the rows he wants to reprint. Is it possible to have a checkbox...
2
by: Hennie | last post by:
How can I use a checkbox to trigger an add / delete procedure on a datagrid? If the checkbox is checked a field in the datagrid row and a session id must be saved to another table. The problem...
3
by: Mark | last post by:
Hi everyone, could someone please recommend a way to do the following. I have a datagrid which contains a bound template column consisting of checkbox and a string pulled from a database table....
2
by: Nu2ASP.NET | last post by:
What I am trying to do is essentially 'flip' the bits, when the user clicks in the checkbox. For example, if the CheckBox appears checked, and the user un-checks it, I want the underlying data...
4
by: magmo | last post by:
Hi I have created a windows form that hold a datagrid, that datagrid gets it values from a stored procedure. My problem is that I have added a checkbox to the datagrid and applied some style...
0
by: Hennie | last post by:
How can I use a checkbox to trigger an add / delete procedure on a datagrid? If the checkbox is checked a field in the datagrid row and a session id must be saved to another table. The problem...
4
by: mamun | last post by:
Hi All, I have the following situation and am looking for answer in C#. I have a datagrid and putting checkbox next to each record. In the header I have a Delete button. I want users to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.