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

formview and datasource as collection

I am trying to use some of the new controls in VS 2005 but
am having some difficulty.

My business logic layer returns Collections of my business objects.
I am used to just assigning these collections to a datagrid's datasource
property. With the new controls I can still do the same but it appears
that the automatic insert,edit, etc. features are not enabled if I do so.

I see that the Formview, and others, have a DataSourceID property
but my Collections don't implement the IDataSource interface nor am
I completely comfortable implementing it.

I hestitate to use the new ObjectDataSource control because it seems
like I lose some flexibility. I am used to manipulating collections.

Any thoughts.
Thanks Mike

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Apr 2 '06 #1
3 1667

"Mike Gaab" <mi****@montana.com> wrote in message
news:11*************@sp6iad.superfeed.net...
I am trying to use some of the new controls in VS 2005 but
am having some difficulty.

My business logic layer returns Collections of my business objects.
I am used to just assigning these collections to a datagrid's datasource
property. With the new controls I can still do the same but it appears
that the automatic insert,edit, etc. features are not enabled if I do so.

I see that the Formview, and others, have a DataSourceID property
but my Collections don't implement the IDataSource interface nor am
I completely comfortable implementing it.

I hestitate to use the new ObjectDataSource control because it seems
like I lose some flexibility. I am used to manipulating collections.


An example, if I am using a Formview and I set it up with the edit
templates, etc. and then assign my collection of business object to the
Formview's DataSource, I don't get any of the free functionality with
the templated items.

Mike

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Apr 2 '06 #2

An example, if I am using a Formview and I set it up with the edit
templates, etc. and then assign my collection of business object to the
Formview's DataSource, I don't get any of the free functionality with
the templated items.


It seems like I should be able to switch modes at runtime.
I've tried doing that using the ChangeMode(...) method but
I must be missing something.

Mike


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Apr 2 '06 #3

"Mike Gaab" <mi****@montana.com> wrote in message
news:11*************@sp6iad.superfeed.net...

An example, if I am using a Formview and I set it up with the edit
templates, etc. and then assign my collection of business object to the
Formview's DataSource, I don't get any of the free functionality with
the templated items.


It seems like I should be able to switch modes at runtime.
I've tried doing that using the ChangeMode(...) method but
I must be missing something.


I did finally get this to work. The only thing that I don't completely
understand is that I must call DataBind() after ChangeMode(...).
If I don't call DataBind(), nothing happens. Does that make sense
or is that just a hack. I am not used to
programming in .Net so some stuff is a tad foreign. Getting there but
it is taking a while.

Mike

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Apr 3 '06 #4

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

Similar topics

0
by: Guenter | last post by:
Hi, I am trying to use the ASP.NET 2.0 FormView as a method to enter data into my business object. At the moment, I am trying to do this without a custom DataSourceView control, but I can't...
1
by: Shawn Wildermuth | last post by:
I have a *single* SqlDataSource that loads up a single result set that I show in a GridView. In the GridView, i've added a "Select" button and handling the SelectedItem event. I also have a...
3
by: sck10 | last post by:
Hello, I am creating a form for users to enter information about a lab and the members of the lab. I have one form (FormView) that they use to enter information about that lab. The keyvalue is...
2
by: P. Yanzick | last post by:
Hello, I am creating an edit template for a FormView control, changing one of the textboxes to a dropdown box. The dropdown will be populated from a simple table with the primary key, and a...
1
by: sck10 | last post by:
Hello, I have a GridView that has AutoGenerateSelectButton="true". When the "Select" link is clicked, it opens a FormView with the appropriate data. Below is the following SelectParameter that...
1
by: cisco | last post by:
I've been trying to figure out how the client of a DetailsView or FormView should handle the ItemUpdating event when setting the datasource programatically. I want to do something simple like...
2
by: Kelly | last post by:
I'm fairly new to ASP.NET2, but I have an ASP 3.0 background, and I've been experimenting with the DataSource and FormView widgets. I wound up having some questions along the way which I hope you...
0
by: =?Utf-8?B?TGFkaXNsYXYgTXJua2E=?= | last post by:
Hello, I read some msdn and other articles about how does databinding among DataSource controls and FormView / GridView controls works but I still don't fully understand to this blackbox. I have...
1
by: andy | last post by:
I have several forms with formviewa on them. When a new record is inserted the users want to see the readonly version of that record. Default behaviour is to show the first record in the...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
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 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.