Questions tagged [templatefield]
182 questions
2
votes
2 answers
How to 2-way bind a textbox in a template fields programmatically
I have a gridview to which I'm adding template fields programmatically. Each of the template fields have a textbox. I would like to make this text box have 2-way binding to a database column. Please see below code.
public class…

userb
- 21
- 1
- 2
2
votes
0 answers
Insert and remove Template textbox column in grid view
class TextColumn : ITemplate
{
private string controlId;
private string cssClass;
public TextColumn(string id, string cssClass = "inputFromTo")
{
controlId = id;
this.cssClass = cssClass;
…

Er. ßridy
- 553
- 2
- 6
- 20
2
votes
0 answers
Extending Gridview Templatefield making it reusable
I made this work, but not in an appropirate way.
I'm working with .NET 4.0 and these would be my needs:
I work with a big bunch of gridviews that essentially shows the same kind of controls and works in the very same way.
What i've tried is creating…

Inquisitor
- 21
- 3
2
votes
1 answer
Seeing Events in Properties window for controls in EditItemTemplate
My application is using ASP.NET Webforms. I am trying to see the events for a control (a button control in this case) that I have in an EditItemTemplate. The events don't show in the Properties window when I select the control in the Source view;…

MikeC
- 208
- 3
- 12
2
votes
1 answer
Get Text of Hyperlink which is sitting inside template field in a gridview
Seems to be easy but I am having a hard time with this.
" id="ID" name="ID"> <%#Eval("Id")%>…

TheTechGuy
- 16,560
- 16
- 115
- 136
2
votes
1 answer
GridView Template - How to Grab Data from Selected Row
![]()
IrishChieftain
2
votes
1 answer
updatecommand in asp page not workingok i have solved my last question by using update parameters instead und putting templatefields on my gridview instead of boundfields.
it is displayed alright, only thing is the update button doesn't seem to work. when i click it, it just returns to…
![]()
LeonidasFett
2
votes
3 answers
How to add TemplateField created in .aspx markup to GridView column in code behind?Basically, I want a button that adds a new column with my controls (i.e. TextBox, DropDownList) to my GridView.
Already seems simple enough with this:
protected void btn_AddColumn_Click(object sender, EventArgs e)
{
TemplateField MyTemplateField…
![]()
SymphonyX7
2
votes
1 answer
How to control TemplateField orderI have a grid view where the columns is generated dynamically through the code [AutoGenerateColumns="false"] with one TemplateField but also I am creating another TemplateField from ASPX
How can I control the order of these two TemplateField
For…
![]()
Noora
2
votes
3 answers
Reading variable into NavigateUrl in TemplateField in GridView asp.net 4 c#I am new to programming. I have created a GridView and used SqlDataSource to bind. Grid presents several variables from SQL Server database, including hypertext links.
For a particular field I need to:
- evaluate a database field "Journal_title"
-…
![]()
Tim Bacon
1
vote
3 answers
change templatefield column location in gridviewi have and grid view which i set an templatefield in it.
in addition i set a datasource dynamically in code behind.
now the templatefield appears as the first column, and i want to move it to be the 5 one, and also disable another column.
how can i…
![]()
Aviadjo
1
vote
1 answer
How to Retain the Styling / Hover Functionality of Image Hyperlinks in a GridView TemplateField using ImageButtonsWithin each row of a GridView (using the TemplateField), I would like to display image buttons that will be used to control the data in that row. I would then like to swap out the images of the buttons when a user first hovers over the GridView row…
![]()
bham3dman
1
vote
1 answer
Sitecore: Hide data template field from page editorI have 2 data template fields "title" and "id", used for the HTML page title and the id attribute in the body tag respectively. When the page is viewed using Page Editor, Sitecore attempts to render editor controls on these items and because they…
![]()
Ronnie Liew
1
vote
2 answers
SortExpression in ASP.NET GridView not working with
I have an ASP.NET GridView. Now I am adding the SortExpression property tothe
![]()
Agniva De Sarker
1
vote
2 answers
GridView loses column contents during PostBackI am having an issue with the behavior of a GridView between post backs.
The real problem comes from a TemplateField I define in the markup at column[0] with a child CheckBox control. Things work fine for the first, and second search executions.…
![]()
jwrightmail
|