473,739 Members | 3,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't get ITypedList to work with custom collection when binding

I'm building my own version of a readonly DataTable, which needs to bind to
various controls. My data table class has two main collections
(CollectionBase instances): one of columns, one of rows, where each row has
a collection of column values. I have implemented the ITypedList interface
on my rows collection, but when I bind the collection to a grid (asp.net
datagrid) it tells me that the specified properties don't exist. There is no
indication that the ITypedList.GetI temProperties() method is being invoked
so the binding process seems to be ignoring my custom property descriptors.
Any suggestions?
Nov 17 '05 #1
1 2653
"Joe Jax" <jj@nowhere.com > wrote in message
news:ua******** ********@TK2MSF TNGP09.phx.gbl. ..
I'm building my own version of a readonly DataTable, which needs to bind
to various controls. My data table class has two main collections
(CollectionBase instances): one of columns, one of rows, where each row
has a collection of column values. I have implemented the ITypedList
interface on my rows collection, but when I bind the collection to a grid
(asp.net datagrid) it tells me that the specified properties don't exist.
There is no indication that the ITypedList.GetI temProperties() method is
being invoked so the binding process seems to be ignoring my custom
property descriptors. Any suggestions?


Solution for anyone with the same problem in the future...

Additionally implement the ICustomTypeDesc riptor on the row class. Use .NET
Reflector on the DataView and DataRowView classes for an example of how to
do this.
Nov 17 '05 #2

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

Similar topics

0
1210
by: Guenter | last post by:
Hi, I am trying to use the ASP.NET 2.0 FormView as a method to enter data into my business object. At the moment, I am trying to do this without a custom DataSourceView control, but I can't seem to get it working. I have this code in my Page_Load method (unconditionally, i.e. outside of ans "if !IsPostBack" blocks): ctlView.DataSource = currentAccount.GetAccounts();
5
1911
by: Just Me | last post by:
Given a button name Btn_5 and Index=5 I want to do something like dim zz as string = Btn_??Index??.Text or given an array of buttons, do:
6
6508
by: Carlos Albert | last post by:
Hi everybody, I'm working with a gridview (4 bound columns and 1 template column, using databind from codebehind). It works just fine, but I tried to add paging, and when I click any paging button (next, last, or page #), it return this error and I don't know what's wrong: Source Error: An unhandled exception was generated during the execution of the
14
6888
by: joey.powell | last post by:
I am using VS2005 for a windows forms application. I need to be able to use a worker thread function to offload some processing from the UI thread. The worker thread will need access to a datagridview on the form. I am using the following code to spawn the worker thread... Thread WorkerThread = new Thread(new ThreadStart(WT_MyFunction)); WorkerThread.IsBackground = true; WorkerThread.Start(); The problem I am having is...I cannot seem...
3
3181
by: cannontrodder | last post by:
I am displaying names and other details of my users in a Formview control by binding my custom business object to it. My custom object also has a property that is a collection of boolean values and I would like to show a checkboxlist within my formview to represent them. I just have no idea how to bind this collection to a list within the formview? Has anyone got any ideas on this? I don't need the full code, just a pointer in the right...
2
2216
by: Merk | last post by:
I'm new to .NET (using 2.0) and was wondering how to go about binding a collection of custom classes to a DataGrid. The class exposes 5 read-only String properties. I would like for each of these properties to appear in a column in the DataGrid. The end result would be that when the collection has 35 objects in it, the DataGrid would have 35 rows and 5 columns (after being bound to the collection).
11
1940
by: Norbert Ruessmann | last post by:
Hello group, I have a problem with ObjectDataSource and ITypedList. At the end of this entry you find the implementatiopn of my List class, derived from ArrayList and implementing ITypedList. All items contained in the list are of type Person, which is a class derived from nothing and implementing no Interfaces. I put a DataSourceObject on my form and a Gridview. The DataSourceObject's select method is GetAllPersons.
1
1923
by: Suresh | last post by:
Using ASP.NET 1.1 ---------------------- I have a custom collection of object that I'm binding to a datagrid. Each of these objects have another collection inside them. I have a user control that renders the nested collection into html table. See sample code below. Now this binds fine and my sub collections are rendered fine by my user control and list appears as it should. The problem is when I do paging. The sub collections do...
5
1558
by: bz | last post by:
Hi, I create a class that retrieves a number of records from database. Internally, the class store the returned data in a datatable / datareader. I would like to bind a listbox to that class (to the records from this datatable), using data binding wizard and to be able to select bind to object How should I make this class to be able to accomplish this? Do I have to define it to implement some interface? Which one? I want to bind...
0
8969
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
8792
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
9479
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
9337
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
9209
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
8215
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...
1
6754
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...
2
2748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
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.