Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2006-08-29 : 11:37:06
|
I've created a web page (ASP.NET 1.1) with the obligatory datagrid containing the ubiquitous drop down in one column. That's all appears fine.The drop down only shows when the user presses EDIT for that row.The drop down itself has a good few hundred rows (from my SQL server).My question is, what do people feel is the "best" way to populate this drop down. Should it be done when the page initially loads or should it be just when the user hits EDIT (or some other time). FOr this particular datagrid the user will be required to edit all the rows that appear. Secondly can this data be cached and reused? If so how?Many thanks in advancesteve-----------Don't worry head. The computer will do all the thinking from now on. |
|
dfiala
Posting Yak Master
116 Posts |
Posted - 2006-08-29 : 13:40:16
|
Only populate the controls that are on the page. However, if the user needs to edit all the rows, why not display them all as editable when the grid displays, instead of forcing the user to hit edit for each row? You can use a templated column for this and simply put the dropdown in the Item template. Here's an article, that describes how to do so more fully...http://aspnet.4guysfromrolla.com/articles/121504-1.aspxIn terms of caching the dropdown data...What does the data depend on, if anything? The user, some other value on the page?Dean FialaVery Practical Software, IncNow with Blogging...http://www.vpsw.com/blogbabyMicrosoft MVP |
 |
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2006-08-30 : 02:56:43
|
D'Oh, So simple, why didn't I think of that!! Many many thanks Dean.The reason I was thinking of caching the data was becuase of (I thought) potentially having to pull it from the server every time the user hit edit. I think you have killed two proverbial birds with one stone thoughcheerssteve-----------Don't worry head. The computer will do all the thinking from now on. |
 |
|
|
|
|