|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
grid postbackin a grid with templates update,delete, edit. why the buttons need to be
clicked twice in order to take action. grid.item command fires up every time a button is clicked. it's just the button action that don't execute.... anyone else had that issue? The answer depends on which asp.net version are you using and how do you
databind the grid? Show quoteHide quote "Cam" wrote: > in a grid with templates update,delete, edit. why the buttons need to be > clicked twice in order to take action. > > grid.item command fires up every time a button is clicked. > it's just the button action that don't execute.... > > anyone else had that issue? v 1.1
void refreshgrid(){ grid.datasource = ds (populated dataset) grid.databind. } grid_itemcommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e){ switch(e.commandname){ case "update": //stepped through here.. update the dbase refreshgrid(); //though executed... doesn't refresh. break; } } if i close the browser and open the page again... the change made is displayed. click on edit once... nothing. twice then edit box is there. click on save onece... nothing. twice it saves and don't display... never seen this b 4 Show quoteHide quote "Phillip Williams" wrote: > The answer depends on which asp.net version are you using and how do you > databind the grid? > > -- > HTH, > Phillip Williams > http://www.societopia.net > http://www.webswapp.com > > > "Cam" wrote: > > > in a grid with templates update,delete, edit. why the buttons need to be > > clicked twice in order to take action. > > > > grid.item command fires up every time a button is clicked. > > it's just the button action that don't execute.... > > > > anyone else had that issue? Is the grid placed on the webform dynamically or declaratively? When the
page is loaded how do you call the refreshgrid method and during which event handling? Show quoteHide quote "Cam" wrote: > v 1.1 > void refreshgrid(){ > grid.datasource = ds (populated dataset) > grid.databind. > } > grid_itemcommand(object source, > System.Web.UI.WebControls.DataGridCommandEventArgs e){ > switch(e.commandname){ > case "update": > //stepped through here.. update the dbase > refreshgrid(); //though executed... doesn't refresh. > break; > } > } > if i close the browser and open the page again... the change made is > displayed. > click on edit once... nothing. twice then edit box is there. > click on save onece... nothing. twice it saves and don't display... > never seen this b 4 > "Phillip Williams" wrote: > > > The answer depends on which asp.net version are you using and how do you > > databind the grid? > > > > -- > > HTH, > > Phillip Williams > > http://www.societopia.net > > http://www.webswapp.com > > > > > > "Cam" wrote: > > > > > in a grid with templates update,delete, edit. why the buttons need to be > > > clicked twice in order to take action. > > > > > > grid.item command fires up every time a button is clicked. > > > it's just the button action that don't execute.... > > > > > > anyone else had that issue? page_load(....){
if(!ispostback){ refrreshgrid(); } } thanks Show quoteHide quote "Phillip Williams" wrote: > Is the grid placed on the webform dynamically or declaratively? When the > page is loaded how do you call the refreshgrid method and during which event > handling? > -- > HTH, > Phillip Williams > http://www.societopia.net > http://www.webswapp.com > > > "Cam" wrote: > > > v 1.1 > > void refreshgrid(){ > > grid.datasource = ds (populated dataset) > > grid.databind. > > } > > grid_itemcommand(object source, > > System.Web.UI.WebControls.DataGridCommandEventArgs e){ > > switch(e.commandname){ > > case "update": > > //stepped through here.. update the dbase > > refreshgrid(); //though executed... doesn't refresh. > > break; > > } > > } > > if i close the browser and open the page again... the change made is > > displayed. > > click on edit once... nothing. twice then edit box is there. > > click on save onece... nothing. twice it saves and don't display... > > never seen this b 4 > > "Phillip Williams" wrote: > > > > > The answer depends on which asp.net version are you using and how do you > > > databind the grid? > > > > > > -- > > > HTH, > > > Phillip Williams > > > http://www.societopia.net > > > http://www.webswapp.com > > > > > > > > > "Cam" wrote: > > > > > > > in a grid with templates update,delete, edit. why the buttons need to be > > > > clicked twice in order to take action. > > > > > > > > grid.item command fires up every time a button is clicked. > > > > it's just the button action that don't execute.... > > > > > > > > anyone else had that issue? Check the AutoEventWireup value in the page directive and the OnInit method
within the "Web Form Designer generated Code" region. If the AutoEventWireUp were set to "true" and the OnInit has this line of code in it: this.Load += new System.EventHandler(this.Page_Load); If that is the case then your application is calling the Page_Load twice thereby messing up the databinding sequence that you have. If it turns out to be the case you can either set the AutoEventWireUp=â€false†or remove wiring up the event handling in the OnInit method. Show quoteHide quote "Cam" wrote: > page_load(....){ > if(!ispostback){ > refrreshgrid(); > } > } > > thanks > "Phillip Williams" wrote: > > > Is the grid placed on the webform dynamically or declaratively? When the > > page is loaded how do you call the refreshgrid method and during which event > > handling? > > -- > > HTH, > > Phillip Williams > > http://www.societopia.net > > http://www.webswapp.com > > > > > > "Cam" wrote: > > > > > v 1.1 > > > void refreshgrid(){ > > > grid.datasource = ds (populated dataset) > > > grid.databind. > > > } > > > grid_itemcommand(object source, > > > System.Web.UI.WebControls.DataGridCommandEventArgs e){ > > > switch(e.commandname){ > > > case "update": > > > //stepped through here.. update the dbase > > > refreshgrid(); //though executed... doesn't refresh. > > > break; > > > } > > > } > > > if i close the browser and open the page again... the change made is > > > displayed. > > > click on edit once... nothing. twice then edit box is there. > > > click on save onece... nothing. twice it saves and don't display... > > > never seen this b 4 > > > "Phillip Williams" wrote: > > > > > > > The answer depends on which asp.net version are you using and how do you > > > > databind the grid? > > > > > > > > -- > > > > HTH, > > > > Phillip Williams > > > > http://www.societopia.net > > > > http://www.webswapp.com > > > > > > > > > > > > "Cam" wrote: > > > > > > > > > in a grid with templates update,delete, edit. why the buttons need to be > > > > > clicked twice in order to take action. > > > > > > > > > > grid.item command fires up every time a button is clicked. > > > > > it's just the button action that don't execute.... > > > > > > > > > > anyone else had that issue? Hi!
AutoEventWireup was and is =false. Oninit has this.Load += new System.EventHandler(this.Page_Load); setting AutoEventWireup to true did not help the issue. i tried on postback contrary to !postback... still nothing ------------------------------------------------- all other controls on the page outside the grid work fine it's the controls inside the grid that require a double click. the causevalidation property is set to true a couple of folks had the same issue in the forum but no solution was provided... Thanks Show quoteHide quote "Phillip Williams" wrote: > Check the AutoEventWireup value in the page directive and the OnInit method > within the "Web Form Designer generated Code" region. If the AutoEventWireUp > were set to "true" and the OnInit has this line of code in it: > > this.Load += new System.EventHandler(this.Page_Load); > > If that is the case then your application is calling the Page_Load twice > thereby messing up the databinding sequence that you have. If it turns out to > be the case you can either set the AutoEventWireUp=â€false†or remove wiring > up the event handling in the OnInit method. > > -- > HTH, > Phillip Williams > http://www.societopia.net > http://www.webswapp.com > > > "Cam" wrote: > > > page_load(....){ > > if(!ispostback){ > > refrreshgrid(); > > } > > } > > > > thanks > > "Phillip Williams" wrote: > > > > > Is the grid placed on the webform dynamically or declaratively? When the > > > page is loaded how do you call the refreshgrid method and during which event > > > handling? > > > -- > > > HTH, > > > Phillip Williams > > > http://www.societopia.net > > > http://www.webswapp.com > > > > > > > > > "Cam" wrote: > > > > > > > v 1.1 > > > > void refreshgrid(){ > > > > grid.datasource = ds (populated dataset) > > > > grid.databind. > > > > } > > > > grid_itemcommand(object source, > > > > System.Web.UI.WebControls.DataGridCommandEventArgs e){ > > > > switch(e.commandname){ > > > > case "update": > > > > //stepped through here.. update the dbase > > > > refreshgrid(); //though executed... doesn't refresh. > > > > break; > > > > } > > > > } > > > > if i close the browser and open the page again... the change made is > > > > displayed. > > > > click on edit once... nothing. twice then edit box is there. > > > > click on save onece... nothing. twice it saves and don't display... > > > > never seen this b 4 > > > > "Phillip Williams" wrote: > > > > > > > > > The answer depends on which asp.net version are you using and how do you > > > > > databind the grid? > > > > > > > > > > -- > > > > > HTH, > > > > > Phillip Williams > > > > > http://www.societopia.net > > > > > http://www.webswapp.com > > > > > > > > > > > > > > > "Cam" wrote: > > > > > > > > > > > in a grid with templates update,delete, edit. why the buttons need to be > > > > > > clicked twice in order to take action. > > > > > > > > > > > > grid.item command fires up every time a button is clicked. > > > > > > it's just the button action that don't execute.... > > > > > > > > > > > > anyone else had that issue? found the solution..... delete the page and rebuilt it. it works fine same
codes..... thanks Show quoteHide quote "Cam" wrote: > Hi! > AutoEventWireup was and is =false. > Oninit has > this.Load += new System.EventHandler(this.Page_Load); > > setting AutoEventWireup to true did not help the issue. > i tried on postback contrary to !postback... still nothing > ------------------------------------------------- > all other controls on the page outside the grid work fine > it's the controls inside the grid that require a double click. > the causevalidation property is set to true > a couple of folks had the same issue in the forum but no solution was > provided... > > Thanks > > > "Phillip Williams" wrote: > > > Check the AutoEventWireup value in the page directive and the OnInit method > > within the "Web Form Designer generated Code" region. If the AutoEventWireUp > > were set to "true" and the OnInit has this line of code in it: > > > > this.Load += new System.EventHandler(this.Page_Load); > > > > If that is the case then your application is calling the Page_Load twice > > thereby messing up the databinding sequence that you have. If it turns out to > > be the case you can either set the AutoEventWireUp=â€false†or remove wiring > > up the event handling in the OnInit method. > > > > -- > > HTH, > > Phillip Williams > > http://www.societopia.net > > http://www.webswapp.com > > > > > > "Cam" wrote: > > > > > page_load(....){ > > > if(!ispostback){ > > > refrreshgrid(); > > > } > > > } > > > > > > thanks > > > "Phillip Williams" wrote: > > > > > > > Is the grid placed on the webform dynamically or declaratively? When the > > > > page is loaded how do you call the refreshgrid method and during which event > > > > handling? > > > > -- > > > > HTH, > > > > Phillip Williams > > > > http://www.societopia.net > > > > http://www.webswapp.com > > > > > > > > > > > > "Cam" wrote: > > > > > > > > > v 1.1 > > > > > void refreshgrid(){ > > > > > grid.datasource = ds (populated dataset) > > > > > grid.databind. > > > > > } > > > > > grid_itemcommand(object source, > > > > > System.Web.UI.WebControls.DataGridCommandEventArgs e){ > > > > > switch(e.commandname){ > > > > > case "update": > > > > > //stepped through here.. update the dbase > > > > > refreshgrid(); //though executed... doesn't refresh. > > > > > break; > > > > > } > > > > > } > > > > > if i close the browser and open the page again... the change made is > > > > > displayed. > > > > > click on edit once... nothing. twice then edit box is there. > > > > > click on save onece... nothing. twice it saves and don't display... > > > > > never seen this b 4 > > > > > "Phillip Williams" wrote: > > > > > > > > > > > The answer depends on which asp.net version are you using and how do you > > > > > > databind the grid? > > > > > > > > > > > > -- > > > > > > HTH, > > > > > > Phillip Williams > > > > > > http://www.societopia.net > > > > > > http://www.webswapp.com > > > > > > > > > > > > > > > > > > "Cam" wrote: > > > > > > > > > > > > > in a grid with templates update,delete, edit. why the buttons need to be > > > > > > > clicked twice in order to take action. > > > > > > > > > > > > > > grid.item command fires up every time a button is clicked. > > > > > > > it's just the button action that don't execute.... > > > > > > > > > > > > > > anyone else had that issue?
What functionality does Infragistics controls offer, which don't come with VS .NET 2005?
Master Pages and Cross-Page Form Information Basic formatting for HTML text in ASP.NET 1.1 ? Datagrid Listbox is overlapping the Textbox in Asp.net Hi Is there a way to set onmouseover for a LinkButton in ASP.NET 2.0 ? Broswer Compatibility Setting Hyperlink URL in Gridview timer functionality |
|||||||||||||||||||||||