Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > asp.net > april 2005 >

asp.net : oh no! another datagrid dropdown question!


Kurt Schroeder
4/8/2005 1:49:02 PM
I'm getting there!!!!
I've used the artical http://www.4guysfromrolla.com/webtech/050801-1.shtml
to create my dropdown list from a database. The DDL gets populated! The
artical says, "then set the index as you normally would". Well, what can i
say i can't figure out how to set it.
any ideas would be great!
thanks
Kurt Schroeder
4/8/2005 2:25:03 PM
i guess i need to know where to set the selectedindex as well as how.
thanks
kes

[quoted text, click to view]
Tu-Thach
4/8/2005 3:31:02 PM
You set the index like this:

dropdown.SelectedIndex = 0; // or whatever value you want 1,2,3.

[quoted text, click to view]
Kurt Schroeder
4/8/2005 7:53:03 PM
thanks for answering.
that will not work because the dropdown list is a child control of the
datagrid. I tried it and i gives me a run time error. even afteri manuelly
decoarred it a protected with events....
but thanks! and please let me know if i'm wrong about this!
kes
[quoted text, click to view]
Tu-Thach
4/11/2005 3:29:03 PM
How did you get a hold of the DropDownList? Did you use the FindControl
method?

[quoted text, click to view]
Kurt Schroeder
4/12/2005 6:20:01 AM
i have it figured out now, thanks.
kes

[quoted text, click to view]
AddThis Social Bookmark Button