Questions tagged [itemplate]
50 questions
1
vote
1 answer
ASP.NET composite control doesn't bubble event but template does
I am developing a composite control for an ASP.NET application and just by chance initially developed the control to use an ITemplate to create its child controls. There will be a series of buttons within the child controls that are to be handled…

SonOfPirate
- 5,642
- 3
- 41
- 97
1
vote
0 answers
asp.net button in ITemplate doesn't fire Repeater ItemCommand event
i am a complete asp.net noob and the solution could be something very simple.
i have found, read and tried many answers to questions very similar to my question, but nothing works. i hope to find some help here.
this works perfectly with no…

Jinjinov
- 2,554
- 4
- 26
- 45
1
vote
1 answer
Dynamically adding Content blocks to Masterpage fails after Master.FindControl
I've encountered an odd problem that doesn't make any sense to me. I am trying to dynamically set up MasterPage Content controls on a page. I have it working nicely with the following code:
protected override void OnPreInit(EventArgs e)
{
…

Max Schilling
- 2,891
- 4
- 25
- 28
1
vote
1 answer
Dynamic Column that contains a Repeater
How would I go about doing this programatically?
I can do this just fine declaratively, using a template column and then using something like this:
...

djbyter
- 763
- 8
- 28
1
vote
1 answer
Fully editable gridview on single button click
I have a gridview and 2 buttons outside it. On button click all rows of gridview should become editable. I am using ITemplate class achive this task, but unable to complete it.
below is my code to get editable gridview:
public class GridViewTemplate…

reesha
- 13
- 1
- 4
1
vote
0 answers
findcontrol does not find dynamically created control in rowUpdating eventhandler
I implemten ITemplate to dynamically create a Template field
TemplateField isReqField = new TemplateField();
isReqField.HeaderText = "Lizenz anfordern";
isReqField.ItemTemplate = new GridViewTemplate(DataControlRowType.DataRow,…

Ephedra
- 831
- 10
- 24
1
vote
2 answers
ASPxGridView, ITemplate, and Eval
How can I create a template in c# for an AXPxGridViewDataTextColumn without any markup and with using Eval to display the DataItem value?
-The problem that I am having is that the string "<%#Eval("dataTableField1")%>" shows up in the GridView for…

Soenhay
- 3,958
- 5
- 34
- 60
1
vote
1 answer
ITemplate inside FormView.InsertItemTemlate disappears after postback
I have a UserControl in which i have a FormView.
The form view only has an InsertItemTemplate (I don't need anything else)

Nandun
- 1,802
- 2
- 20
- 35
0
votes
1 answer
ASP.net Hot to create custom command for control that implement ITemplate interface?
I have control that inherited from ITemplate Interface.
Data is displayed in HtmlTable control, that automatically generated on control initialization.
Each row contain ImageButton controls that represent standard command (Edit, Delete, etc).
Here…

digor_ua
- 572
- 2
- 7
- 20
0
votes
2 answers
Dynamically adding controls to a Templated User Control?
A few weeks back I created a Templated User Control, for the most part based on the example here:
http://msdn.microsoft.com/en-us/library/36574bf6(v=VS.90).aspx
The difference is that I did not implement the "MessageContainer" class as I wanted…

Andrew Raastad
- 161
- 9
0
votes
1 answer
How do I access ASP.NET ITemplate Container Properties
I'm trying to learn how to use ITemplate for nicer custom controls. I have it mostly working but I haven't been able to figure out how to access any properties of the container from the page.
Here is my templated…

Plumbtrician
- 1
- 2
0
votes
2 answers
Can I load an ITemplate from a database or string?
I'm looking to implement some templates in a web application and wanted to utilize ASP.NET's templated controls. However, I don't want to rely on physical .ascx files, or the VirtualPathProvider in order to Load the templates.
I want to be able to…

John B
- 20,062
- 35
- 120
- 170
0
votes
1 answer
ID "itemPlaceholder" is not rendered when using custom LayoutTemplate
I've created a simple ASPX-page, added a ListView control to the page and created two implementations of the ITemplate; one for the LayoutTemplate and one for the ItemTemplate. The trick here is that I specify a collection of columns I want to…

Stig Perez
- 3,595
- 4
- 23
- 36
0
votes
2 answers
How to implement LayoutTemplate with a PlaceHolder
In my own server control, I would like to implement something similar to the ListView:
I have…

Nelson Rothermel
- 9,436
- 8
- 62
- 81
0
votes
1 answer
ASP.NET Maintaining ViewState for controls inside a custom control template
I have a template property in my control declared as follows:
Property CustomTemplate As…
user2233219