Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 23rd, 2007, 09:32 AM
Registered User
 
Join Date: Oct 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Datagrid Dropdownlist unable to get value

I have a drop downlist with a yes or no value and it always defaults to the {0} index so my update does not work.

 SqlDataAdapter1.Fill(DataSet21)
        Dim fieldTable As DataSet2.ResultsDataTable
        fieldTable = DataSet21.Results
        Dim rowToUpdate As DataSet2.ResultsRow
        rowToUpdate = fieldTable.Rows(e.Item.ItemIndex)
        rowToUpdate.saved = CType(e.Item.Cells(9).Controls(0), _
                                    TextBox).Text

this works everytime for the standard datagrid, but when I put a dropdownlist in an itemtemplate, it cannot determine the selected value of the drop down list and I cannot.

Can someone tell me how to do this?

Thanks,
Chuck







Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to set SelectedValue on DropDownList jlrolin ASP.NET 2.0 Professional 0 April 13th, 2007 09:30 AM
dropdownlist in datagrid ansowmya ASP.NET 1.0 and 1.1 Basics 1 June 14th, 2006 02:49 PM
dropdownlist in datagrid ansowmya ASP.NET 2.0 Basics 0 June 10th, 2006 10:29 PM
unable to get selected value form dropdownlist swati_joshi ASP.NET 1.0 and 1.1 Basics 3 March 31st, 2006 12:35 PM
GetSelectedIndex Datagrid? Dropdownlist macupryk ADO.NET 0 September 20th, 2004 09:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.