I want to bind three elements of an seven element arraylist to a data grid.
I cannot find an example of complex binding specific fields of an array list
to a datagrid.
Any examples would be appreciated.
m_Stat = new Stat(str1,str2, str3,str4,str5) ;
m_arrlstStats.A dd(m_Stat);
grdStats.DataSo urce = m_arrlstStats; // only want to show str1, str2 and
str3 here
grdStats.Refres h();
I could overload the Stat object and put only three elements in another
arraylist, but that does not seem to be best practices. I beleive it would
be best to modify the mapping of the datagrid, but do not know how. All of
the standard examples assume you are useing a database and not an array. How
do you table map an array?
Many thanks
Harry 1 1826
Harry,
You can create a datatable that meet your need and put it to datagrid.
Best regards
Vuong,
Tran Xuan
"Harry" <ma*******@hotm ail.com> wrote in message
news:#Y******** ******@TK2MSFTN GP14.phx.gbl... I want to bind three elements of an seven element arraylist to a data
grid. I cannot find an example of complex binding specific fields of an array
list to a datagrid.
Any examples would be appreciated.
m_Stat = new Stat(str1,str2, str3,str4,str5) ;
m_arrlstStats.A dd(m_Stat); grdStats.DataSo urce = m_arrlstStats; // only want to show str1, str2 and str3 here
grdStats.Refres h();
I could overload the Stat object and put only three elements in another arraylist, but that does not seem to be best practices. I beleive it would be best to modify the mapping of the datagrid, but do not know how. All of the standard examples assume you are useing a database and not an array.
How do you table map an array? Many thanks
Harry This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dan |
last post by:
Very newbie question here:
Any suggestions on how to bind an XML file to a combobox and datagrid? I've
had no problem reading the data in a datagrid. But the combobox is another
story.
I want to select an employees name in a combobox and then display details of
selected employee in a datagrid. So everytime a new employee was selected,
the datagrid would change accordingly. Any good ideas on how this is done?
Would that data be...
|
by: Greg Linwood |
last post by:
I am wondering what the best approach to binding XML data to an asp:Table
from the Page_Load event in a code behind module?
I'm using VB.Net and initially approached this by adding a table to the web
page from the VS2003 ASP page designer, extracting an XML document from SQL
Server during Page_Load, then adding asp:TableRows & asp:TableCells one at a
time / loading the corresponding xml values a cell at a time.
Is there a better (less...
|
by: coleenholley |
last post by:
I have a Class Module written in VB that calls an RPC (written in COBOL) we have written code to read the data from the RPC, and we create a temporary datatable to store the data from the RPC. This works fine when we call the datatable and bind it to a data grid using datagridname.DataBind(), but I have an ASP table, with calculations using tbl_name.row(1).cells(1) and the result of the calculation is put in a specific row and cell.
I have...
|
by: AFN |
last post by:
In VB.NET, I can successfully bind a generic datagrid to a 1 dimensional
array. But, now I want to add a button column, and so I think I need to
make the first column (the one having data in the array) a "BoundColumn" and
the 2nd column my button column. The problem is that the BoundColumn wants
a DataField name. There is none! So how do I bind this one column to the
array column when the array doesn't have column names? And if your...
|
by: Welman Jordan |
last post by:
I have an ArrayList, every item of which is an instance
of a class. If the class has this structure:
public interface ArrayListItemContent (
public string Name { get; set; }
public string Address { get; set; }
public string Phone { get; set; }
}
How can I databind an ArrayList of ArrayListItemContent
| |
by: Morten Hauge |
last post by:
Hi!
I have a problem, I'm not sure if this is the proper way to do it, but I
have the following scenario:
I want to list all categories, and all products in that category whenever I
select a topcategory in a menu.
Example:
- Music
|
by: serge calderara |
last post by:
Dear all,
Does anyone know how to bind a System.Collection.ArraysList object to a
Dataset ?
Thanks for your reply
Regards
Serge
|
by: vineetbatta |
last post by:
I have Custom Data class which stores data about single customer and then i
store that customer objects in arraylist as shown below.
Customer custdata = null; // Custom Data class for 1 customer data.
ArrayList ar = new ArrayList(); // To store more than one customer
object.
for (int x = 0; x < 30; x++)
{
custdata = new Customer();
|
by: pbd22 |
last post by:
Hi.
I am returning to an old bit of code in our program and need to figure
out how to sort
my columns on bind. I am sorting on Date (mostly) and some other
values.
Problem is, the code is an ArrayList that seems to do some
tricky stuff with a chache object and I am unable to get any sort of
sorting happening.
|
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...
|
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...
| |
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...
|
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...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |