Questions tagged [commandfield]

32 questions
10
votes
3 answers

ASP.NET + GridView + CommandField as TemplateField

I have a GridView. My GridView has a column that is contains an "Options" column. This column includes the traditional CommandField options (edit, delete, etc.). I have the code setup to work when a CommandField is used. However, I need to do some…
user70192
  • 13,786
  • 51
  • 160
  • 240
5
votes
2 answers

"Update/Cancel" buttons don't appear in TemplateField Edit button

When you create an edit button in every row of a Gridview using CommandField it displays update/cancel buttons after clicking, so you can accept/cancel changes. However, I want an edit button that has tooltip text, and since CommandField doesn't…
phalanx
  • 497
  • 5
  • 17
  • 33
3
votes
4 answers

ASP.NET CommandField & skin

I'm tying to skin ASP.NET GridView CommandField. Everything si working fine, just when I move CommandField property declarations from page to skin file, the whole commandField properties are ignored. here is my skin file:
o..o
  • 1,789
  • 5
  • 31
  • 59
2
votes
1 answer

How to change Background image on hover of asp:CommandField in a Gridview

This is the code for CommandField with, background image. I would like to show this image "~/cms_images/cancel-hover.gif" when a user hovers on…
Null Head
  • 2,877
  • 13
  • 61
  • 83
2
votes
1 answer

How do you rotate the image in a CommandField

So I have these rows, Each row has a command field in my .aspx page.
Village
  • 199
  • 3
  • 15
2
votes
0 answers

Gridview Row Events not firing in UserControl

I've got a pretty strange problem with my usercontrols that I'm working with. I'm coding some user controls to be used in a DotNetNuke module. Basically I have a UserControl on my page that holds some controls and then there is a Placeholder where I…
dgarbacz
  • 962
  • 1
  • 7
  • 17
1
vote
0 answers

index Gridview Attribute onclic with button hidden

I need select row in gridview with a button hidden, but without postback because i need that stay on position clicked in gridview, this step i got it, but when i clicked on row capture index = 0, but when i click in button (no hidden in this time),…
1
vote
1 answer

aspnet and C#: How to link a TemplateField to a Dynamically Created Anonymous Type?

I have a Linq query that returns an anonymous type, which I then use as the data source for a GridView. Only 1 of those columns need to be editable. I just want to be able to click on an edit button and have ALL the rows of that 1 column become…
Lifes
  • 1,226
  • 2
  • 25
  • 45
1
vote
1 answer

How does FindControl work in GridView?

I am trying to update a database using the GridView edit, update CommandField. I have two editable fields which are displayed as text boxes when in edit mode. When clicking submit, I am trying to put the text box values into variables to work with,…
Starwfanatic
  • 584
  • 2
  • 13
  • 29
1
vote
2 answers

ASP.NET GridView CommandField Update/Cancel does not wrap

My question is on the ASP.NET GridView control. I am using a CommandField in the Columns tag as seen below.
user26573
  • 13
  • 1
  • 1
  • 3
1
vote
0 answers

Toggling CommandField ShowEditButton conditionally occurs on next line

I am trying to toggle whether or not a CommandField.ShowEditButton is true or false with the following code: protected void GridView_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { …
jhasell
  • 31
  • 4
1
vote
1 answer

Why is there no __doPostBack() JavaScript added to a CommandField's Update button in GridView when rendered to HTML

I have a basic GridView with a CommandField which uses the CommandField's in-built Edit, Cancel, Update and Delete buttons, with the ButtonType property set to "Image" (ImageButtons), defined as:
Brissles
  • 3,833
  • 23
  • 31
1
vote
2 answers

Set CommandField Select Visibilty from aspx page

I want to do something like this with a GridView: But that doesn't work, coming up with error: Databinding expressions are only supported on objects that have…
waqasahmed
  • 3,555
  • 6
  • 32
  • 52
0
votes
1 answer

Gridview sorted but the select button references the wrong row

In my GridView I set AllowSorting="true" and obviuously the view gets sorted upon the column clicked. After this event, the select button besides each row references the row displayed before the sorting event and not the actual one. A method to…
1
2 3