MSDOTnet.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DataTable and Repeater Control, performance question?

 
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> ASPNet
Author Message
DotNetDev



Joined: 08 Aug 2007
Posts: 2

PostPosted: Thu Dec 13, 2007 12:28 pm    Post subject: DataTable and Repeater Control, performance question? Reply with quote

I am trying to display a dynamic checkboxlist. I have a datatable with 4
columns.
ItemId, ItemTitle, ItemDescription, ItemUrl.

Two of these columns are required. ItemId and ItemTitie.
If for certain items the ItemUrl is present then I would like to append it
to the item Title like '[]ItemTitle (hereis ItemUrl)'. Other wise just
display the item title next to the checkbox.
Since I need this little formatting on the item title , simple
DataSource/Binding wouldn't work.
I have two options
i) Either alter the itemtitle at the ItemDataBound Event.
ii) or Make a clone of the DataTable and alter the ItemTitle column to
include the itemUrl and then bind this new DataTable to the repeater.

My questoin is which option is more efficient and why?

I would really appreciate your knowledgable input.

Thanks.

Archived from group: microsoft>public>dotnet>framework>aspnet
Back to top
View user's profile Send private message
Eliyahu Goldin



Joined: 08 Aug 2007
Posts: 39

PostPosted: Thu Dec 13, 2007 10:35 pm    Post subject: Re: DataTable and Repeater Control, performance question? Reply with quote

It is not clear to me what could be the advantages of cloning. The same code
that you need to execute in the ItemDataBound event for every item will have
to execute on the datatable rows anyway.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"DotNetDev" wrote in message @microsoft.com...
>I am trying to display a dynamic checkboxlist. I have a datatable with 4
> columns.
> ItemId, ItemTitle, ItemDescription, ItemUrl.
>
> Two of these columns are required. ItemId and ItemTitie.
> If for certain items the ItemUrl is present then I would like to append it
> to the item Title like '[]ItemTitle (hereis ItemUrl)'. Other wise just
> display the item title next to the checkbox.
> Since I need this little formatting on the item title , simple
> DataSource/Binding wouldn't work.
> I have two options
> i) Either alter the itemtitle at the ItemDataBound Event.
> ii) or Make a clone of the DataTable and alter the ItemTitle column to
> include the itemUrl and then bind this new DataTable to the repeater.
>
> My questoin is which option is more efficient and why?
>
> I would really appreciate your knowledgable input.
>
> Thanks.
>
Back to top
View user's profile Send private message
DotNetDev



Joined: 08 Aug 2007
Posts: 2

PostPosted: Thu Dec 13, 2007 1:08 pm    Post subject: Re: DataTable and Repeater Control, performance question? Reply with quote

After getting the clone, I would merge the two columns so ItemTitle would
also contain ItemUrl if its present and then binding would be simple.

"Eliyahu Goldin" wrote:

> It is not clear to me what could be the advantages of cloning. The same code
> that you need to execute in the ItemDataBound event for every item will have
> to execute on the datatable rows anyway.
>
> --
> Eliyahu Goldin,
> Software Developer
> Microsoft MVP [ASP.NET]
> http://msmvps.com/blogs/egoldin
> http://usableasp.net
>
>
> "DotNetDev" wrote in message
> @microsoft.com...
> >I am trying to display a dynamic checkboxlist. I have a datatable with 4
> > columns.
> > ItemId, ItemTitle, ItemDescription, ItemUrl.
> >
> > Two of these columns are required. ItemId and ItemTitie.
> > If for certain items the ItemUrl is present then I would like to append it
> > to the item Title like '[]ItemTitle (hereis ItemUrl)'. Other wise just
> > display the item title next to the checkbox.
> > Since I need this little formatting on the item title , simple
> > DataSource/Binding wouldn't work.
> > I have two options
> > i) Either alter the itemtitle at the ItemDataBound Event.
> > ii) or Make a clone of the DataTable and alter the ItemTitle column to
> > include the itemUrl and then bind this new DataTable to the repeater.
> >
> > My questoin is which option is more efficient and why?
> >
> > I would really appreciate your knowledgable input.
> >
> > Thanks.
> >
>
>
>
Back to top
View user's profile Send private message
Angel



Joined: 10 Aug 2007
Posts: 3

PostPosted: Thu Dec 13, 2007 3:37 pm    Post subject: RE: DataTable and Repeater Control, performance question? Reply with quote

I may not understand the problem but it sound to me you would like to alter
dynamically the second column. If I was doing it I would populate my control
programatically exercising full control over what is rendered. You might
also create SQL query that provides two columns and performs this process
dynamically at this level. Leaving you with a simple databind all over again.


--
aaa


"DotNetDev" wrote:

> I am trying to display a dynamic checkboxlist. I have a datatable with 4
> columns.
> ItemId, ItemTitle, ItemDescription, ItemUrl.
>
> Two of these columns are required. ItemId and ItemTitie.
> If for certain items the ItemUrl is present then I would like to append it
> to the item Title like '[]ItemTitle (hereis ItemUrl)'. Other wise just
> display the item title next to the checkbox.
> Since I need this little formatting on the item title , simple
> DataSource/Binding wouldn't work.
> I have two options
> i) Either alter the itemtitle at the ItemDataBound Event.
> ii) or Make a clone of the DataTable and alter the ItemTitle column to
> include the itemUrl and then bind this new DataTable to the repeater.
>
> My questoin is which option is more efficient and why?
>
> I would really appreciate your knowledgable input.
>
> Thanks.
>

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Dropdownlist performance I have an asp.net page with a dropdownlist and a datagrid with a dropdownlist in its edit mode. The dropdownlist in the datagrid loads very quick but the dropdownlist in the page take a lot of time to load. Is this normal? What is the problem? The two dro

How to control the performance monitor alerter I want to start or stop the performance monitor alerter in my own know how to do?

How to control the performance monitor alerter I want to start or stop the performance monitor alerter in my own know how to do?

Performance - 'Execution performance' vs 'Startup performanc Hello! Performance is a very important word in the world of computing. Writing beautiful and very readable code may help to improve the developers 'coding performance' but it not always results in good 'execution performance' of applications. But, well, t

good C# book on datagrid, repeater, etc.... I am looking for a very good C# book on datagrid. Does anyone have a Thanks. -Sin
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> ASPNet All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group