DataList and Event not fired

N

nirbhay

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
 
N

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top