473,387 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

overriding DataSource Property

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 3934
nukefusion
221 Expert 100+
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
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...
1
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...
4
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 =...
1
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...
3
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...
0
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...
3
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...
1
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...
5
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
0
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...
0
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
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...

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.