473,386 Members | 2,042 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,386 software developers and data experts.

Datagrid & Not Allowing A Column Edit

CJ
I have a datagrid that for the sake of example has Name, Address, City,
State and Zip

I would like to block the edit on "City" column of the grid while allowing
edits on the remaining columns.

I am missing something. A pointer in the right direction would be
appreciated

Thanks
CJ
Nov 21 '05 #1
2 1860
Hi,

Add a tablestyle to your datagrid. Set the readonly property for
the datagrid text box column you want to be edited to true.

http://msdn.microsoft.com/library/de...asicprimer.asp

Ken
----------------------------
"CJ" <tw******@azalea.net> wrote in message
news:uw**************@TK2MSFTNGP11.phx.gbl...
I have a datagrid that for the sake of example has Name, Address, City,
State and Zip

I would like to block the edit on "City" column of the grid while allowing
edits on the remaining columns.

I am missing something. A pointer in the right direction would be
appreciated

Thanks
CJ

Nov 21 '05 #2
CJ
Thanks Ken!

That's the ticket I was looking for.

CJ
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:Oc***************@tk2msftngp13.phx.gbl...
Hi,

Add a tablestyle to your datagrid. Set the readonly property for
the datagrid text box column you want to be edited to true.

http://msdn.microsoft.com/library/de...asicprimer.asp
Ken
----------------------------
"CJ" <tw******@azalea.net> wrote in message
news:uw**************@TK2MSFTNGP11.phx.gbl...
I have a datagrid that for the sake of example has Name, Address, City,
State and Zip

I would like to block the edit on "City" column of the grid while allowing
edits on the remaining columns.

I am missing something. A pointer in the right direction would be
appreciated

Thanks
CJ

Nov 21 '05 #3

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

Similar topics

3
by: Jade | last post by:
Hi, I wanted to know if anyone know how to use the first column of the datagrid to display values that are pulled from a database, while the second column is one where i can add my own heading....
2
by: Chris Plowman | last post by:
Hi all, I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell...
0
by: Rudolph Araujo | last post by:
Hi, I needed to build a data grid in which the first column has hyperlinks rather than simple text. I found the following code on this newsgroup and it works fine except for one problem. When I...
4
by: Jim Heavey | last post by:
Suppose I am using a series of controls in the footer of a datagrid which allows a user to enter "a new row of information to be added to the datagrid datasource". Some of these controls have a...
1
by: Karine Proot | last post by:
Hello Today I had to build a DataGrid very dynamically <asp:datagrid id="dgTAB" Runat="server" AutoGenerateColumns="False" OnEditCommand="TAB_Edit" OnCancelCommand="TAB_Cancel"...
1
by: sianan | last post by:
I tried to use the following example, to add a checkbox column to a DataGrid in an ASP.NET application: http://www.codeproject.com/aspnet/datagridcheckbox.asp For some reason, I simply CAN'T get...
8
by: Scott Meddows | last post by:
I have a datagrid control that I've inherited from the base datagrid control (Source below). I am applying a datatable style onto the datatable that I assign as my datasource. All of my column...
20
by: Peter | last post by:
I have the following Class, but I would like to make one of the columns in my DataGrid editable, how would I do that? When I use this class none of the columns are editable even when I set the...
8
by: =?Utf-8?B?bWlrZWc=?= | last post by:
Hi, I am building a small Help Desk application for my company and need to be able to edit "open" help desk issues. I use a simple datagrid to display each issue (6 per page) , with an Edit...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.