Results 1 to 2 of 2

Thread: gridview and combobox

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2005
    Posts
    194

    gridview and combobox

    I have 2 questions

    1. in my gridview how am I change the column width, I want to write the width to each column.

    here is my code:
    Code:
    <Columns >
                  <asp:BoundField DataField="courseID" HeaderText="קוד" ReadOnly="True" SortExpression="courseID" />
                  <asp:BoundField DataField="areaName" HeaderText="אזור" SortExpression="areaName" />
                  <asp:BoundField DataField="dayWeek" HeaderText="ימים בשבוע" SortExpression="dayWeek" />
                  <asp:BoundField DataField="place" HeaderText="מקום" SortExpression="place"  />
                  <asp:BoundField DataField="lecturer" HeaderText="מרצה" SortExpression="lecturer" />
                  <asp:BoundField DataField="subject" HeaderText="נושא ההרצאה" SortExpression="subject" />
                  <asp:BoundField DataField="destination" HeaderText="קהל יעד" SortExpression="destination" />
                  <asp:BoundField DataField="bigTime" HeaderText="עיתוי" SortExpression="bigTime" />
                  <asp:BoundField DataField="smallTime" HeaderText="שעה" SortExpression="smallTime" />
                  <asp:BoundField DataField="oneTime" HeaderText="תדירות" SortExpression="oneTime" />
                  <asp:BoundField DataField="category" HeaderText="קטגוריה" SortExpression="category" />
                </Columns>
    2 in combobox
    Code:
    <asp:DropDownList ID="DropDownList1" runat="server" Width="144px" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" >
                 <asp:ListItem Value = 0>aaaa</asp:ListItem>
                 <asp:ListItem Value = 1>bbbb</asp:ListItem>
    when I write DropDownList1.text I got the value ( 0 or 1)
    how can I get the text write "aaaa" or "bbbb"

    thanks!

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: gridview and combobox

    Moved from VB.NET forum.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width