Questions tagged [templatefield]

182 questions
0
votes
2 answers

Subtracting Value of two bonded fields

i want to subtract values of two boundFields in gridview and show result in a template filed on run time .. Here is the code
AddyProg
  • 2,960
  • 13
  • 59
  • 110
0
votes
3 answers

Updating Textbox in a templateField with button

it's my first time asking a question here in stackoverflow so please bear with me. I am creating a webpage using asp.net, I have GridView with columns set as databound except 1 template field, within the template field is a textbox and a button. I…
xtricnt
  • 3
  • 3
0
votes
2 answers

asp.net vb.net gridview, get row id when pressing template field button

I have a template field with a button. I want to press the button and get the row Id so I can return the users selection. I have a regular select button which works fine but the user want the people who are not employee’s to hide the select button.…
R2 Builder
  • 99
  • 3
  • 12
0
votes
1 answer

asp.net hyperlinkfield set navigateurl "http=blabla/Id=" value from database

I am new to asp.net. Please help. I have 2 files. One default.aspx, one default.aspx.cs. In the default.aspx, I have:
user2751691
  • 401
  • 2
  • 10
  • 32
0
votes
2 answers

Conditional image rules inside GridView TemplateField

I need to display a red/orange/green icon inside a GridView column based on the values in the GridView. I've managed to show the red/green, but I'm having trouble showing the orange icon. The yellow icon needs to appear when the variance between two…
Selrac
  • 2,203
  • 9
  • 41
  • 84
0
votes
1 answer

Error with edit CommandName on grid view after searching

I have a GridView with a Textbox that searchs into the grid, plus an edit button inside the grid. All of these work well when tested individually, but if I try to use the search button, and then use edit button, this doesn't edit the right row.…
phalanx
  • 497
  • 5
  • 17
  • 33
0
votes
0 answers

updating a sql table with a datagridview using template field

so the thing is i want to limit what can the user insert when updating through a datagridview. i thought of converting that specific field into a template and make it a dropdownlist with limited options to update such field. the thing is that when i…
0
votes
1 answer

How to format date in a templatefield of a detailsview according to culture

I've been searching a lot on how to this There is a lot of posts here and there on how to do it However I cannot find a way to do what I want I have this textbox in a TemplateField: (I cannot use a BoundField)
ruben
  • 109
  • 2
  • 10
0
votes
4 answers

add text after dataGrid cell

This is dataGrid . How to add text(string) after <%# Bind("Value") %> for example 123.432 and i want after any record to have "$" dolar sign
Krasimir
  • 259
  • 4
  • 9
  • 28
0
votes
2 answers

validate a template text box with database value

I'm developing a website and have a textbox in gridview template field. This textbox collects the input for the "order quantity" which has to be compared against the "available quantity"(stored in the database). I use RowEditing, RowUpdating and…
Balaji
  • 21
  • 6
0
votes
1 answer

Assign the value of a templatefield on gridview to variable

I know how to get value the of a templatefield inside a RowDataBound event: Control ctrl = e.Row.FindControl("Drop_Responsaveis"); DropDownList ddl = ctrl as DropDownList; ddl.items.add(something); But I needto get it's value on a button_Click…
Ghaleon
  • 1,186
  • 5
  • 28
  • 55
0
votes
1 answer

adding controls supporting javascript into parent/containing page

i have a asp.net page with a gridview in it, which is programatically (sp?) adding its columns. one of these is an itemtemplate, and it requires some javascript in the page to function. is there any way from the template itself to add the required…
nat
  • 2,185
  • 5
  • 32
  • 64
0
votes
0 answers

Dyanmically create gridview in code behind with template field

I need to create gridviews dynamically, of particular design(only 4 columns), first column has a checkbox, and the rest are boundfields, how can i create this, and bind the dynamically created gridview, is it possible to bind checkbox also(i have a…
G--
  • 497
  • 1
  • 8
  • 25
0
votes
1 answer

How to Bind child Gridview control which is used inside template field of Parent Gridview Control?

I am working in a project and my Requirement is such that i need to used a Gridview Control as a Templatefield for another Gridview Control and Bind a Generic List to it Dynamically Before Rendering it to User. Is there any way to Bind Child…
nks
  • 61
  • 2
  • 12