Questions tagged [templatefield]
182 questions
1
vote
1 answer
Dynamically added TemplateFields in DetailsView do not set bound property
I need to build a web page with a DetailsView which has a bunch of text boxes and drop down lists which bind to an ObjectContainerDataSource. This is for one-way binding using the InsertItemTemplate.
I can easily get this working for both text…

CoderJones
- 11
- 3
1
vote
1 answer
How to obtain Container.DataItem from parent control?
Suppose that I create an ASP.net repeater. Suppose further that I put an ASP.net GridView in the ASP.net repeater's ItemTemplate.
Suppose that it looks like this:
<%# "This Repeater…

Vivian River
- 31,198
- 62
- 198
- 313
1
vote
2 answers
Preserving CheckBox's Value in Dynamic GridView TemplateField
I am trying to create a GridView which will contain a list of users and permission levels that they have access to. Each row will have the following fields: User_ID, Username, Permission1, Permission2, ..., PermissionN, where the values of…

Brad
- 11
- 2
1
vote
2 answers
C# - Setting url of a Hyperlink control in a Gridview TemplateField column
I have a gridview that has a column that has a Hyperlink control as wellas a LinkButton control. As such:

PercivalMcGullicuddy
- 5,263
- 9
- 46
- 65
1
vote
2 answers
When does a control in a programmatically added TemplateField have its' ID property set?
I have a TemplateField that is dynamically added to a custom GridView.
void ITemplate.InstantiateIn(System.Web.UI.Control container)
{
switch (_templateType)
{
case ListItemType.Header:
if…

rism
- 11,932
- 16
- 76
- 116
1
vote
2 answers
Convert TemplateField to DateTime - Blank Row
All of the dates are becoming empty even if there are dates present in the cell. This is from a gridview template field. I am trying to convert those cells that are not empty but instead, all of them are empty.
asp:Label ID="Label13" runat="server"…

A.Mac
- 203
- 3
- 19
1
vote
4 answers
Problem with Grid view usage in asp.net C#
I want to fill the GridView with a HyperLink and other two other fields.
I tried with the below approach half heartedly. It's giving errors.
SqlCommand comm = new SqlCommand(
@"Select
FileUpload.FileName AS FileName,
…

Naresh
- 657
- 3
- 16
- 35
1
vote
1 answer
Manipulating DropDownList within TemplateField
I have a dropdownlist inside of a TemplateField, within a GridView.
I would like to dynamically add list items to it and write code to handle when the index changes. How do I go about manipulating the list, since I can't directly reference the…

Will
- 989
- 4
- 19
- 33
1
vote
1 answer
ASP.NET textbox cssClass gets overrwritten in GridView ItemTemplate after rendering
I have a textbox inside a TemplateField column for a gridview. When I set the cssClass property for the textbox, it gets overwritten by a "textBox" class in the rendered web page. Is this normal behavior?
(.NET 3.5)
As a workaround I added a…

Tony_Henrich
- 42,411
- 75
- 239
- 374
1
vote
0 answers
How can be a Template field label text property set from code behind on page loading?
I have a Gridview with the following template field:
database
gridview
aspxgridview
itemtemplate
templatefield

Juan Cerezo
- 13
- 3
1
vote
2 answers
GridView sorting with Template Field and Header Template
I'm using GridView and there is a dropdownlist in header cell for filtering.

Savas
- 77
- 2
- 10
1
vote
3 answers
hide columns by Id in gridview in asp.net
I have the asp.net application where I am having the editable grid view with the edit,Delete,Add options. this grid having as usual Template fields . I want to hide some columns. I know i can do that by using columns index. but i don't want to…

Red Swan
- 15,157
- 43
- 156
- 238
1
vote
1 answer
How To Access Control In Templatefield Gridview With Custom Id
i have a customized gridview.my grid is able to sort for each column just by 1 click in the header without any setting and overloading methods such as sorting,etc by user(programmer).(i do this successfully and work fine)
users(programmers) maybe…

Mohsen Tavoosi محسن طاوسی
- 644
- 1
- 7
- 20
1
vote
1 answer
GridView Column Vs. DataList Column
In GridView we write ItemTemplate in TemplateField and why do not write TemplateField in DataList.
GridView:
.......
DataList:
…
user1773603
1
vote
1 answer
Zend framework 2 add remove button next to form field
I have this at the moment:
It's generated with this code:
$this->add(array(
'type' => 'Zend\Form\Element\Collection',
'name' => 'attachments',
'options' => array(
'count' => 1,
'should_create_template' => true,
…
user936965