Questions tagged [buttonfield]

52 questions
0
votes
1 answer

Why does my rowcommand event handler not work here?

I am trying to handle the event in which a button in my button field is pressed and subsequently removes the row from the website and from the database. and I do that but using the following code in my .aspx.cs file: protected void…
Sohee
  • 23
  • 5
0
votes
0 answers

Buttonfield buttons trigger an event even though I have not mapped it to any events

So I am trying to implement a column of buttons on my data table with a button field. However, I did not map them to any event so far, but for some reason whenever I click one of the buttons, I believe it triggers the Page_Load event. This will of…
Sohee
  • 23
  • 5
0
votes
0 answers

Why will the new button column that I added not show up after I have added it?

Follow up from a previous question I have made: Getting and error I cannot fix when trying to add a button column After making the aforementioned corrections given by the accepted answer, my code will now build successfully. However, neither the…
0
votes
2 answers

Possible to replace a ButtonField with an image in a GridView?

I have a GridView which has a delete link to delete a record. I have created a DeleteButtonField class but I want to replace the text with an image (an icon). Is this possible? Here's my GridView:
Mark Allison
  • 6,838
  • 33
  • 102
  • 151
0
votes
2 answers

ASP.NET Gridview Delete Command Event

Hi I have created a buttonfield in my Gridview with the CommandName sent to Delete. I have also Set the RowDeleting event on my GridView to a method. It doesnt run this method though. Giving me the error " Deleting is not supported by data source…
user673906
  • 757
  • 6
  • 15
  • 30
0
votes
1 answer

ButtonField = Image No OnClientClick

I want a confirm prompt on this button type. There is no OnClientClick for this button type and I need an alternative method on how.
0
votes
1 answer

.NET gridview buttonField setting link url

I have a Gridview that is correctly getting data from a database. I want to add an image in each row that when clicked, will link to another page and that link will have a parameter passed with it. If I was using a HyperLinkField, I would use the…
joerdie
  • 379
  • 1
  • 6
  • 18
0
votes
3 answers

Get the value of Buttonfield in ASP.NET

Say I have only two columns in my GridView (ID & Name) and I need to get the value of ID whenever I click on it. For example, if I click on 123, I should get 123. But here... that's not the case... when I click on any ID it returns the name beside…
aayani
  • 333
  • 9
  • 19
0
votes
1 answer

C# gridview buttonfield needed for updating row of data only when pressed

I'm doing this assignment right now, and I'm stuck at this problem, from my understand, i have to add a buttonfield to my gridview and when pressed, it updates the status, and reduce FabricStock in my data base. i already have the gridview,…
Zilis
  • 1
  • 3
0
votes
2 answers

Set the text in the center of the screen in Button Field in Blackberry?

I am an an Android Developer, developing an Blackberry application. I have created a button of full width of screen. Getting problem in shifting the text to the center of the button area. Used below code : ButtonField _contactButton = new…
Sam-In-TechValens
  • 2,501
  • 4
  • 34
  • 67
0
votes
1 answer

doPostBack is undefined when programmatically adding button to gridview

I'm populating a GridView programmatically and adding a button to the last row: ButtonField bc = new ButtonField(); bc.ButtonType = ButtonType.Button; bc.Text = "Edit"; bc.CommandName = "EditAsset"; grid.Columns.Add(bc); In the markup I specify a…
Jason Kelley
  • 576
  • 5
  • 12
0
votes
1 answer

How to store ButtonField in a datarow where the column is set for ButtonField

consider the following code protected void Button1_Click(object sender, EventArgs e) { DataTable dt = new DataTable(); DataColumn dtCol = new DataColumn(); dtCol = new DataColumn("Name", typeof(string)); …
cahmad
  • 23
  • 1
  • 10
0
votes
1 answer

How do I change the value of a extended ButtonField?

I want to change the value of the text in a ButtonField depending on other factors. Some code: public override void InitializeCell(DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex) { …
rball
  • 6,925
  • 7
  • 49
  • 77
0
votes
1 answer

How to get datatextfield value

I am making a web site in visual studio 2012, using asp.net, c#. I created a grid view, which is taking data from my sql server, and created a button field which is bound to id_p, which is one of the collumns taken from a database. I am trying to…
user1649498
  • 121
  • 3
  • 15
0
votes
2 answers

Unable to perform another button's function if current button is focusing

From this code, public class Custom_TopField extends Manager { private Bitmap download = Config_GlobalFunction.Bitmap("btn_download.png"); private Bitmap downloadactive = Config_GlobalFunction .Bitmap("btn_download_active.png"); private…
Alan Lai
  • 1,296
  • 2
  • 12
  • 16