473,398 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

oh no! another datagrid dropdown question!

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
kes
Nov 19 '05 #1
5 889
i guess i need to know where to set the selectedindex as well as how.
thanks
kes

"Kurt Schroeder" wrote:
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
kes

Nov 19 '05 #2
You set the index like this:

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

"Kurt Schroeder" wrote:
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
kes

Nov 19 '05 #3
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
"Tu-Thach" wrote:
You set the index like this:

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

"Kurt Schroeder" wrote:
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
kes

Nov 19 '05 #4
How did you get a hold of the DropDownList? Did you use the FindControl
method?

"Kurt Schroeder" wrote:
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
"Tu-Thach" wrote:
You set the index like this:

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

"Kurt Schroeder" wrote:
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
kes

Nov 19 '05 #5
i have it figured out now, thanks.
kes

"Tu-Thach" wrote:
How did you get a hold of the DropDownList? Did you use the FindControl
method?

"Kurt Schroeder" wrote:
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
"Tu-Thach" wrote:
You set the index like this:

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

"Kurt Schroeder" wrote:

> 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
> kes

Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: HalaszJ | last post by:
Is there no work around for this? >-----Original Message----- >I have asked this question on about every board I can >think of and I have yet to get an answer, so If anyone >would know I...
0
by: Kilic Beg via .NET 247 | last post by:
Hi, I am having trouble adding a dropdown to DataGrid at runtime. I create all boundColumns and the TemplateColumn for the dropdown at runtime. The dropdown has a different datasource then the...
2
by: pei_world | last post by:
I want to implement a key hit with enter to dropdown a combobox that is in the datagrid. in this case I need to override its original behaviours. I found some codes from the web. Does anyone know...
4
by: Richard Roche | last post by:
Is it possible to use a drop combo instead of a text box when using the EditCommand in the Datagrid? Many table columns are bound to 'lookup' tables, user's don't care about the foreign keys,...
3
by: Raja | last post by:
I have a simple question, I have a datagrid and inside the grid, i have List box. I am able to render the page with the datagrid and the lisbox values. Now, my question is how to trap the server...
1
by: Vijay Kerji | last post by:
Hi, I have a datagrid with dropdown list and Remove hyperlink in it as columns. When I remove a row from the datagrid, Dropdown list selection is retaining its previous value. i.e, removed...
6
by: Jenna Alten | last post by:
I have a datagrid with a template column that contains a dropdown list. I currently fill and display the dropdown list on the page load. This is working correctly. I am NOT using an Edit Column. I...
0
by: Sean | last post by:
Hi, I am trying to get this piece of code to work. I have to design a GUI which would look similar to Month |Year |Old | New dropdown |dropdown |4 | dropdown dropdown |dropdown |2 |...
3
by: Moojjoo | last post by:
I created an user control (.ascx file) with a DropDownList (DDL) with the following code behide: public string Selected_dept_value() { string dept_value = dept_dropdown.SelectedValue; return...
2
by: Peter | last post by:
ASP.NET 2003 In the DataGrid how do I select current cell value in the dropdown box when I click on the edit link, currently when I click on the edit link in the DataGrid the dropdown box...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.