GridView control enters edit mode only when I click Edit link twice

Hi all..

I have a GridView control in an ASP.NET 2.0 page. I added a column that
contains edit, update, cancel buttons. Because I did that, I had to handle
RowEditing event or an exception was thrown.

Well... this is the body of the RowEditing event:

protected void gvParametros_RowEditing(object sender, GridViewEditEventArgs
e)
{
      gvParametros.EditIndex = e.NewEditIndex;
}

The fact is that when page is loaded and I click the edit link, page is
refreshed but GridView doesn't enter edit mode. When I press edit link
again, GridView enters edit mode.

Any help to solve this behavior would be greatly appreciated

Thanks
Jaime

-1
jstuardo
4/7/2006 1:33:54 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

3 Replies
1912 Views

Similar Articles

[PageSpeed] 14

Hi Jaime,

If you try rebinding your gridview, the situation also will occur?

That is "gvParametros.DataBind();" ?

0
sophia
4/10/2006 2:13:46 AM

Hello..

by rebinding is worse. Never grid view enters edit mode.

Jaime

0
jstuardo
4/13/2006 2:23:55 AM

Sorry...

By rebinding actually worked. I made a little mistake. Thanks

Jaime

0
jstuardo
4/13/2006 3:26:18 AM
Reply:

Similar Artilces:

Direct editing of gridView or Ddatagrid controls without clicking on an EDIT link
I have an application where lots of data is presented to the user in a gridView control and the user needs the option to review and overwrite any values in the cells of the grid.  My users find it very annoying and time consuming to click on an edit link to turn a row of the gridView into edit mode.  Typically, they might jump around and edit a few values in several rows.  Is there any way to present the data in a gridView control, datagrid control or something that looks like a grid where the entire grid is already in edit mode?  Can you make a grid that cont...

Gridview Edit go to new page and enter Edit mode on a formview control.
Okay, so far I have the edit button go to a page called update.aspx. And have the ID selected. However, I don't want it to be in selected view, I want it to go to the update.aspx page in edit mode not selected mode. Is this possible? You can add one hyperlink and set its path to update.aspx?Id=(selectedId)on update.aspx read Id's value from querystring and do updation - Hardik (Software Developer,Surat,India)Please remember to click "Mark as Answer" on this post if it helped you. You lost me at the "do updation part" so far I have a the EDIT link go to ...

using javascript getting value from textbox when edit button is clicked and both controls are present in gridview control
Hi All using javascript I want to get value  from textbox when edit button is clicked and both controls that is texbox and button are present in gridview control .Alok Hi aloksinha83, Please see this post: http://forums.asp.net/t/1069245.aspx Thanks,Qin Dian TangMicrosoft Online Community SupportPlease remember to mark the replies as answers if they help and unmark them if they provide no help....

Add new controls to a gridview row; when editing that row using the edit row feature in the gridview control.
Hi all  I have a questions that looks hard / complex to me, and i know you can help me in this. Q {  I have row in a Gridview and i have an edit option to it. I press the edit button, to edit the values in that row and update data all the way back to the database. Now when i press the edit button, i want a drop down list to be displayed that contain values for a particular field in my grid view. (for now only plain text boxes appear.) } I hope you understand my question, all i need to do is replace the text box controls with a dropdown list when i am editing a row in ...

Handling control events while in edit mode for a gridview control
I have a dropdownlist and checkbox in a single column of a gridview. While the row is in edit mode, I want to set the visibility of the checkbox based on the value selected in the dropdown list. I can do this easily enough  when the row is first put into edit mode, but how do I access the dropdown list's change event when the row is already sitting there in edit mode? Thanks for any help you can provide.   Penny Penny, Just create a SelectedIndexChanged event like below. Create a row object for the currently edited row, find the checkbox you want to control, then set the Visib...

GridView and Javascript
Hey All, I need help from  you. I have a GridView. In the  Edit Item template of the first Column I have a textbox, an user control and hidden field. When I click on the user control it  opens a pop up from which I can choose the required value. The text value is populated in the textbox and Id in the hidden field. Here's the code for edit template.         <EditItemTemplate>                        <table cellpaddin...

Edit control is not loaded in edit mode
I have a problem that the dynamic data field edit control (such as TEXT_edit.ascx) is not loaded when in edit mode. Instead, the normal view control is loaded (such as Text.ascx). In debug I can determina the page mode is truly edit mode. Please help! Could you provide some more context: is this in a custom page with a custom column set or one of the default scaffold pages? Are you using a UIHintAttribute? Make sure the names of the display and edit versions match.Marcin DoboszSDE, ASP.NET Team, MicrosoftRead my blog This is just a thought are you using Views rather than ...

