all groups > asp.net datagrid control > september 2005 >
You're in the

asp.net datagrid control

group:

Datagrid In a webcontrol


Datagrid In a webcontrol CalSun
9/22/2005 9:22:30 AM
asp.net datagrid control:
I have a datagrid with Edit/Delete columns in a webcontrol.
I load this control dynamically based on users' selection from a table
dropdownlist.
The control loads fine and the data is there. However, when I click on Edit
to change the current column, the column doesn't change to Update/Cancel.
The data in the datagrid is gone. It's a blank datagrid.

I need your help.
--Thanks

Re: Datagrid In a webcontrol Elton Wang
9/23/2005 7:53:38 AM
Please show your code in Edit event.


[quoted text, click to view]

Re: Datagrid In a webcontrol CalSun
9/23/2005 7:56:13 AM
Thanks for the message.
I have solved the problem. The Edit/Delete features work just fine with the
datagrid. My problem was the order of event. I select a table from a
dropdownlist and detect the change in page_load. The page_load event takes
place before the dropdownlist change. It doesn't work with
cmbTable.SelectedValue in page_load. I got the dropdownlist selection with
request.form.

--CalSun

[quoted text, click to view]

AddThis Social Bookmark Button