|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DataList and Event not firedI am having a problem with one of my aspx pages using DataList. I will try to make it very short and precise :) ~~ The List is data bound on page load(!IsPostBack) to a DataTable. The page displays the list items all well and fine. The DataList has an Edit Command button (in ItemTemplate)and an EditItem template that has couple of TextBoxes and 2 Command buttons, Update and Cancel. When Edit Command button clicked, the page post backs and displays text boxes with update and cancel button for that line item. When i click Update button, its not getting fired AT ALL. I can see the page postback but nothing on the UpdateCommand event handler ??? I do all the necessary code on server side for the event handler Like setting the EditItemIndex on click of edit and calling dataList.databound() method etc etc. Could anyone please let me know the missing piece? Appreciate it Thanks in advance Cheers --Nirbhay Hi,
can you show relevant snippet of aspx and code? Show quoteHide quote "nirbhay" <rms10***@yahoo.com> wrote in message news:1144995579.828409.223250@i40g2000cwc.googlegroups.com... > Hello All > > I am having a problem with one of my aspx pages using DataList. > I will try to make it very short and precise :) > > ~~ The List is data bound on page load(!IsPostBack) to a DataTable. > The page displays the list items all well and fine. > The DataList has an Edit Command button (in ItemTemplate)and an > EditItem template that has couple of TextBoxes and 2 Command buttons, > Update and Cancel. > When Edit Command button clicked, the page post backs and displays text > boxes with update and cancel button for that line item. > > When i click Update button, its not getting fired AT ALL. > I can see the page postback but nothing on the UpdateCommand event > handler ??? > I do all the necessary code on server side for the event handler > Like setting the EditItemIndex on click of edit and calling > dataList.databound() method etc etc. > > Could anyone please let me know the missing piece? > Appreciate it > > Thanks in advance > Cheers > > --Nirbhay > Hi Teemu
The problem is fixed now after i enabled the view state. Thanks for your attention on this. On a side note, i noticed that when my EditItem Template is invoked, it refreshes my page and positions the cursor to the top of the page, which is fine for a short list. Lets say i click on the Edit command button on a list item at the bottom half of the page, it takes my cursor at the top of page and user has to scroll down to look where he last clicked... Is there a workaround to let browser remain positioned at the old clicked position ?? I would assume viewstate store such stats but looks like its not ??? Appreciate any help Cheers --Nirbhay Hi,
in ASP.NEt 2.0 you'd had MaintainScrollPositionOnPostBack on Page but with v1 there are many solutions http://pascarello.brinkster.net/rememberScrollPosition.html http://authors.aspalliance.com/JimRoss/Articles/MaintainScrollPos.aspx http://authors.aspalliance.com/aldotnet/examples/dgautoscroll.aspx ViewState stores server-side state of the control, so it wouldn't know about client-side positioning. Show quoteHide quote "nirbhay" <rms10***@yahoo.com> wrote in message news:1145339081.438946.134040@i39g2000cwa.googlegroups.com... > Hi Teemu > > The problem is fixed now after i enabled the view state. > Thanks for your attention on this. > > On a side note, i noticed that when my EditItem Template is invoked, it > refreshes my page and positions the cursor to the top of the page, > which is fine for a short list. > Lets say i click on the Edit command button on a list item at the > bottom half of the page, > it takes my cursor at the top of page and user has to scroll down to > look where he last clicked... > Is there a workaround to let browser remain positioned at the old > clicked position ?? > > I would assume viewstate store such stats but looks like its not ??? > Appreciate any help > > Cheers > > --Nirbhay >
GridViewRow.DataItem is null
Server Control to manipulate GridView Checkbox items under a RadioButton Access data in ObjectDataSource no FormView for create/insert page issue: accessing value of dropdownlist in a user control Datagrid custom paging always loads page 1 custom button/link in detailsview commandfield section Video capture control in asp.net 2.0 How well is a performance of a Menu Control |
|||||||||||||||||||||||