.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old June 30th, 2003, 09:44 AM
Carsten Carsten is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 1 Carsten User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Dropdownlist In a editable Datagrid

Hi,<br><br>I have a datagrid with cusomers.<br>I put a dropdownlist whith cities in the editItemTemplate. It is working well. I can fill my Cities in the dropdownlist on the editCommand event. But now I wont to change the selectedItem (city) in the dropdownlist to display the city corresponding to the selectedItem (customer) of the datagrid in my Database<br><br>Thanks for your help<br><br>Best reguards<br><br><br><br>Carsten

Reply With Quote
  #2  
Old June 30th, 2003, 11:52 AM
Sparragol Sparragol is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 10 Sparragol User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Ok. I haven't worked with dropdownlists inside a datagrid, but I used to use checkboxes, so I'll try to explain how you can do that. When you select a line on the datagrid, then you have an indexed attribute which is the index of the datagrid, ok?. Then you should have some precedure to know which item on the dropdownlist correspond with the customer selected. When you know which line have you selected, then you can go trhough the datagrid, and recover the control on that selected row, using a FindControl() method. When you got the control, then you can select the suitable item with the SelectedIndexItem propertie. I recommend you that before changing the selected index, change it before to SelectedIndex=-1, so you won't have problems like ' Drop downlists can't have multiple selections'.<br>I think I haven't be much clear, if you can't solve the problem with that, tell me, and I'll try to answer more much clearly (I'm trying to become an asp.net assister).<br><br><br>--The artificial intelligence never will be higher than the natural stupidity--

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > Dropdownlist In a editable Datagrid


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT