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

Urgent: How to make a vb.net grid column disabled or read only

34
Hi! I have a datagrid with several columns. I have 2 columns that display images and i want to make them "disabled" or read only. I want these columns to lose their focus. How is this done please?

vbie
Nov 24 '06 #1
3 2352
vbie
34
Hi! I have a datagrid with several columns. I have 2 columns that display images and i want to make them "disabled" or read only. I want these columns to lose their focus. How is this done please?

vbie

why isnt anyone helping anymore? :(
Nov 27 '06 #2
abbaky
2
Hi
I think the below code may help you
1- formatting the Data set columns
2- setting properties for the Data grid columns

With ds.Tables("Tick")
.Columns(0).ColumnName = "Call Status"
.Columns(1).ColumnName = "Cust No"
.Columns(2).ColumnName = "Calling Date"
.Columns(3).ColumnName = "Calling time"
.Columns(4).ColumnName = "Cust Name"
.Columns(5).ColumnName = "Cust Tel."
.Columns(6).ColumnName = "Line No."
.Columns(7).ColumnName = "Transfer Reason"
.Columns(8).ColumnName = "Call Details"
.Columns(9).ColumnName = "Agent Notes"
.Columns(10).ColumnName = "Super Notes"
End With
With DataGrid6
Dim tableStyle As New DataGridTableStyle

tableStyle.MappingName = "Tick"
''''''''''''''''''''''''''''''''''
'' adding the grid coulumns to be formatted
Dim statuscol As New DataGridBoolColumn

Dim column As New DataGridTextBoxColumn
' column = New DataGridColumnStyle
statuscol.MappingName = "Call Status"
statuscol.HeaderText = "Call Status"
statuscol.TrueValue = 1
statuscol.FalseValue = 0
statuscol.ReadOnly = False
statuscol.Width = 40
tableStyle.GridColumnStyles.Add(statuscol)

column = New DataGridTextBoxColumn
column.MappingName = "Cust No"
column.HeaderText = "Cust No"
column.Width = 70
column.ReadOnly = True
tableStyle.GridColumnStyles.Add(column)
Nov 27 '06 #3
vbie
34
Thanks for your response, but what i meant was that the column should be in a disabled state so that the user cannot click on it.
Dec 12 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Mike | last post by:
Hello, I have a few rather urgent questions that I hope someone can help with (I need to figure this out prior to a meeting tomorrow.) First, a bit of background: The company I work for is...
1
by: Ananth | last post by:
Hi, I have a question regarding data grids My application requires me to use a grid for displaying data, however I would not be using a database for procuring the data, instead I would be...
8
by: Christopher Weaver | last post by:
I'm having the hardest time doing the simplest thing. I have a DataGrid bound to a table in a master detail DataRelation within a DataSet relTaskActivities = new DataRelation("TaskActivities",...
1
by: reiks | last post by:
I have a datagrid with two columns-name,id and both are editable. My requirement is that I want my second column(id) as a non updatable column.Though I can change the values of column by...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
5
by: Abhijeet Kumar | last post by:
Hi I am working with ASP.NET2.0, How can i freeze some of the columns of GridView Control. Thanks in Advance.
3
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from...
3
by: Chris Marsh | last post by:
Hello, Is it possible w/ASP.Net to set the property of the radio button control to 'read-only' after the user has made their selection before hitting an 'submit' button? Think of a multiple...
6
by: Romulo NF | last post by:
Greetings again to everyone, Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data,...
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
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
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...
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.