473,668 Members | 2,330 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(ByVa l sender As Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim i As Integer
DataGrid1.DataS ource = al
DataGrid1.DataB indings.Clear()
Dim a As New ArrayList
DataGrid1.DataS ource = a
DataGrid1.DataB indings.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.DataS ource = 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 1099
guy
hmm, if a add the line *** below it works, any idea wahts going on?

Dim i As Integer
DataGrid1.DataS ource = al
DataGrid1.DataB indings.Clear()
Dim a As New ArrayList
DataGrid1.DataS ource = a
DataGrid1.DataB indings.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.DataS ource = 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(ByVa l sender As Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim i As Integer
DataGrid1.DataS ource = al
DataGrid1.DataB indings.Clear()
Dim a As New ArrayList
DataGrid1.DataS ource = a
DataGrid1.DataB indings.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.DataS ource = 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 al As New ArrayList
2
9921
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 (multi-select without modifier keys). I got that working fine, but I also wanted to keep rows selected after a sort, which I do by storing the row's id in an arraylist. The idea was to do the sort and then go back and re-select the rows with that...
5
2586
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 date, name, address etc) about the selected row in the datagrid... My problem is when I enter a new record in the details tabpage (saves data to database), and go back to the datagrid. Only the data from the PM-table
5
1073
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 reproduce. Create a new c# web app. in WebApp1.aspx add the following html: <table><tr><td background="#000000"></td></tr></table> Place a Break in the Web designer generated OnInit.
1
4314
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 (watch the layout, some have child controls):
9
5053
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: ******************************************************************************* <asp:DataGrid visible="False" border=1
0
1693
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 single worksheet into a dataset. I successfully built a dynamic datagrid. And I did successfully bind it to the dataset. Then I added the datagrid control to a PlaceHolder. The first worksheet displays beautifully. The next step is to allow...
4
3005
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 working for me. By the way, seeding mt_srand with different integers doesn't necessarily produce different series. I've done a little testing and every pair of consecutive even and odd numbers produces the same series. eg. seed 0 and 1
9
2714
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 code: <script runat="server"> Dim sqlConn As New SqlConnection(".....") Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) If Not (Page.IsPostBack) Then FillDataGrid()
2
6584
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 in the child datagrid and then go to the combobox and choose another vendor. When the new vendor is loaded nothing shows in the datagrid but the itemsource shows the info is there. Know if I click on the child cell and then click back on the...
0
8459
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
8374
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8791
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
8653
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
7398
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...
0
5677
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2018
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1783
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.