PC Review


Reply
Thread Tools Rate Thread

Array as a datasource

 
 
David C
Guest
Posts: n/a
 
      11th Oct 2007
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


 
Reply With Quote
 
 
 
 
IfThenElse
Guest
Posts: n/a
 
      11th Oct 2007
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




"David C" <(E-Mail Removed)> wrote in message
news:Op%(E-Mail Removed)...
>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
>



 
Reply With Quote
 
David C
Guest
Posts: n/a
 
      11th Oct 2007
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
"IfThenElse" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
>
>
> "David C" <(E-Mail Removed)> wrote in message
> news:Op%(E-Mail Removed)...
>>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
>>

>
>



 
Reply With Quote
 
IfThenElse
Guest
Posts: n/a
 
      11th Oct 2007
Assign them to the ItemList, and reuse it over and over again,
I am not asking your user to manually enter anything.


"David C" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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
> "IfThenElse" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>
>>
>>
>>
>> "David C" <(E-Mail Removed)> wrote in message
>> news:Op%(E-Mail Removed)...
>>>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
>>>

>>
>>

>
>



 
Reply With Quote
 
David C
Guest
Posts: n/a
 
      11th Oct 2007
I meant me entering them in manually in my 12 DropDownList controls (6 in
read, 6 in edit).

"IfThenElse" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Assign them to the ItemList, and reuse it over and over again,
> I am not asking your user to manually enter anything.
>
>
> "David C" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>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
>> "IfThenElse" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> 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
>>>
>>>
>>>
>>>
>>> "David C" <(E-Mail Removed)> wrote in message
>>> news:Op%(E-Mail Removed)...
>>>>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
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
IfThenElse
Guest
Posts: n/a
 
      11th Oct 2007
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



"David C" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I meant me entering them in manually in my 12 DropDownList controls (6 in
>read, 6 in edit).
>
> "IfThenElse" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Assign them to the ItemList, and reuse it over and over again,
>> I am not asking your user to manually enter anything.
>>
>>
>> "David C" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>>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
>>> "IfThenElse" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> 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
>>>>
>>>>
>>>>
>>>>
>>>> "David C" <(E-Mail Removed)> wrote in message
>>>> news:Op%(E-Mail Removed)...
>>>>>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
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
David C
Guest
Posts: n/a
 
      11th Oct 2007
I haven't cloned an ItemList before. How is that done?

"IfThenElse" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>
>
> "David C" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>I meant me entering them in manually in my 12 DropDownList controls (6 in
>>read, 6 in edit).
>>
>> "IfThenElse" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Assign them to the ItemList, and reuse it over and over again,
>>> I am not asking your user to manually enter anything.
>>>
>>>
>>> "David C" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>>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
>>>> "IfThenElse" <(E-Mail Removed)> wrote in message
>>>> news:(E-Mail Removed)...
>>>>> 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
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> "David C" <(E-Mail Removed)> wrote in message
>>>>> news:Op%(E-Mail Removed)...
>>>>>>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
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
IfThenElse
Guest
Posts: n/a
 
      12th Oct 2007
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.







"David C" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I haven't cloned an ItemList before. How is that done?
>
> "IfThenElse" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> 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
>>
>>
>>
>> "David C" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>>I meant me entering them in manually in my 12 DropDownList controls (6 in
>>>read, 6 in edit).
>>>
>>> "IfThenElse" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> Assign them to the ItemList, and reuse it over and over again,
>>>> I am not asking your user to manually enter anything.
>>>>
>>>>
>>>> "David C" <(E-Mail Removed)> wrote in message
>>>> news:(E-Mail Removed)...
>>>>>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
>>>>> "IfThenElse" <(E-Mail Removed)> wrote in message
>>>>> news:(E-Mail Removed)...
>>>>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> "David C" <(E-Mail Removed)> wrote in message
>>>>>> news:Op%(E-Mail Removed)...
>>>>>>>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
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
David C
Guest
Posts: n/a
 
      12th Oct 2007
Thank you.
"IfThenElse" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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.
>
>
>
>
>
>
>
> "David C" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>I haven't cloned an ItemList before. How is that done?
>>
>> "IfThenElse" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> 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
>>>
>>>
>>>
>>> "David C" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>>I meant me entering them in manually in my 12 DropDownList controls (6
>>>>in read, 6 in edit).
>>>>
>>>> "IfThenElse" <(E-Mail Removed)> wrote in message
>>>> news:(E-Mail Removed)...
>>>>> Assign them to the ItemList, and reuse it over and over again,
>>>>> I am not asking your user to manually enter anything.
>>>>>
>>>>>
>>>>> "David C" <(E-Mail Removed)> wrote in message
>>>>> news:(E-Mail Removed)...
>>>>>>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
>>>>>> "IfThenElse" <(E-Mail Removed)> wrote in message
>>>>>> news:(E-Mail Removed)...
>>>>>>> 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
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> "David C" <(E-Mail Removed)> wrote in message
>>>>>>> news:Op%(E-Mail Removed)...
>>>>>>>>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
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Array as DataSource LeguMan Microsoft VB .NET 0 29th Aug 2007 11:00 AM
How can I use an array as the datasource of a ListBox ad Microsoft ASP .NET 1 3rd Mar 2005 09:01 PM
Array List as DataSource For LIstBox Bug? =?Utf-8?B?Wm9ycGllZG9tYW4=?= Microsoft VB .NET 13 7th Jan 2005 02:19 AM
Using a string array as a datasource in a listbox claire clinton Microsoft Dot NET Framework Forms 0 29th Sep 2003 07:05 PM
datarow[] array as datasource for RadioButtonList Christian H Microsoft ADO .NET 1 14th Jul 2003 02:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:32 PM.