473,509 Members | 2,890 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reproducible DataGrid problem

guy
VS.NET 2003 , .Net Framework 1.1 SP1

Create a new WinForms project with one form.
on the form place a DataGrid and a TextBox.
(Just use the default names)

add the following code:-

Private al As New ArrayList

Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim i As Integer
DataGrid1.DataSource = al
DataGrid1.DataBindings.Clear()
Dim a As New ArrayList
DataGrid1.DataSource = a
DataGrid1.DataBindings.Clear()
Dim s1 As String = "one"
Dim s2 As String = "two"
Dim s3 As String = "three"
al.Add(s1)
al.Add(s2)
al.Add(s3)
DataGrid1.DataSource = al
End Sub

run the application and then click in the text box.
How do I supress the dialogue?

not e that the dummy bind in the middle is tpo froce a refresh otherwise the
data never displays.

help!

Nov 22 '05 #1
1 1087
guy
hmm, if a add the line *** below it works, any idea wahts going on?

Dim i As Integer
DataGrid1.DataSource = al
DataGrid1.DataBindings.Clear()
Dim a As New ArrayList
DataGrid1.DataSource = a
DataGrid1.DataBindings.Clear()
*** al = New ArrayList ***
Dim s1 As String = "one"
Dim s2 As String = "two"
Dim s3 As String = "three"
al.Add(s1)
al.Add(s2)
al.Add(s3)
DataGrid1.DataSource = al

"guy" wrote:
VS.NET 2003 , .Net Framework 1.1 SP1

Create a new WinForms project with one form.
on the form place a DataGrid and a TextBox.
(Just use the default names)

add the following code:-

Private al As New ArrayList

Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim i As Integer
DataGrid1.DataSource = al
DataGrid1.DataBindings.Clear()
Dim a As New ArrayList
DataGrid1.DataSource = a
DataGrid1.DataBindings.Clear()
Dim s1 As String = "one"
Dim s2 As String = "two"
Dim s3 As String = "three"
al.Add(s1)
al.Add(s2)
al.Add(s3)
DataGrid1.DataSource = al
End Sub

run the application and then click in the text box.
How do I supress the dialogue?

not e that the dummy bind in the middle is tpo froce a refresh otherwise the
data never displays.

help!

Nov 22 '05 #2

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

Similar topics

1
332
by: guy | last post by:
VS.NET 2003 , .Net Framework 1.1 SP1 Create a new WinForms project with one form. on the form place a DataGrid and a TextBox. (Just use the default names) add the following code:- Private...
2
9906
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...
5
2568
by: Jeff | last post by:
IDE: VS 2003 :NET OS: XP Pro My app have a form with a tab-control on it. The tab-control have 2 tabpages. One of the tabpages displays a datagrid, and the other tabpage displays details (order...
5
1068
by: Ryan Folstad | last post by:
I've seen a few posts from people wondering why OnInit fires multiple times for one web form. I finally figured it out for my situation. I tested this on both .net 1.1 and 1.0 both were able to...
1
4282
by: Rick | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls...
9
5039
by: tshad | last post by:
How do I find (and set) a couple of labels in the Footer after a DataGrid is filled? I have a bunch of DataGrids that get displayed nested inside a DataList. The datagrid looks like: ...
0
1683
by: optimizeit | last post by:
What I am attempting to do is import an Excel Workbook and display the worksheets in a datagrid dynamically. I am very close to getting this to work. I have to this point successfully imported a...
4
2993
by: geoffp | last post by:
I need to generate reproducible random number series. I've done the obvious - use mt_srand with the same seed. This supposedly will create the same series every time. Is this true? Its not...
9
2708
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
2
6562
by: =?Utf-8?B?Y3JlYXZlczA2MjI=?= | last post by:
I have a nested datagrid in a xaml file, the parent datagrid loads the vendor information and the details loads the documents for that vendor in a datagrid. Everything is working fine until I click...
0
7234
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
7136
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
7344
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
7412
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...
0
7505
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
5652
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,...
1
5060
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...
0
4730
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1570
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 ...

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.