Questions tagged [itemplate]

50 questions
0
votes
0 answers

How can I get a class that implements ITemplate to allow duplicate IDs?

This works: Public Class HelloWorld Inherits CompositeControl Implements INamingContainer Public Property TemplateA() As ITemplate Public…
user1447679
  • 3,076
  • 7
  • 32
  • 69
0
votes
1 answer

ASP.NET DataPager Control in a Server Control

I'm trying to create a Server Control that will use a DataPager Control, but I'm having some difficulties with the PagerTemplate. This is the DataPager control that I want to generate from a Server Control:
cseven
  • 1
  • 2
0
votes
1 answer

Getting Eval to work in a databound, templated custom control

Context I'm putting together a templated, databound control. Presently it works with the following syntax...

<%# DataBinder.Eval(Container.DataItem,…

T. Stone
  • 19,209
  • 15
  • 69
  • 97
0
votes
1 answer

Itemplate properties not available as attributes

I've added an ITemplate to Telerik's RadGrid control called SearchMenuTemplate ala: public class AbsRadGrid : RadGrid { private ITemplate _ItemTemplate; [PersistenceMode(PersistenceMode.InnerProperty)] …
D.Forrest
  • 845
  • 1
  • 9
  • 23
0
votes
1 answer

BindData to ITemplate for GridView in code behind

How do I programmatically bind data to a custom item template column for a GridView? So far, I've done something similar to this: TemplateField foo = new TemplateField(); foo.ItemTemplate = new bar(); …
tbischel
  • 6,337
  • 11
  • 51
  • 73
0
votes
2 answers

ASP.NET - Nested Custom Templates

I'm thinking about converting a few usercontrols to use templates instead. One of these is my own UC which contains some controls, one of which is a repeater. Is it possible to specifcy a template for the second level usercontrol from the template…
Echilon
  • 10,064
  • 33
  • 131
  • 217
0
votes
2 answers

ASP.NET Custom control, templatesection only allow custom class to be added inside

I want to extend gridview, add a custom templatefield in which i can enter ONLY 1 item type namely (multiple) items. so for instance i want:
0
votes
1 answer

CheckChanged event not firing with dynamic checkboxes?

I have a gridview control that is dynamically configured after a button-click event. Some of the columns contain dynamically added checkboxes. For some reason, I can't get the OnCheckedChanged event to fire for any of the checkboxes in this…
candyA
  • 179
  • 2
  • 4
  • 14
0
votes
1 answer

ASP.Net ITemplate - how do i read the raw content defined inside

i have situation where in i would like to read the content of the ITemplate. for example i have something like // javascript document.getElementByID('urName').value = 'enter your…
Mahes
  • 3,938
  • 1
  • 34
  • 39
0
votes
1 answer

ASP.NET custom templated datalist throws argument out of range (index) on button press

I have a class BaseTemplate public abstract class BaseTemplate : ITemplate This adds the controls, and provides abstract methods to implement in the inheriting class. The inheriting class then adds its html according to its data source and manages…
John Nicholas
  • 4,778
  • 4
  • 31
  • 50
0
votes
1 answer

custom ITemplate in ASP.NET GridView

So. I have a custom dropdownlist: public class LabelTemplate : ITemplate { string __field; public LabelTemplate(string _field) { __field = _field; } private void Combo_DataBinding(Object sender, EventArgs e) { …
mx7
  • 1
  • 2
0
votes
0 answers

Create templatefields in gridview binding from object

I am struggling to create a series of templatefields in codebehind to a gridview. The datasource is an object which inside this object is another which is a List Object which has a series of properties. What I am trying to is display all of it in…
Andy5
  • 2,319
  • 11
  • 45
  • 91
0
votes
1 answer

ASP.NET GridView - Editing Dynamic Template Columns

I have created a GridView whose columns are dynamically created based on my data source. I have implemented these columns by using the approach described here.Those columns display properly on the initial load. However, I need to implement…
user208662
  • 10,869
  • 26
  • 73
  • 86
0
votes
3 answers

ASP.NET Templated Control

I'm attempting to build a templated control. You'll see that as part of the Field section, I'd like to be able to define controls as children. When I attempt to compile I'm receiving the error message "MyTemplateControl.Field' does not have a…
user62064
  • 185
  • 1
  • 3
  • 10
0
votes
1 answer

Finding Controls in an ITemplated Custom Control

I have created a custom server control with properties implementing the ITemplate interface. It is basically a custom panel box with a header, body & footer. Here is the code: using System; using System.Collections.Generic; using…
NeilC
  • 1,380
  • 1
  • 17
  • 36