473,387 Members | 1,502 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.

iTypedList - GetItemProperties() - generating properties at runtime

Hi. I am making an application using the Compact Framework for a PPC.
Essentially what I am trying to do is, read a table from a external
datasource, and try to display it using the datagrid. For my purposes, I
can't use DataTable and DataSet, etc. etc. ie. So I am implementing
iTypedList. To put it simply, I need to override the 'Count' property such
that the datagrid will know the exact number of elements in my external
datasource, but only retrieve the rows on a needed basis (instead of loading
the complete table consisting of 1000's of rows into memory using a
DataTable/DataSet). Sadly, I can't just extend DataTable since the methods I
need to override are not virtual/override.

Now the problem occurs when I am implementing the GetItemProperties() method
in iTypedList. Typically, you would just retrieve all the necessary
properties from the "Row" object and create the the
PropertyDescriptorCollection object. Now my problem is, until I read the
table from the external data source, I don't know what the "Row" objects
properties should be (ie. I don't know the schema of the row object until
run-time). I was trying to figure out how DataRow/DataTable did this, but
had no luck.

DataRow seems to have an 'Object [] ItemArray' property which looks
promising. Sadly, I couldn't figure out how to create the
PropertyDescrptorCollection using an Array object. If I could figure this
out, all I need is one array object, and my schema/data values will be
contained within this array. Then within the GetItemProperties() method I
can generate the proper descriptors. The other option would be to I guess
generate a custom "Row" object with the correct schema during runtime. But
since the PropertyBuilder class is not supported under the Compact
Framework, I don't think that's feasible - or memory efficient for that
matter..

If anyone has any suggestions, that would be great!. Thanks in advance.

Chankama
Nov 15 '05 #1
0 2368

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

Similar topics

0
by: Alx Sharp | last post by:
Hello group! I got a little question for you all... I've created two classes (FirstCollection and SecondCollection) that implements some interfaces: IBindingList, IList, ICollection,...
1
by: Joe Jax | last post by:
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,...
7
by: Venus | last post by:
Hello, I am trying to generate a dynamic form at runtime and would like to do it using "<asp: ..." form elements as follows Build up the string that is placed somewhere in the HTML code the...
2
by: RichardG | last post by:
I have an object data class that Inherits from a java class and implements System.Runtime.Serialization.ISerializable as I only need to transfer across three properties, string, array of objects...
3
by: cwertman | last post by:
I have a question regarding dynamic properties. I have an Object say Account --Id --Prefix --Fname --Lname --Suffix
11
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....
7
by: Ronald S. Cook | last post by:
In a .NET Windows app, if I set somehting like the title of the form to "MyApp" at run-time, will that make the app run slightly slower than if I had set the title at design-time? Thanks, Ron
3
by: segecko | last post by:
Hi I have a created a custom usercontrol which inherites an Excel like usercontrol. In this usercontrol I have a custom property called SpreadTemplate, which is an enum with (at the moment) two...
7
by: Norman Diamond | last post by:
A project depends on VC runtime from Visual Studio 2005 SP1, and DotNet Framework 2. Options are set in the setup project properties, so if these two dependencies are not already installed then...
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: 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: 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: 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
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
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...
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,...

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.