473,473 Members | 2,032 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

No default member found for type myclassname

304 Contributor
hi,
I have binded an arraylist to a datagrid.
the items in the arraylist are objects of type myclassname.
Now, when i try to bind the columns through a template field, i get this error :-
No default member found for type myclassname

any idea as to how i could resolve this issue?
May 3 '07 #1
2 2096
Plater
7,872 Recognized Expert Expert
Does your custom class have members with the names supplied in your template?

I believe you must use like:
Expand|Select|Wrap|Line Numbers
  1. public string Name
  2. {
  3.    get
  4.    {
  5.       return _namestring;
  6.    }
  7. }
  8.  
rather than:
Expand|Select|Wrap|Line Numbers
  1. public string Name()
  2. {
  3.    return _namestr;
  4. }
  5.  
But other then that, I'd need more details about the situation.
May 3 '07 #2
gomzi
304 Contributor
Does your custom class have members with the names supplied in your template?

I believe you must use like:
Expand|Select|Wrap|Line Numbers
  1. public string Name
  2. {
  3.    get
  4.    {
  5.       return _namestring;
  6.    }
  7. }
  8.  
rather than:
Expand|Select|Wrap|Line Numbers
  1. public string Name()
  2. {
  3.    return _namestr;
  4. }
  5.  
But other then that, I'd need more details about the situation.
I used the first kind. i.e. get and set
Anyway, wanted to finish it off, so i opted for a datatable instead.
thanks anyway.
May 3 '07 #3

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

Similar topics

10
by: Edward Diener | last post by:
Is the default 'false' for the CLSCompliant attribute at the assembly level ? Are there any tools to check for CLS compliance for the various NET languages ?
4
by: Steven T. Hatton | last post by:
I mistakenly set this to the comp.std.c++ a few days back. I don't believe it passed the moderator's veto - and I did not expect or desire anything different. But the question remains: ISO/IEC...
2
by: Gary | last post by:
Hi, I am a Chinese student, I have a problem with the following code //The follwing code in StaticSearch.h: // template <class Type> class dataList; // template <class Type> class Node ...
2
by: Andreas Klemt | last post by:
Hello, what is the difference between a) Protected WithEvents myClassName b) Protected myClassName Thanks, Andreas
0
by: Mike Schnorr | last post by:
I have a ASP.Net application that uses assemblies from several other solutions. When testing the applications on my machine I build all the referenced assemblies using nmake. The latest assemblies...
5
by: Stacey Levine | last post by:
I have a webservice that I wanted to return an ArrayList..Well the service compiles and runs when I have the output defined as ArrayList, but the WSDL defines the output as an Object so I was...
1
by: tshad | last post by:
I have a collection class(exChain), for my Exception log which is getting the following error: *************************************************************************** No default member found...
23
by: Jess | last post by:
Hello, I understand the default-initialization happens if we don't initialize an object explicitly. I think for an object of a class type, the value is determined by the constructor, and for...
4
by: Jess | last post by:
Hello, I tried several books to find out the details of object initialization. Unfortunately, I'm still confused by two specific concepts, namely default-initialization and...
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
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...
1
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.