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

Home Posts Topics Members FAQ

overriding DataSource Property

24 New Member
Dear friends

I have a problem with overriding the DataSource Property of DataGridView.

I wonder if anyone can help me to find good solution for this issue .

Expand|Select|Wrap|Line Numbers
  1. public class  myGrid : DataGridView 
  2. {
  3.   // how can I override the DataSource Property
  4.  
  5. }
Thank you .
May 19 '09 #1
1 3948
nukefusion
221 Recognized Expert New Member
Hi mironline,

Because the DataSource property is not exposed as virtual the only thing you can really do is shadow it using the "new" keyword. It might help to explain what you are trying to achieve as there may be a better solution.
May 29 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
4596
by: Brian Takita | last post by:
Hello, I am trying to Implement a DataSource property for a custom control using a ListView. This DataSource should be like all other DataSource properties for data bound controls in .NET. The DataSource accepts an object that eventually points to an IEnumerable. So far, I am able to extract the IEnumerable object from the DataSource.
1
1255
by: praveen benna via DotNetMonster.com | last post by:
hi, I wanted to create windows custom control which contains a tree view and grid.The tree view contains folder directory and grid reflects the contents of selected folder.(similar to windows explorer window) In order to populate data in to the widget i need to define the datasource property for the widget so that either i can bind at design time or at runtime.can any one help me regards praveen
4
6523
by: David Webster | last post by:
I have the following bit of code (which works fine): Dim Customer As New CCustomer mFrmOrder.lstCustID.DataSource = Customer.getCustomers.Tables("data") mFrmOrder.lstCustID.DisplayMember = "surname" mFrmOrder.lstCustID.ValueMember = "custID" mFrmOrder.lstCustID.Refresh() mFrmOrder.lstCustID.ClearSelected() Customer = Nothing
1
1234
by: Fred Dag | last post by:
Hi, I am trying to get the DataSet from a Repeater using its DataSource property from an event handler. I am getting Null instead. Should the DataSource persist when the event hadler is called or is Null the expected result? Still trying to understand the event model.
3
2592
by: Charles Law | last post by:
This is driving me mad. Can someone please put me out of my misery? I have a DataSet which I wish to use as the data source for a grid control (it is actually an Infragistics grid). When I assign to the DataSource property like this UltraGrid1.DataSource = MyDataSet I get the following exception:
0
1596
by: lanmou | last post by:
hi, I have a listbox whose datasource property is set.i would like to delete the item from the listbox after the records of that item are deleted from the database.the selecteditem.clear or refresh nothing is working.is there a way to delete the item from the listbox while its datasource property is set?? thanks,
3
1442
by: PJ6 | last post by:
If I have a DataGridView in my form, when I click on the DataSource property, I get a message box displaying the exception message, "Object reference not set to instance of an object." What's even more amusing is if I try to set the property using the little box that pops up immediately after I add a DataGridView to my form, the IDE crashes. Uh... is there a fix for this?
1
1743
by: progressdll | last post by:
I'm trying to change the behaviour of setting the DataSource property of combobox. Here is the behaviour I now see. Setting the DataSource property of combobox to an ArrayList will visual display the first value in the Text field of the combobox. ( or setting the Text property ).
5
8001
by: Ken Varn | last post by:
I have just started using VS.NET 2005 after using VS.NET 2003. One of the things that I noticed is that in ASP.NET, the DataSource property for TextBoxes and other web controls is no longer available from 2003 to 2005. Is there some other method available to bind TextBoxes that I am not seeing? I have seen some articles on the web stating that you can only bind to grid and list controls. Seems like a step backward to me. Why would the...
0
8403
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
8833
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
8737
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
8610
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...
1
6174
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
5636
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
4168
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...
1
2735
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
1730
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.