Forms Data Controls :: How To Enable / Disable Buttons In My Gridview

Jul 15, 2010

I'm trying to enable/disable buttons in my gridview according to a value in gridview's field.
But everytime when I try to run my page, it shows me below underlined error and point to my gvTimeSheet.DataBind() in page_load.

"Unable to cast object of type 'System.EventArgs' to type 'System.Web.UI.WebControls.GridViewRowEventArgs'."
I also tried to enable / disable button in HTML but it just against from what I need it to be.

Example, sheet_status = true, I do not need to enable the button.

[Code]....

View 5 Replies


Similar Messages:

Forms Data Controls :: Enable / Disable The Checkbox In Gridview?

Jul 9, 2010

Based on some condition, I need to enable and disable the checkbox in gridview and that would be on page_load event.

View 1 Replies

Forms Data Controls :: Enable And Disable Gridview Selecting?

Dec 20, 2010

I have a gridview that is built based on my objectdatasource.. so at the moment, i have 1 gridview linked to 3 different objectdatasource resultsets.. my question is.. only 1 of the 3 do i want to allow or should i say enable the "GridView1_SelectedIndexChanged" ability. Is that possible, that when i bind the datasource to the gridview for that one, i can enable that?

View 4 Replies

Forms Data Controls :: Disable Buttons In Gridview?

Jun 17, 2010

disable an Add button in a gridview when the Edit or Delete button is clicked.?

View 5 Replies

Forms Data Controls :: Enable Or Disable The ImageField And Boundfield In Gridview?

Jul 12, 2010

How to enable or disable the ImageField and Boundfield of gridview in the code behind inside page load?

aspx codes:

<asp:ImageField
DataImageUrlField="GreetingType"
DataAlternateTextField="GreetingType"
DataImageUrlFormatString="images/hello.gif"
HeaderText="Greeting"></asp:ImageField>

<asp:BoundField
DataField="Location"
HeaderText="Location"/>

View 2 Replies

Forms Data Controls :: Enable Or Disable Textbox In Specific Row In Gridview Depending On Condition

Jul 2, 2010

I want to enable or disable text box in specific row depending on value of field in data source

View 5 Replies

Forms Data Controls :: Enable / Disable Controls In Template In Gridview When User Clicks Edit

Mar 4, 2011

I am looking to enable/disable controls (TextBox, DropDownList, etc.) in a GridViews template column based on the users specific access level when the user clicks the edit button. I have tried the following two methods:

[Code]....

View 4 Replies

Data Controls :: Enable Disable Button When At Least One CheckBox Is Checked In GridView

May 7, 2015

I want a solution for checkbox Check changed.in my gridview when i check on any row it hits check changed event and i have made a button visible if atleast one checkbox is checked.(But when i uncheck i want the button to get hidden if no row is selected).

View 1 Replies

Data Controls :: Enable Disable TextBox In GridView Based On RadioButton Selection

Apr 26, 2014

i have radio button list and one textbox in gridview if the value is yes text has to enable otherwise i need disable the text box in grid view how do this?

View 1 Replies

Data Controls :: Enable Disable DropDownList Inside GridView Based On CheckBox

Feb 19, 2014

How to enable & disable data value from selected table ?

For Example,  select ID from employeeTlb(for Dropdownlist function) then in asp:checkbox able to tick enable & disable that control  the  data in dropdownlist show/ hide ?

View 1 Replies

Data Controls :: Enable Disable TextBox Inside GridView Based On DropDownList Selection

Apr 27, 2014

i have one dropdown list and one gridview in my page by default all the textboxes in gridview enabled if i change the dropdown value textboxes in the gridview has to disable how to implement this?

View 1 Replies

Data Controls :: Enable Disable Edit Command Button In GridView Based On Some Condition

Aug 3, 2013

Suppose the Gridview on the page is for showing the detail records of the Header master record on the same page. How to disable the "Edit" within the Gridview? I would like to disable the "choose" in the Popup of the Gridview and also to disable any buttons of that.

View 1 Replies

Data Controls :: Enable Disable Save Button While Ordering GridView Rows Using JQuery

Feb 25, 2016

I came across the below article, I would like to know how to properly respond to the drop or stop event so that I can show the Save button only once someone changed the order. In other words, I would like the Save button hidden initially, only to make it visible once a drag and drop has occurred.

