I have an asp:listbox control. I would like to be able to delete an item from that list box by pressing the delete key. I understand that this is not built in because the asp:listbox is a server side control and the server is unaware that the delete key has been pressed while the listbox had focus. I have been told that javascript is the way to go to build this functionality myself. My question is, has anyone done something like this before. I have never used javascript and I don't want to reinvent the wheel if I dont have to. Otherwise does anyone have some code samples about writing events for controls using javascript? Let me know. Thanks! John
JohnO3535
Posts
-
Events and ASP.NET Web Controls -
Putting DB value into a dropdown listbox in a DataGridI am working with a DataGrid and a Database. What follows is an example of the grid that I want to build (this example works - my question will come after it). I have stripped out most of the properties because they are not relavent to my question. There is an example of building a DataGrid that looks like this... Enabled="false" /> The last column of this grid is a Checkbox. And it is checked or unchecked based on what is in the database. My question is, how can I do something similar with a dropdown listbox? I have a location ID that I want to use to select the correct item in the listbox. But I do not know what property to set to get it to select that item. Here is what I have (but it only selects the first item no matter what the value is in the database)... Arizona Atlanta Cinncinati Washington DC Any help would be greatly appreciated. Johno