473,748 Members | 8,773 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid readonly column problem

My datagrid has a big problem, it happens only in columns that are read only.
Please see the picture at
http://mega.ist.utl.pt/~pfrg/datagri...id_problem.jpg
The gost that I show it?s like a new readonly textbox.
If the selected cell it?s not readonly there?s no problem.
I think that the problem it?s ralated with lose of focus of the datagrid.
After pressing a button, I fill again the datagrid with new datasource but this thing remains, hiding the new value!
Only with scrool I can see that the new value it?s really there but the old is hiding it.
I tried datagrid Refresh() and so many things but nothing works.
Need help please.

Thanks,

--------------------------------
From: Paulo Gon?alves

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>DiTBOMhdu0K MGTS6J1GZMQ==</Id>
Nov 17 '05 #1
1 2534
Hi Paulo,

You can try the following. Create a DataGrid column style derived from
DataGridTextBox Column.
In the derived style, override the Edit method and do nothing in the
overridden implementation.
Use the new grid column style for the problematic column.

Also, make sure you use the grid's SetDataBinding method to bind the grid to
the new datasource.

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"Paulo Gon?alves via .NET 247" <an*******@dotn et247.com> wrote in message
news:O0******** ******@TK2MSFTN GP14.phx.gbl...
My datagrid has a big problem, it happens only in columns that are read
only.
Please see the picture at
http://mega.ist.utl.pt/~pfrg/datagri...id_problem.jpg
The gost that I show it?s like a new readonly textbox.
If the selected cell it?s not readonly there?s no problem.
I think that the problem it?s ralated with lose of focus of the datagrid.
After pressing a button, I fill again the datagrid with new datasource but
this thing remains, hiding the new value!
Only with scrool I can see that the new value it?s really there but the
old is hiding it.
I tried datagrid Refresh() and so many things but nothing works.
Need help please.

Thanks,

--------------------------------
From: Paulo Gon?alves

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>DiTBOMhdu0K MGTS6J1GZMQ==</Id>


Nov 17 '05 #2

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

Similar topics

0
1569
by: Job Lot | last post by:
I have an Expense Data Entry form which contains a DataGrid showing various expense categories. There are three columns Description, Cash Exp, Credit Exp, where Description column is readonly. Users have to press a checkbox to specify whether they want to use DataGrid to provide break-up or provide total value in textbox. Now when checkbox is unchecked I am setting the Enabled property of DataGrid to False and vice versa. The problem is...
2
1872
by: PAUL GROSSMAN | last post by:
Hello everyone. I am working with a DataGrid using VB .Net (Windows Forms). I want to make one of the columns un-editable. I was able to do that by setting the .dsName.Tables("TblName").Columns("ColName").ReadOnly = True That made it so you can't change the value in the column, but you're still tabbing into the column (despite the fact you can't change it).
0
3191
by: Morné | last post by:
Hi how do I validate a text value in a datagrid e.g. the user is only allowed to type in a Y or a N. I specifically have a problem with using the PropertyDescriptorCollection. I get the following error: "Additional information: Cannot create a child list for field Query." Below my existing code:
3
3029
by: PeterZ | last post by:
G'day, After doing much searching and pinching bits of ideas from here there and everywhere I came up with a fairly 'clean' solution of including a comboBox into a dataGrid column. You can download a fully working C# sample with the Northwind.mdb here: www.insightgis.com.au/web/stuff/DataGridCombo.zip
1
1426
by: tfs | last post by:
I am reading into a datagrid and can't seem to get the "execution time" column (the 3rd column) to move to the right. My problem is that the last character in the 2nd column is right up against the end of the column and the 3rd column is too close and confusing. So I was trying to move the data in the 3rd column over a few spaces. So I did the following:
2
6412
by: CSL | last post by:
I am using the DataGrid in a Windows Application, how can I adjust the widths of each column individually.
14
1297
by: scorpion53061 | last post by:
In this code what do I have to do to get the read only and Height property to work? this is going into a datagrid. Dim BOOKSLABEL As New ColoredTextBoxColumn BOOKSLABEL.TextBox.BackColor = System.Drawing.SystemColors.Desktop BOOKSLABEL.MappingName = "Label" BOOKSLABEL.HeaderText = "Possible Fields" BOOKSLABEL.Alignment = HorizontalAlignment.Left BOOKSLABEL.TextBox.Height = 150
4
1828
by: Steve | last post by:
I am fairly new to VB.NET, and I am rewriting an application I wrote a while back, also in VB.NET. I aplied some new things I learned. Anyway, here is my problem....... I have a custom DataGrid with a buttonRow that does a delete function for me. Microsoft support helped me back then to get this done. Here is part of the code that creates the dataGrid: Dim ButtonColStyle As DataGridButtonColumn
8
1552
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 but one are set as readonly=true. The writeable column does not update when I'm editing it. Is there something different that I need to be doing to update this data? Also, how do I get the "new row" to not appear at the bottom of the datagrid?...
0
8991
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9372
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9247
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8243
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2783
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.