Questions tagged [edititemtemplate]
71 questions
2
votes
2 answers
EditItemTemplate: a conditional binding
According to a specific row value (Type), I must use a TextBox or a DropDownlist inside an EditTemplateField (only ONE of them).
How can I bind conditionally controls inside the EditItemTemplate in order to tell the UpdateMethod which is the control…

Matte
- 195
- 1
- 10
2
votes
1 answer
CS0103: The name 'GetSelectedIndex' does not exist in the current context
I'm rather stuck concerning a problem I'm having when binding the SelectedIndex property of the object to a method in a custom class (which is located within my app_code folder).
The text for an ObjectDataSource and a GridView…

Gordon Norrie
- 21
- 3
1
vote
1 answer
How to display custom error message on EditForm Template of AspXGrid?
DevExpress AspXGrid has a cool editform template that you can use it several ui style as popup form or inline form betwwen grid rows etc..
When you unimplement Update Event of grid and if you allow grid to editing from settings, it shows the…

DortGen
- 402
- 2
- 8
- 22
1
vote
1 answer
FindControl in DataList Edit Mode
As a new .net/C# web begginner, I always get tripped up when I try to use FindControl. Blam -flat on my face. Here is my current FindControl problem:
I have an .aspx page and Form, then ajax updatePanel, inside it there is my DataList (DataList1)…

Doug
- 125
- 2
- 11
- 22
1
vote
2 answers
How to add a new item at the top of a ListView with EditItemTemplate
I have a bit of code where you can add a new field using an add button, which enable the asp:EditItemTemplate, but the thing is that this adds the field at the bottom of the list, making the user have to scroll down if there is enough items already…

Jean-François Beaulieu
- 4,305
- 22
- 74
- 107
1
vote
0 answers
FindControl in GridView returns NULL when used with CheckBox
Issue: Adding a checkbox or other non-Label ItemTemplate field causes a null return on the FindControl method.
Normal behavior: Normally, when a user clicks edit, the EditItemTemplate fields become available and I'm able to use the FindControl…

Futureproof
- 375
- 4
- 21
1
vote
1 answer
Javascript function on ASP.NET Listview_ItemCreated
I am trying to set some client-side properties on a set of controls in the EditItemTemplate of an ASP.Net ListView.
For instance, if the EditItemTemplate contains something like this:
ASP.NET: How do "update" a field in the

Wonko the Sane
- 10,623
- 8
- 67
- 92
1
vote
2 answers
ASP.NET: Accessing a WebControl from EditItemTemplate in DataList
I am trying to access a webcontrol (a Textbox) from the EditItemTemplate of a DataList, so I can change it. When I try to do DataList.FindControl("TextboxID") it comes back with null because it doesn't recognize the textbox has rendered. I've tried…

Confused
- 11
- 2
1
vote
2 answers
How can I programatically determine which control to use in my EditItemTemplate? (ASP.NET)
In my ASP.NET application, I have a GridView. For a particular field in this GridView, I've added an EditItemTemplate with a DropDownList. However, if the value of the field is "X", then I want to just display a label instead of the DropDownList. So…

Matt Flowers
- 800
- 9
- 12
1
vote
2 answers
Cannot populate a DropDownList in EditItemTemplate using OnRowCommand
This is my code behind code. I want to populate the DropDownList once the user clicked edit but the DropDownList I'm getting is null. Why?
protected void SupportSchedule_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName…

Angeline J. Tan
- 21
- 7
1
vote
0 answers
C# Can't get DropDownList or Textbox Value (text) in Datalist EditItemTemplate
I can't get DropDownlist value in Datalist EditItemTemplate cause it turns null. I try Textbox value control but they turn null again. I find control by FinControl method but its null. I don't use scriptmanager and using usercontrol could you help…

Hakan Çetin
- 11
- 2
1
vote
1 answer
How to access drop down list from EditItemTemplate of FormView
I have a formview on my aspx page containing various controls arranged using table.
There is a DDL "cboClients" which i need to enable or disabled depending upon role within Edit mode.
The problem here is that i am not able to get that control using…

IrfanRaza
- 3,030
- 17
- 64
- 89
1
vote
1 answer
ASP.NET: How do "update" a field in the that has a null value in the database (SQL)
I am using a FormView control. The allows me to update records in the database. However, when a database field is null I can not update the field on the form. It works fine when the field is not a null value. I am not using any code behind…

Jus
- 11
- 3
1
vote
1 answer
ASP.Net DropDownList selected value missing
At the beginning I have to say that I tried to find the answer... And yes I'm new in ASP.Net world :)
I would like to use DropDownList in an EditItemTemplate field in GridView. I found I cannot set parametr SelectedValue. It's missing. When I try to…

Jenda Matejicek
- 151
- 3
- 14
1
vote
1 answer
UpdatePanel in EditItemTemplate of Gridview causing full page refresh
I tried to search for solutions, but couldn't find any. Everywhere they are talking about Gridview within UpdatePanel. In my case I have an UpdatePanel within the EditItemTemplate of a Gridview and a DropDownList in that EditItemTemplate is causing…

Aamir
- 791
- 3
- 15
- 28