Wrox Programmer Forums
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics 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 April 29th, 2007, 06:11 AM
Registered User
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default binding on listbox in datagrid

I am facing the kind of same problem
I had been to the website as mentioned above.But I have a simpler problem(though not able to find the answer).
I wanted to put a listbox in datagrid and the value in listbox should be a simple count from 0 to 10.
The code

    <asp:GridView ID="gd1" runat="server" Style="z-index: 100; left: 0px; position: absolute;
            top: 16px" Width="704px" BackColor="#FFC0FF">
            <asp:TemplateField HeaderText="Quantity">
            <asp:ListBox ID="qty" runat="server" Width="75px" Height="30px" />

Now, the problem is I want to set a maximum quanitity to 10. But I dont know how to bid the listbox in datagrid from count 0 to 10. and evenif somehow I manage to do that, how can I retrieve the value.
what event shall I use.
May I put a button after the value is set or can we use IndexChange event , if it is possible. I might sound a bit confused, the reason is I am not sure about how to manage the event on listbox which is in datagrid

Please Help!!

Similar Threads
Thread Thread Starter Forum Replies Last Post
Binding XML to a listbox bonekrusher ASP.NET 2.0 Basics 0 March 25th, 2007 08:20 AM
Binding a datagrid to a recordset roykennedy VB Databases Basics 4 October 28th, 2005 02:15 PM
Binding a datagrid on errors drono ASP.NET 1.0 and 1.1 Professional 3 June 9th, 2005 08:30 AM
DataGrid Binding GrindCrusher Classic ASP Databases 0 February 21st, 2004 05:52 PM
onbeforeprint and datagrid binding coryb ASP.NET 1.0 and 1.1 Basics 2 October 10th, 2003 01:56 PM

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