Login    
 
 
 
 
Text/HTML
  
You are here :: Blogs Saturday, May 19, 2012

Search
Note: This uses the internal blog search engine. The Google search engine is also available at the top of the page.
  
Disclaimer

Please review the site disclaimer before downloading or using content found on this site

  
Categories
  
DEVSHED Blog
As always, I welcome your comments!
Oct 13

Written by: Steve Gray
10/13/2010 3:25 PM  RssIcon

Code to add a row to a Janus Multicolumn Dropdown

If you already have a data table, we’ll just add a row to that table

Me.ddlArchAssignedTo.DisplayMember = "SLPRSNID" 
Me.ddlArchAssignedTo.ValueMember = "SLPRSNID"
Dim oDT As DataTable 
oDT = dynData.SPs.FP_RM00301_SEL_ArchReps(AppUser.connectionString).getTable
Dim oRow As DataRow = oDT.NewRow
oRow("slprsnid") = "All"
oDT.Rows.Add(oRow) 
Me.ddlArchAssignedTo.DataSource = oDT
Me.ddlArchAssignedTo.Value = "All" 

This code will bind to a ListItemCollection

        Dim list As GridEXValueListItemCollection
        list = New GridEXValueListItemCollection
        list.Add(New GridEXValueListItem("buyerid", "buyerid"))
        list.Add(New GridEXValueListItem("dscriptn", "dscriptn"))
        Me.ddlBuyerID.DataSource = list

If there is no data source, we’ll create a table manually and bind to that.

Dim oDT As New DataTable
'create column 1
Dim decimals As DataColumn = New DataColumn("decimals", System.Type.GetType("System.Int16"))
oDT.Columns.Add(decimals)
'create the rows
Dim oRow As DataRow
oRow = oDT.NewRow
oRow("decimals") = "1"
oDT.Rows.Add(oRow)
oRow = oDT.NewRow
oRow("decimals") = "2"
oDT.Rows.Add(oRow)
Me.ddlTimeEntryDecimals.DataSource = oDT
Me.ddlTimeEntryDecimals.ValueMember = "decimals"
Me.ddlTimeEntryDecimals.DisplayMember = "decimals"

Tags:
Categories:
As always, I welcome your comments!
  
 
 
Home | Products | Blogs | Contact Us | Links | God's Plan
Privacy Statement | Terms Of Use
 
Copyright 2011 by Devshed.us