Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disappearing datagrid
Message
From
13/05/2004 10:47:20
Keith Payne
Technical Marketing Solutions
Florida, United States
 
General information
Forum:
ASP.NET
Category:
Web forms
Miscellaneous
Thread ID:
00903190
Message ID:
00903603
Views:
15
>>>I have a web form with 8 panels on it.
>>>1 of the panels has a datagrid on it, with edit and delete links on the rows.
>>>When I click on the edit link the datagrid disappears. .....
>>>Rick
>>----------------------
>>Rick,
>>
>>Clicking the Edit hyperlink will also cause a postback. The common cause of a Datagrid not being rendered is that the Datasource is not assigned or has no data. Check to see if the Datagrid is bound to the Datasource when the Edit postback occurs - it should not be unless you are also caching the Datasource and reloading it before the bind.
>----------------------------
>Keith,
>Thank you for your comments. I went back and checked and sure enough, the datasource wasn't being assigned... it was over in a different routine which wasn't triggered unless I click on some of the other controls...
>I moved it to me Page_Load and now things are better!
>
>Now of course I have another question...
>I'll mention it here to you but I'll really make it another thread...
>The question is, The DataGrid edit mode is built with textboxes, but what I really need for some of my fields is DropDownList... How do I do that?
>
>Thanks,
>Rick

Rick,

To use different controls for editing, you will have to build up the Datagrid with Template columns rather than using the automatically generated columns.

There is a wealth of articles and help topics about templated Datagrids. A nice place to start might be http://aspnet.4guysfromrolla.com/articles/040502-1.aspx.
Previous
Reply
Map
View

Click here to load this message in the networking platform