Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

Array as a datasource

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David C - 11 Oct 2007 21:52 GMT
I have a FormView that has several columns from a database that need to pick
(using DropDownList) from a static set of values and text as shown below:

value="" text = ""
value="n/a" text="n/a"
value="0" text="No"
value="-1" text="Yes"

Should I use an ObjectDataSource for these or something else?  I have not
used an ObjectDataSource yet, so it is new for me.  Thanks.

David
IfThenElse - 11 Oct 2007 22:03 GMT
If these are all the possible values and will never change then add
manually.

I am interested to know the overhead using   ObjectDataSource

Hope some more opinionated person ( right or wrong) moves you in some
direction because it might not matter.
caching is good also

>I have a FormView that has several columns from a database that need to
>pick (using DropDownList) from a static set of values and text as shown
[quoted text clipped - 9 lines]
>
> David
David C - 11 Oct 2007 22:10 GMT
I have about six columns that will use this so I am looking for a different
alternative that manually entered itemlist.  I could put it a static SQL
table but it seems silly.

David
> If these are all the possible values and will never change then add
> manually.
[quoted text clipped - 18 lines]
>>
>> David
IfThenElse - 11 Oct 2007 22:21 GMT
Assign them to the ItemList, and reuse it over and over again,
I am not asking your user to manually enter anything.

>I have about six columns that will use this so I am looking for a different
>alternative that manually entered itemlist.  I could put it a static SQL
[quoted text clipped - 23 lines]
>>>
>>> David
David C - 11 Oct 2007 22:28 GMT
I meant me entering them in manually in my 12 DropDownList controls (6 in
read, 6 in edit).

> Assign them to the ItemList, and reuse it over and over again,
> I am not asking your user to manually enter anything.
[quoted text clipped - 26 lines]
>>>>
>>>> David
IfThenElse - 11 Oct 2007 22:41 GMT
all you need is to clone and use the ItemsList.
Or I just don't understand what you want?

I had a dropdown list in every row, possibly 25 ( using paging and depending
on page size )
I just clone and reuse my collectionList that holds my items to the dropdown
list

>I meant me entering them in manually in my 12 DropDownList controls (6 in
>read, 6 in edit).
[quoted text clipped - 29 lines]
>>>>>
>>>>> David
David C - 11 Oct 2007 23:16 GMT
I haven't cloned an ItemList before.  How is that done?

> all you need is to clone and use the ItemsList.
> Or I just don't understand what you want?
[quoted text clipped - 37 lines]
>>>>>>
>>>>>> David
IfThenElse - 12 Oct 2007 00:23 GMT
You can bind to the same collection and might not need Cloning.

or

Some classes  provide the Clone Method for you. Like

ArrayList al = new ArrayList();

ArrayList al2 = null;

al2 = al.Clone();

When the Clone Method does not exist then create one yourself.

create an ItemsListCollection object, or what ever collection you want,
then call a Private method you created to populate it from another like
object.  That is cloning.

You can use an ArrayList may be to bind to as above.

>I haven't cloned an ItemList before.  How is that done?
>
[quoted text clipped - 39 lines]
>>>>>>>
>>>>>>> David
David C - 12 Oct 2007 14:54 GMT
Thank you.
> You can bind to the same collection and might not need Cloning.
>
[quoted text clipped - 60 lines]
>>>>>>>>
>>>>>>>> David

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.