IWDBEdit control set to IWDBGridColumn.Control not editable [Edit]
Hi folks. I'm relatively new to IntraWeb and am having trouble with my application. It is a simple app that is supposed to show a list of user accounts in a grid and allow the user to edit data in the accounts. I have a TADOQuery connecting to MS SQL, with 'Select * from UserAccounts' as the sql text. I have a TDataSource with the Dataset property pointing to my TADOQuery object. Both of these objects exist as part of the UserSession. On my main form, I have an IWDBGrid, IWDBNavigator, and an IWDBEdit control. They are all hooked up to the TDatasource in the UserSessi...

GridView: editing without clicking edit link
Hi guys, I'd like to edit the content of the gridview without using 'edit' link. User can just click the cell and edit the data. Any links or thoughts would be appreciate.I can do it! Well, I have not tried but take a look at this: http://www.targetprocess.com/blog/2007/10/grid-inline-editing-using-aspnet-ajax.html Other than these, there are 3rd party grids which let you do MS Excel like editing. A Google search will help.Mark replies as answers if they helped you solve the problem. I don't want to pay for the control. Googled, but no luck. Any ideas?I can do it! ...

Custom control
 I created a custom control class like following! When in normal mode it's a div and when in edit mode it is a dropdownlist! 1 public class Label2DropDown : BoundField2 {3 private string dropMember;4 public string DropMember5 {6 get { return dropMember; }7 set { dropMember = value; }8 }9 10 ///<summary>11 ///Builds the contents of the field12 ///</summary> 13 protected override void InitializeDataCell(DataControlFieldCell cell, DataControlRowSta...

Edit data with GridView Control ? or another control ? help
I use GrivView in ASP.Net 2.0 to show data from DataTable. And i want to edit some fields in some rows. How can I do it? If i touch EDIT button - all columns, which have ReadOnly=false, switch into EDIT mode. But I want, that in first raw I can edit 2,3 column and in second row only 3 column. How can I do it ? ...

Is there really an easy way to click and edit a cell value at run time (without having to click on Edit and Update links) in GridView?
 Link for an answer is broken. Anyway I want know just that. RegardsLeif  I'm talking with absolutely no knowledge, but why not to trigger "onblur" event in the client textbox and forward it to whatever the edit-and-update links go?...

GridView Control (Edit Mode) with a checkboxlist
If there is an aswer somewher in the forums please point it out I could not find one. I have a gridview - that simply displays data untill i hit edit then a column is changed into a Checkbox list where I mark the options they already have marked - this part works fine When i click the save icon on the datagrid row - the RowUpdating routine runs but none of the checkbox items I have chosen are saved to the database - I think the problem is that I load the checkboxlist dynamically when the grid goes into the edit mode - Can anyone give me a good solution on this   TIADylan Ba...

Finding a control in GridView in EDIT Mode
Ok... Why MS changed this so drastically from 1.1 is beyond me, however, I cannot seem to get a reference to a drop down list when  a GRIDVIEW goes into EDIT mode.   WHY? Here is the template column in the GridView <asp:TemplateField HeaderText="Roles For User"> <EditItemTemplate> <asp:DropDownList ID="ddRoles" runat="server" /> </EditItemTemplate> <ItemTemplate> <asp:DataList ID="dlRoles" runat="server" /> </ItemTemplate> </asp:TemplateField>   NOW, when the edit event gets called on the GRIDVIEW, it fires this e...

Web resources about - GridView control enters edit mode only when I click Edit link twice - asp.net.presentation-controls

GridView SelectedItem Binding Gotcha in WinRT
Last night when I was doing some WinRT hacking I was trying to setup databinding to the selected item in the GridView control and I ran into ...

CNW Group
Home Services Beyond the Wire About CNW Financials Webcasts Events My CNW All News Releases Advanced Search Gridview Latest News Releases All ...

CNW Group
... Services Beyond the Wire About CNW my CNW CNW Access CNW Directories Financials Webcasts Events my CNW All News Releases Advanced Search Gridview ...

CNW Group
Home Services Beyond the Wire About CNW Financials Webcasts Events My CNW All News Releases Add a Filter Gridview Latest News Releases All Today ...

New CmdLets of Powershell 2.0
New CmdLets of Powershell 2.0

Price Drop: Softbox
... objects- create product reflection- changing the background with something more interestingUse it as:- softbox- honeycomb softbox- gridview ...

Profile.aspx: ASP Alliance
.NET,ASP,ASP.NET,SQL,XML,HTML,ADO,ADO.NET,JavaScript,JScript,CSharp,VBScript and VB tutorials from AspAlliance.

Quick Answers - CodeProject
Questions - Free source code and tutorials for Software developers and Architects.; Updated: 25 Oct 2012

DotNetKicks.com - Upcoming stories
DotNetKicks.com is a community based news site edited by our members. It specialises in .NET development techniques, technologies and tools including ...

View Features - ExtendASP
Call 847-681-9827 or Request a Demo View Features Testimonials Pricing About Us Coming Soon ExtendASP exposes every feature, more than any other ...

Resources last updated: 1/6/2016 11:11:13 AM