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

Short question about binding

Hi,

I have a class with this fields

private int[] ID
private string[] Name

and a method called Find() that instanciate both arrays and fill it with
data...

for another hand i have another class that inherits from datagrid
how could i bind the data from the first class to the datagrid to show this
data?

Thanks.

Nov 16 '05 #1
1 914
If you need to bind this data to a data grid control then this approach
won't work. You will have to store your data as an array if ID,Name objects

public class Person
{
public int ID;
public string Name;
}

Person[] persons;

DataGrid.DataSource = persons;

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

Josema wrote:
Hi,

I have a class with this fields

private int[] ID
private string[] Name

and a method called Find() that instanciate both arrays and fill it with
data...

for another hand i have another class that inherits from datagrid
how could i bind the data from the first class to the datagrid to show this
data?

Thanks.

Nov 16 '05 #2

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

Similar topics

2
by: Kay Schluehr | last post by:
In mathematics two functions can be considered equal when they represent the same function graph. This is nothing but a set-theoretical identity. It is a nice criterion in theory bad a bad one in...
99
by: Glen Herrmannsfeldt | last post by:
I was compiling a program written by someone else about six years ago, and widely distributed at the time. It also includes makefiles for many different systems, so I know it has been compiled...
34
by: Andy | last post by:
Hi, Are 1 through 4 defined behaviors in C? unsigned short i; unsigned long li; /* 32-bit wide */ 1. i = 65535 + 3; 2. i = 1 - 3; 3. li = (unsigned long)0xFFFFFFFF + 3; 4. li = 1...
8
by: Rachel Suddeth | last post by:
I'm trying to use reflection to create an object at runtime where the type is given by a string. I thought we should be able to do that, but so far it's not working. I'm trying to work on...
2
by: John | last post by:
Hi I can convert time into string using ToShortTimeString. How can I convert a strings like "01:00 pm" or "13:00" to time? Thanks Regards
6
by: Naveed Anwar | last post by:
how a tcp server running on given uri like "soap:tcp://localhost:8080/MyReceiver" will return wsdl. In normal web service case which runs on http returns wsdl by simply appending '?wsdl' in url,...
11
by: JoeC | last post by:
I have been using C++ for several years now and I have been reading about nodes. I am a little confused. I understand many of the concepts behind this such as pointers and dynamic binding. My...
21
by: Roy Smith | last post by:
I'm working on a product which for a long time has had a Perl binding for our remote access API. A while ago, I wrote a Python binding on my own, chatted it up a bit internally, and recently had a...
8
by: wangdaixing | last post by:
I am reading "Programming .NET Components" 2nd Edition by Juval Lowy, O'Reilly. In Appendix E, there is a chapter "Coding Practices" which I agree and practice mostly. However, there are a few...
1
by: qazplm114477 | last post by:
hello, I have notice that when i drag a table/column from my dataset onto my form, VS2008 automatically populates the form with a binding navigator and some other stuff like the tableadapters and...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.