I have a datagrid on my form that displays its data from various tables
within a specified dataset.
That all works correclty.
However, when one cell is selected prior to changed the displayed table, the
cell from the old table remains visible, infront of the new tables data...?!
I have tried 'datagrid.refresh', 'DataGrid1.DataSource = nothing' and all
sort of tricks to try and update the display, but to no avail. My code looks
like this to update the datagrid:
Private Sub PopulateGridWithTable2(ByVal Keyword As String, byVal Value as
int)
DataGrid1.DataSource = Table2
DataGrid1.Visible = True
Dim myDataColumn As DataColumn
Dim myDataRow As DataRow
myDataRow = Table2.NewRow()
myDataRow("Keyword") = Keyword
myDataRow("Value") = Value
Table2.Rows.Add(myDataRow)
DataGrid1.Refresh()
End Sub
If anyone can help - please post a quick reply. Its driving me nuts. 3 1915
There have been various posts on the newsgroups concerning this. It's
a bug that's in the .NET Framework Service Pack 1. It has to do with
GridColumnStyles and the ReadOnly attribute from what I understand.
Some people have said that if you change ReadOnly to false before
updating the DataGrid that it will solve the problem; however, I have
not been able to solve the problem yet. I would also be interested to
hear what other people have on this.
Raymond
Can anyone help with this? I'm having a real problem getting the datagrid to
get rid of a cell in a table that has the cursor in it. Even when changing
the datasource to another table and displaying its cells, the previous cell
with the cursor in it remains displayed in front of any new tables.
Any suggestions?
"JJ" <ab*@xyz.com> wrote in message
news:Oe**************@TK2MSFTNGP12.phx.gbl... I have a datagrid on my form that displays its data from various tables within a specified dataset. That all works correclty.
However, when one cell is selected prior to changed the displayed table, the cell from the old table remains visible, infront of the new tables data...?!
I have tried 'datagrid.refresh', 'DataGrid1.DataSource = nothing' and all sort of tricks to try and update the display, but to no avail. My code looks like this to update the datagrid:
Private Sub PopulateGridWithTable2(ByVal Keyword As String, byVal Value as int)
DataGrid1.DataSource = Table2
DataGrid1.Visible = True
Dim myDataColumn As DataColumn
Dim myDataRow As DataRow
myDataRow = Table2.NewRow()
myDataRow("Keyword") = Keyword
myDataRow("Value") = Value
Table2.Rows.Add(myDataRow)
DataGrid1.Refresh()
End Sub If anyone can help - please post a quick reply. Its driving me nuts.
I chose to avoid this problem by having a datagrid for each table. Not the
best solution I'm sure, but I could not think of any other simple way around
it.
"JJ" <ab*@xyz.com> wrote in message
news:Ox*************@tk2msftngp13.phx.gbl... Can anyone help with this? I'm having a real problem getting the datagrid to get rid of a cell in a table that has the cursor in it. Even when changing the datasource to another table and displaying its cells, the previous cell with the cursor in it remains displayed in front of any new tables.
Any suggestions?
"JJ" <ab*@xyz.com> wrote in message news:Oe**************@TK2MSFTNGP12.phx.gbl...I have a datagrid on my form that displays its data from various tables within a specified dataset. That all works correclty.
However, when one cell is selected prior to changed the displayed table, the cell from the old table remains visible, infront of the new tables data...?!
I have tried 'datagrid.refresh', 'DataGrid1.DataSource = nothing' and all sort of tricks to try and update the display, but to no avail. My code looks like this to update the datagrid:
Private Sub PopulateGridWithTable2(ByVal Keyword As String, byVal Value as int)
DataGrid1.DataSource = Table2
DataGrid1.Visible = True
Dim myDataColumn As DataColumn
Dim myDataRow As DataRow
myDataRow = Table2.NewRow()
myDataRow("Keyword") = Keyword
myDataRow("Value") = Value
Table2.Rows.Add(myDataRow)
DataGrid1.Refresh()
End Sub If anyone can help - please post a quick reply. Its driving me nuts.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: lu |
last post by:
I have a page with datagrid (for viewing,
delete,edit,update) and text fields with button to add
info to database.
When user comes to page the datagrid selects info from
database, binds in...
|
by: Diego TERCERO |
last post by:
Hi...
I'm working on a tool for editing text resources for a family of software
product my company produces.
These text resources are found in a SQL Server database, in a table called...
|
by: Celine |
last post by:
I am building a website using C#, asp.net and SqlServer. I need to
store a lot of images in my database. I need to store thumbnails but
also larger pictures(when user clicks thumbnails a larger...
|
by: Joe Bloggs |
last post by:
I am trying display the contents of a table in a web page, select
certain rows from that table and then display the fields that I have
selected (now table columns) as text in a Label object....
|
by: Doug |
last post by:
Hi
I have the following code (not mine) that populates a datagrid with some
file names. But I want to replace the datagrid with a combo box.
private void OnCurrentDataCellChanged(object sender,...
|
by: Daniel Walzenbach |
last post by:
Hi,
I want to display a Label in a DataGrid according to some condition. I therefore check whether the condition is true in the ItemDateBound EventHandler of the DataGrid. Unfortunately the...
|
by: ringo |
last post by:
I've come accross an interesting problem populating an asp.net datagrid. I am trying to bind
XML data to a datagrid as I've done in countless other applications, the only difference this
time being...
|
by: CanoeGuy |
last post by:
I have been trying for the last two weeks to display a dynamic DataGrid. The
data that I'm pulling from a SQL Server DB will have whole columns that will
be either NULL or 0. I want to display...
|
by: Ron L |
last post by:
I have a dataset whose source is a SQL 2k stored procedure that I am trying
to display in a datagrid. This datasource has 4 columns that I am
interested in here, a text column and 3 value columns...
|
by: rn5a |
last post by:
In my application, I want to populate all the directories & files
existing in a directory on the server in a DataGrid. To ensure that
all the directories get listed first followed by all the files,...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: 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...
|
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,...
|
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: 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...
|
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: 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...
| |