Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Problem with dynamically created template columns and updatecomman

Reply
Thread Tools

Problem with dynamically created template columns and updatecomman

 
 
=?Utf-8?B?U3VtYQ==?=
Guest
Posts: n/a
 
      12-21-2004
I have a problem with editable datagrid and was hoping if anyone could help
me. Please help me if possible.

I have an editable datagrid, whose column count I don’t know until runtime.
I am sure of 3 columns Id,Name and Description.

But there also might be more. So I add these 3 columns and an
editcommandbutton and deletecommnadbutton at design time.

Then during runtime I insert my other columns that I need, in between
Description and Edit columns.

I need checkboxes in these dynamically created template columns. So I
implement the ITemplate interface and the databinding works just fine. I give
Ids for both checkboxes in Itemtemplate as well as EditItemTemplate.

Now, when I say Update, in updatecommand event handler, I am not able to
find the checkbox controls that I created for EditItemTemplate.

I tried adding columns at every pageload, even then I can’t find the controls.

Can anybody please help me in achieving this. It is urgent

TIA
Suma.

 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      12-21-2004
"Suma" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have a problem with editable datagrid and was hoping if anyone could
> help
> me. Please help me if possible.
>
> I have an editable datagrid, whose column count I don't know until
> runtime.
> I am sure of 3 columns Id,Name and Description.
>
> But there also might be more. So I add these 3 columns and an
> editcommandbutton and deletecommnadbutton at design time.
>
> Then during runtime I insert my other columns that I need, in between
> Description and Edit columns.
>
> I need checkboxes in these dynamically created template columns. So I
> implement the ITemplate interface and the databinding works just fine. I
> give
> Ids for both checkboxes in Itemtemplate as well as EditItemTemplate.
>
> Now, when I say Update, in updatecommand event handler, I am not able to
> find the checkbox controls that I created for EditItemTemplate.
>
> I tried adding columns at every pageload, even then I can't find the
> controls.
>
> Can anybody please help me in achieving this. It is urgent


Turn on page tracing, which will show you the control tree. See if the
checkboxes are there, what they're within and what they're called.

John Saunders


 
Reply With Quote
 
 
 
 
=?Utf-8?B?U3VtYQ==?=
Guest
Posts: n/a
 
      12-23-2004
I got the solution.
Actually once I get my column lists during my first page load, I need to
store them in session.Then in Page_Init need to add dynamic template columns
again by retreiving them from session.
This way my code works just fine

Suma.

"John Saunders" wrote:

> "Suma" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I have a problem with editable datagrid and was hoping if anyone could
> > help
> > me. Please help me if possible.
> >
> > I have an editable datagrid, whose column count I don't know until
> > runtime.
> > I am sure of 3 columns Id,Name and Description.
> >
> > But there also might be more. So I add these 3 columns and an
> > editcommandbutton and deletecommnadbutton at design time.
> >
> > Then during runtime I insert my other columns that I need, in between
> > Description and Edit columns.
> >
> > I need checkboxes in these dynamically created template columns. So I
> > implement the ITemplate interface and the databinding works just fine. I
> > give
> > Ids for both checkboxes in Itemtemplate as well as EditItemTemplate.
> >
> > Now, when I say Update, in updatecommand event handler, I am not able to
> > find the checkbox controls that I created for EditItemTemplate.
> >
> > I tried adding columns at every pageload, even then I can't find the
> > controls.
> >
> > Can anybody please help me in achieving this. It is urgent

>
> Turn on page tracing, which will show you the control tree. See if the
> checkboxes are there, what they're within and what they're called.
>
> John Saunders
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Affecting a dynamically created drop down from another dynamically created drop down. msimmons ASP .Net 0 07-16-2009 03:17 PM
Getting Values from Dynamically Created Template Columns in Gridview springtraining ASP .Net Web Controls 0 11-12-2007 07:07 PM
problem with programmatically created template columns David C ASP .Net 2 12-21-2005 09:06 PM
Managing ViewState of a dynamically created Custom Composite Server Control -(where the original is also dynamically created) dickster ASP .Net Building Controls 0 12-08-2005 09:32 AM
Column order and dynamically created columns MattB ASP .Net Datagrid Control 1 12-01-2004 11:36 PM



Advertisments