473,394 Members | 1,718 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,394 software developers and data experts.

Binding to custom class object

I've used the Designer to create a strongly typed Dataset class from a stored
procedure definition. I called this class cMyDSraw, and the table within it
is called MyTable. The Designer generated nested class definitions for
cMyDSraw.MyTableDataTable and cMyDSraw.MyTableDataRow. Everything works fine
-- I can add a dataset of this class to a form and bind controls to the
fields, and they display the results of the sp call properly.

Now I want to derive from this class to provide some custom wrappers for
some of the database columns, by extending the definition of the base class's
nested class for the data row, e.g.:

public class cMyDS : cMyDSraw {

new public class MyTableDataRow : cMyDSraw.MyTableDataRow {

public bool MyBoolCol {
get { return (base.MyTextCol == @"Y"); }
set { base.MyTextCol = (value ? @"Y" : @"N"); }
}
}

The Designer can place an instance of this new derived DataSet class on my
form. However, the only properties available for design-time binding to
controls on the form are the ones in the "raw" class cMyDSraw.

Is this the correct approach? How can a make my "custom" columns such as
"MyBoolCol" visible in the binding dialogs in the Forms Designer?

Nov 17 '05 #1
0 1188

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

Similar topics

14
by: Composer | last post by:
I've read many postings about the problem of Access.References.IsBroken and the consensus seems to be that late binding is the cure-all. I have a very complex Access application that needs...
1
by: Antero | last post by:
I'm desperate! :-/. I'm desperately trying to bind to objects together to share same data and to display it in a windows forms. I'm trying to bind an custom object to custom control property. I...
1
by: matty.hall | last post by:
There's a lot of information out there about data-binding UI objects (i.e. derived from Control) to non-UI custom business objects. Is it possible to do the same without any UI being involved at...
1
by: Demetri | last post by:
Someone posted the following back in June and I am now doing the same thing. I'll just paste what was asked and see if anyone can give us an answer: ...
6
by: Scott Mueller | last post by:
I have a question about simple binding: (please forgive any syntax errors... I am at home, where I do not have Vb.Net installed, and I rely far too much on Vb's intellisense!) If I have two...
19
by: Simon Verona | last post by:
I'm not sure if I'm going down the correct route... I have a class which exposes a number of properties of an object (in this case the object represents a customer). Can I then use this...
8
by: =?Utf-8?B?QXNo?= | last post by:
Hi, I have an object, for example User. User contains various properties which i have been able to bind to successfully using wizards and the form view. However if the class User has a property...
13
by: Jess | last post by:
Hello, I have some questions to do with dynamic binding. The example program is: #include<iostream> using namespace std; class A{
9
by: =?Utf-8?B?VGVycnk=?= | last post by:
Think it is great the way that you can set up a datsource, value member, and display member for a combobox, and map a 'code' to a 'description' and back again by binding the combobox to a...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...

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.