PC Review


Reply
Thread Tools Rate Thread

Any easy way to dynamically create a template field in GridView?

 
 
gnewsgroup
Guest
Posts: n/a
 
      12th Oct 2007
I've been trying this these days, with no luck. I've read a couple of
articles about this, in which they both have a GridViewTemplate class
which has an InstantiateIn method. Neither of them seems to help
resolve my problem.

It does not seem to be hard to dynamically create a template using
their GridViewTemplate class. But I want to make one column of the
GridView LinkButton'ed, and the Text of these LinkButtons are bound to
the database.

Well, right now, I am working around this by hard-coding such
gridviews. But I would like to write a method to dynamically create
them. That will greatly save me a lot of repetitive copy-pastes of my
code.

Any vague idea to share? Thanks.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?SklHTkVTSA==?=
Guest
Posts: n/a
 
      12th Oct 2007
This may help.

How to create template columns dynamically in a grid view
http://www.codeproject.com/useritems...te_columns.asp

Regards
JIGNESH

"gnewsgroup" wrote:

> I've been trying this these days, with no luck. I've read a couple of
> articles about this, in which they both have a GridViewTemplate class
> which has an InstantiateIn method. Neither of them seems to help
> resolve my problem.
>
> It does not seem to be hard to dynamically create a template using
> their GridViewTemplate class. But I want to make one column of the
> GridView LinkButton'ed, and the Text of these LinkButtons are bound to
> the database.
>
> Well, right now, I am working around this by hard-coding such
> gridviews. But I would like to write a method to dynamically create
> them. That will greatly save me a lot of repetitive copy-pastes of my
> code.
>
> Any vague idea to share? Thanks.
>
>

 
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
how to dynamically create a hyperlink in a gridview cell Carlos Microsoft ASP .NET 1 6th Apr 2009 03:09 PM
How to dynamically create a table/gridview Cirene Microsoft ASP .NET 0 8th Aug 2008 04:46 PM
FindControl in a gridview's dynamically-added template Craig Buchanan Microsoft ASP .NET 4 10th Jul 2008 05:24 PM
dynamically binding a field in a Gridview Robert Smith Microsoft ASP .NET 1 9th Mar 2008 02:39 AM
[VS2005] GridView and Template field Marek Microsoft C# .NET 0 6th May 2006 03:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:24 PM.