Is it possible to do the following:-
Create an ObjectDataSource object that has an embedded ArrayList of Objects.
Allow the ASP.NET application to create and populate an instance of the
ObjectDataSource...and pass this to a GridView control... I don't want the
GridView control to create its own instance of the ObjectDataSource object.??
this could be where the problem is...
For example I have
a class called ItemLine with properties int _ItemLn, DateTime _ItemDate,
string _Desc, double _Amount...with the usual get/setters
....int ItemLn() { get{ return _ItemLn;} set{ _ItemLn=value;} etc
I then populate an array with ItemLine objects for example
1,12/12/2006,"hello1",3.99
2,13/11/2006,"helo2",2.99
etc
This ArryaLIst of ItemLine is then enclosed in a ItemLineDataSource class
with methods for returning all the items, updating, inserting and deleting
items...
This ItemLineDataSource instance should then be used with the GridView
control!!!
is this possible? 1 2285
Okay I now realise that the ObjectDataSource used with a GridView must be
stateless, have a default zero parameter constructor etc.... so it can't work
on a particular users set of data ie in an arraylist...
"pblack9455" wrote:
Is it possible to do the following:-
Create an ObjectDataSource object that has an embedded ArrayList of Objects.
Allow the ASP.NET application to create and populate an instance of the
ObjectDataSource...and pass this to a GridView control... I don't want the
GridView control to create its own instance of the ObjectDataSource object.??
this could be where the problem is...
For example I have
a class called ItemLine with properties int _ItemLn, DateTime _ItemDate,
string _Desc, double _Amount...with the usual get/setters
...int ItemLn() { get{ return _ItemLn;} set{ _ItemLn=value;} etc
I then populate an array with ItemLine objects for example
1,12/12/2006,"hello1",3.99
2,13/11/2006,"helo2",2.99
etc
This ArryaLIst of ItemLine is then enclosed in a ItemLineDataSource class
with methods for returning all the items, updating, inserting and deleting
items...
This ItemLineDataSource instance should then be used with the GridView
control!!!
is this possible?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Eiriken |
last post by:
Hello everyone,
I am using ASP.NET 2 and trying to bind a objectdatasource to a
gridview. By doing this the most common way by adding an
objectdatasource to the page and by using the wizard to...
|
by: A_StClaire_ |
last post by:
hi all,
I am using a GridView bound to an ObjectDataSource. edit and delete
functionality has been enabled. my ObjectDataSource is tied to a
TableAdapter that accesses three stored procedures...
|
by: David Hubbard |
last post by:
I am using a GridView to display a set of objects that have a parent-child
relationship. Each object, MyBO, has
an ID property that is used to get the children of that object.
class MyBO
{
...
|
by: syl |
last post by:
Hello
I am trying to create a "easy to use" gridview with filters (dropdownlist in
headers), sorting...and much more....
In order to do that, i prefer to use a objectdatasource (ODS) beacause...
|
by: pblack9455 |
last post by:
I have a simple requirement to bind a small ArrayList of (ItemLine) Objects
to a GridView control. The Gridview renders on the page and allows me to
click update/edit buttons...however the data...
| |
by: Greg Lyles |
last post by:
Hi all,
I'm trying to develop an ASP.NET 2.0 website and am running into some
real problems with what I thought would be a relatively simple thing
to do.
In a nutshell, I'm stuck on trying to...
|
by: Barry L. Camp |
last post by:
Hi all,
Wondering if someone can help with a nagging problem I am having using
a GridView and an ObjectDataSource. I have a simple situation where I
am trying to delete a row from a table, but...
|
by: Randy Smith |
last post by:
Hi ALL,
I wonder if anyone has been using n-tier to bind to a GridView control by
using the ObjectDataSource. This is our first OOP web application, and we
have no tables. Right now we are...
|
by: Tomasz |
last post by:
Hello Developers,
Here is interesting problem I just came across: how do I wire a GridView
control programmatically?
Here is my sample code using Object Data Source:
protected void...
|
by: Jonathan Wood |
last post by:
Greetings,
I have a GridView control. For a couple of reasons, I ended up with a
TemplateField to contain my Edit and Delete links, something like this:
<asp:TemplateField ShowHeader="False">...
|
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,...
| |
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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...
|
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,...
|
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...
|
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...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |