473,378 Members | 1,507 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,378 software developers and data experts.

Readonly checkbox in Datagrid

Hi Group,

I have a checkbox column in a web datagrid which is related to a "Product in
stock" property.
The grid is in view mode, so the user can't (and shouldn't) change anything
in the grid.

What I need is to show a "ReadOnly" checkbox in the grid, but not a disabled
one (grayed out).
I'm using a template column and the only property I can set is "enabled".

There is no "ReadOnly" attribute like for the <INPUT type=... > HTML
controls

Anyone knows how to do that ?

And I don't want to replace the checkbox with letters or words, like Y/N,
Yes/No, etc. It has to stay a checkbox.

This is the code I use:

<ItemTemplate>
<asp:CheckBox
id=chkInStock
Checked='<%# DataBinder.Eval(Container, "DataItem.InStock") %>'
Runat="server"
Enabled=False > *** to be replaced...***
</asp:CheckBox>
</ItemTemplate>

Many thanks.
Andrei.

Nov 17 '05 #1
0 3084

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

Similar topics

2
by: Learning SQL Server | last post by:
Forgive the repost, but this is really troublesome and I hope SOMEONE can shed some light on it. I am trying to update a datarow via in-place editing from a dataset stored in session. When I...
3
by: Cyril | last post by:
Hi every body, How can i have a readonly checkbox and checkboxlist ? thanks very much.
3
by: ruca | last post by:
Hi, I have two different questions to ask: QUESTION 1: Can I create dinamically a column in a datagrid? How? I have a datagrid that must have 5 columns, but in some very special cases I have...
0
by: Ben | last post by:
How would you set the Bound column of a datagrid to ReadOnly dynamically? Tried dgList.Columns.ReadOnly = true; but not successful. Thanks, Ben
3
by: simchajoy2000 | last post by:
Hi, I have a datagrid in a VB.NET form with a set number of rows that the user is required to fill out. But I don't want to allow the user to add or delete rows from the datagrid. The only way...
1
by: Marco | last post by:
I'm having some a really weird issue with datagrids. Basically they work fine until you update the data while a cell is selected. If you do that then the old selected cell will remain on the...
1
by: CR | last post by:
Is there something I am missing? I have a user interface which needs to be the same whether in view, or edit mode, and it contains checkboxes. How can I make my checkboxes readonly, similar to the...
3
by: Chubbly Geezer | last post by:
In VB 2005 my toolbox is missing the Datagrid control. I can cut and paste from another app and that's fine, but I cannot add new. Any suggestions please?
0
by: jdbss | last post by:
I'm using an unbound checkbox within a datagrid, listed below, and setting the initial value during page_load based upon some critieria. The problem is when I "Uncheck" a value that was...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.