GirdView Problem

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2008
Posts: 52
Reputation: brightline is an unknown quantity at this point 
Solved Threads: 0
brightline brightline is offline Offline
Junior Poster in Training

GirdView Problem

 
0
  #1
Jun 29th, 2008
I have a gridview that contains an 'edit' command button.
The problem is that when I click the this 'edit' command button it does not work from the first time,I must click it 2 times to enable edit mode.
I want help to make it enable edit mode from the first time.
I am using VS.NET 2005.

this is the code that I am using to enable editing mode:

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

Thanks in advace.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 58
Reputation: dskumar_85 is an unknown quantity at this point 
Solved Threads: 1
dskumar_85 dskumar_85 is offline Offline
Junior Poster in Training

Re: GirdView Problem

 
0
  #2
Jun 30th, 2008
I THINK it's better to give poskback to the grid .... try this
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 125
Reputation: bala24 is an unknown quantity at this point 
Solved Threads: 11
bala24's Avatar
bala24 bala24 is offline Offline
Junior Poster

Re: GirdView Problem

 
0
  #3
Jul 1st, 2008
I think you are binding the gridview inside a IF not ISPOSTBACK ----END IF code in Page Load.

Paste it outside this on Page Load.

This should do the trick.
Michelangelo

"The best place to find a helping hand is at the end of your own arm"
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 118
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

Re: GirdView Problem

 
0
  #4
Jul 1st, 2008
Call the GridView1.DataBind() method after setting the edit index inside the GridView1.RowEditing event handler
Last edited by serkan sendur; Jul 1st, 2008 at 3:27 pm.
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 52
Reputation: brightline is an unknown quantity at this point 
Solved Threads: 0
brightline brightline is offline Offline
Junior Poster in Training

Re: GirdView Problem

 
0
  #5
Jul 2nd, 2008
Can u tell me how 2 do this (postback).
thnx in advance.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 3
Reputation: aspking is an unknown quantity at this point 
Solved Threads: 0
aspking aspking is offline Offline
Newbie Poster

Re: GirdView Problem

 
0
  #6
Jul 3rd, 2008
I found this over at aspnettutorials.com. I think should help ya.

http://www.aspnettutorials.com/tutor...te-csharp.aspx
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC