Questions tagged [templatefield]
182 questions
0
votes
1 answer
Does using Labels in TemplateField in Gridview cause performance issues?
Is there a significance performance issue with changing Gridview *BoundFields* into TemplateFields with Labels? (please see code excerpts below)
I'm planning to implement the change above due to a lot of requirement changes with the gridview…

niki b
- 989
- 3
- 10
- 30
0
votes
1 answer
Updating SQL database using gridview/templatefield
Anybody know how to get a Templatefield column of text-boxes to feed data typed into them back into a sql database using the SqlDataSource already being used in the gridview the templatefield is in and a buttonfield using an update function? I was…

matt046
- 3
- 4
0
votes
1 answer
Gridview Edit external update button.
I have a gridview in my asp.net page that has one template field for editing a yearly budget. The code follows:
…

developthestars
- 185
- 1
- 12
- 27
0
votes
1 answer
how to clear generated columns without clearing ItemTemplate fields
i have a grid views that generated columns through the code, and also ItemTemplate field from aspx, how can i clear columns generated from the code without clearing the template fields?
code from my previous post
TemplateField templateField = new…

Noora
- 319
- 3
- 10
- 26
0
votes
2 answers
Convert a gridview templatefield to pdf iTextSharp
I have a GridView which is programatically filled from the DB (not a SqlDataSource or such). There are 4 columns which are TemplateFields as I format their text. They are Dates and Times and this is the one of their TemplateField:
…

D.Galvez
- 99
- 2
- 10
0
votes
2 answers
Unable to find control in gridview
I want to find the control(hyperlink) in the gridview. Based on the value of the control I want to enable or disable the hyperlink.
I tried like this. But I am always getting null.
protected void gridResult_RowDataBound(object sender,…

Ranjith
- 549
- 4
- 10
- 20
0
votes
1 answer
change content of gridview dynamically
I have a grid view with three bound field columns and a template filed column.
The template field column has three buttons (edit, view, and delete).
So every row has those three buttons.
How can I dynamically change the content of the grid view…
0
votes
1 answer
GridView TemplateField bound to SQL Statement?
I have a Gridview with template fields conatining drop down lists. I need to populate the dropdownlists with a sql statement. My gridview code is as such:

developthestars
- 185
- 1
- 12
- 27
0
votes
3 answers
Equivalence of an asp:HiddenField for a GridView
There is no asp:HiddenField that can be used in a GridView so I was wondering what would work similar to this.
My reasoning for wanting this is I have a ButtonField that triggers an OnRowCommand. From there I can figure out which row was selected,…

Matt
- 5,547
- 23
- 82
- 121
0
votes
1 answer
ASP gridview: adding two values and validate
I use GridView to show/edit data in the database. In the GridView there are two columns called mark1 and mark2. What I want to do is when user clicks update, the program should check if the values entered at mark1 and mark2 sum to 100. If they don't…

barack o mama
- 129
- 1
- 2
- 9
0
votes
1 answer
Gridview templatefields databind
I have a gridview with the following code:
…

developthestars
- 185
- 1
- 12
- 27
0
votes
1 answer
databind gridview edititemtemplate dropdownlist with sql statement
I have a gridview with the following code:
…

developthestars
- 185
- 1
- 12
- 27
0
votes
2 answers
Textbox Currency Formatting
I am formatting a gridview templatefield that is databound with{0:c} and it displays currency as such:
$790.00
Is there a way to adjust it so the dollar symbol isn't displayed?

developthestars
- 185
- 1
- 12
- 27
0
votes
1 answer
State of checkbox lost after postback in a custom template field
I have created a custom checkbox template field by deriving it from System.Web.UI.WebControls.TemplateField. The template for this field has been created by creating a class which implements ITemplate interface. When any postback happens on the page…

Gaurav
- 330
- 7
- 21
0
votes
1 answer
gridview loop issue
I have a gridview with 4 columns, three of them are template fields where the user can enter the information needed and click a button to submit it to the database. I have 2 issues:
When I click my button to add a second row... the data in the…

developthestars
- 185
- 1
- 12
- 27