[URL]....

View 1 Replies

Data Controls :: Enable / Disable TextBox Based On Selected Value Of DropDownList Inside GridView

May 7, 2015

I'm using a gridview rows, in that I'm adding the rows. I need to disable the textboxes based upon the selected value from the dropdownlist (Yes / No). This should be remain same for the previous rows when ever I'm adding new rows.

View 1 Replies

Data Controls :: Enable Disable TextBox Controls In GridView Row When CheckBox Checked Unchecked

May 21, 2013

i have a gridview with templatefield  in templatefield there is a checkbox and in there are textboxes. 

i want when i check the checkbox then only that row can active and the textboxes are enabled true when deselect the checkbox then that row should enable false.

View 1 Replies

Forms Data Controls :: Enable And Disable Columns In Repeater?

Sep 30, 2010

how can i enable and disable columns in repeater in the code behind

View 1 Replies

Forms Data Controls :: How To Disable Buttons In EmptyDataTemplate

Oct 27, 2010

i want to disable some buttons in my emptydata template. i tried using this code but it cant find the control. thus returning an error Specified argument was out of the range of valid values.

Button btnsaveini = (Button)grdNonSerialized.Controls[0].Controls[0].FindControl("btnSave1");
btnsaveini.Enabled = false;

View 3 Replies

Forms Data Controls :: How To Enable / Disable TreeView Navigation Control

Feb 9, 2011

In asp.net(C#) i'm using masterpage and childpage.

in masterpage i used TreeView Navigation control to view the Childpage.

.What my doubt is......when i select the navgation control

my TreeView Control should be disable and when i click cancel button in Child page it will enable..

View 4 Replies

Forms Data Controls :: How To Disable Other Buttons At Edit Mode

Apr 28, 2010

I have GV with custom edit box. In the GV, I have a button to select the record for editing and another button to navigate to another screen. I was able to disable the button that navigates to the other screen in both normal and edit mode.

Now, I would like to disable all other buttons that remains visible for the other records list to prevent the user from editing other records while in edit mode.

I think my problem is because I am trying to disable a button that is not visible?

View 11 Replies

Forms Data Controls :: How To Disable / Enable Line Editing If Credentials Are Correct

Apr 16, 2010

Have a gridview that is populated via a DB, which is populated by another tool. That tool records all the data, including the user that submitted it.

The site also enables editing, but I want only the user that submitted the data to have the ability to edit HIS data only, even though the grid view is displaying other people's datas.

So currently the gridview has "ShowEditButton="True"

So on the far left, there is the Edit option for all lines, for all users, for any user viewing the site.

I want to do a verification where,

[Code]....

View 1 Replies

Forms Data Controls :: How To Enable Or Disable Textbx On Click Event Of Linkbutton For Particular Row

Jun 10, 2010

i have one gridview in which their is on linkbutton and one textbox

i want to enable or disable textbx on click event of linkbutton for particular row

.aspx code

[Code]....

.cs code

[Code]....

i am able to find textbox in gridview in RowDataBound event but how to perform action on click event on textbox for individual row

View 12 Replies

Forms Data Controls :: Enable And Disable Textbox While Selecting Checkbox In Samegridview?

Oct 22, 2010

when i click on the checkbox in the gridview column1 the textbox column4 should be enabled author wise textbox should be disabled...........

View 1 Replies

Web Forms :: Enable Disable Validators In GridView Row Based On CheckBox Selection?

Nov 28, 2012

I have one gridview with two template fields check box and dropdown and my doubt is dropdown validation should occur only for check box selected items..

 In my form all the dropdown shows validation even though if check box is not selected

<Columns>
<asp:TemplateField>
<ItemTemplate>

[Code]....

View 1 Replies

Disable / Enable Button In Gridview?

Apr 13, 2010

I am using template field in a Gridview. I have a button in that. I also have a method which returns bool. Now I want to disable the button in the gridview if my method returns true. And enable the button if my method retuns false.

View 5 Replies

Enable / Disable Any Record In Gridview ?

Nov 23, 2010

How to enable / disable any record in gridview ?using mssqlI want in my gridview the following will appear ..

Name Course Year Status
Sam MCA 2010 Enable

when i click on enable then record will be displayed in gridview and the enable button will convert into text disable... and when i click on disable then the record will be disable in gridview and enable button will appear ...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved