473,657 Members | 2,716 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Wierd problem: set DataGird's DataSource at runtime

Hi,
I found a wierd problem in DataGrid.
If I set DataGrid's DataSource to empDataSet1 at designtime,
then I can never change its DataSource at runtime, e.g., in the
Button1_Click event procedure:

DataGrid1.DataS ource = dataView1;
DataGrid1.DataB ind();

But if I clear DataGrid's DataSource property at designtime,
then I can change its DataSource to any object at runtime.

It's really wierd, isn't?

Nov 20 '05 #1
0 1105

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

Similar topics

0
1227
by: Freddy | last post by:
I have 2 tables in a dataset. One of them is child to the other. In my dataset, I specify both default views to allowdelete = false My datasource table of the datagird is the master table and I allow navigation in my datagrid. In the master table, I cannot delete rows witch is good
4
3470
by: Eric | last post by:
Hi, can anyone guide me throught this: In my application, I have a global DataSet. I then run FTP processes in up to 10 simultaneous threads and each thread calls progress events in the main application. When a progress event is called, the main application writes the input to the global DataSet. Occasionally, the DataSet writes itself to an XML file. This all works fine. - But you can't see what's going on.
0
990
by: timon | last post by:
I have create a Datagird in the window form. How can I set the column name in the datagird?
3
1788
by: Matthew Woods | last post by:
Hi, is there any way to format and order the columns displayed in a datagrid bound to a class that inherits from IBindingList? i have used DataGridTableStyle and added DataGridTextBoxColumns to it in the correct order which works fine if the dataGrid.dataSource = "ArrayList", but it doesn't work for my IBindingList wrapper. If i bind the datasource to the arraylist method then the ListChangedEventHandler is never invoked and my grid only...
2
1460
by: Gaurav Gargate | last post by:
To Group, I am creating a datagrid in an ASP.NET project (C#) at the design time. I will be adding the columns to the datagird at run time. The number of columns, name of the columns, data in the rows etc. will all be decided on the run time. I am using the simple grid.Columns.Add(BoundColumn).... method. BUT I am not able to sort these columns even if the AllowSorting property has been set to true.
2
3838
by: Multithreading problem in vb.net | last post by:
Greetings, I am new to multithreading and I am trying to implement it in my app. This application is distributed application which needs to refresh every say 5 secs to show some activities in the datagrid. I have implemented querying the database in a separate thread and and then showing it in the datagrid in the UI thread. It all works fine and the datagrid gets updated every 5 secs. This happens in the desktop (Main form) of the...
1
888
by: mfleet1973 | last post by:
Boy do I ever have one for you guys... I have multiple cells in my datagrid. If I click with my mouse on the any cell other than the first cell, the text in the cell that I clicked on gets the value of the first cell in the datagird automatically. I even removed the datagridtablestyle from the datagrid and the problem still occurs. Has anyone ever seen anything like this before?
3
2446
by: =?Utf-8?B?Q3ltZXI=?= | last post by:
When the datagrid has multi rows and the vertical scrollbar hasn't appeared, if I click the column near the bound or drag horizontal scrollbar, this exception will be throwed. The trace stack as follows: at System.Windows.Forms.DataGrid.CreateScrollableRegion(Rectangle scroll) at System.Windows.Forms.DataGrid.set_HorizontalOffset(Int32 value) at System.Windows.Forms.DataGrid.ScrollRight(Int32 columns)\ at...
8
13608
by: jesmi | last post by:
my code is: addRecord.cfm <cfinclude template="head.cfm"> <p> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="0"> <tr> <td> <div align="center">
0
8385
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
8821
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8723
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...
1
8502
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8602
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
7316
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
5632
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
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1941
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.