Please forgive, I'm new to Silverlight and am still trying to wrap my head around data binding...
I have a generic list obtained from a class using LINQ. The list has 4 objects, each object consisting of a Letter property (string - A, B, C and D) and a corresponding Number property (integer - 1, 2, 3, and 4).
In Silverlight, I have a combobox control and a text block. I'm trying to figure out how to:
Bind the combobox to the generic list so that the letters populate the combobox.When the user selects a letter in the combobox (say C), the corresponding integer value (3 for this example) is displayed in the text block.
I am working on a new winforms application that is receiving data from a WCF service. The programmer has implemented the services like this:Note that this sample is C# but I will be working in VB.NET
What I would like to do is bind a combobox to my own object which is as follows:
Public Class Categories Public Sub New(ByVal myConn As SqlConnection) Dim myConnection As SqlConnection = myConn myConnection.Open()
[code]....
(I have put breakpoints and I know this object has data.)So on my form how do I bind my combobox to this object? The code I have is below:
Dim bs As New BindingSource bs.DataSource = New Inventory.Categories(myconn) cboCategory.DataSource = bs cboCategory.DisplayMember = "Description" cboCategory.ValueMember = "CategoryID"
but it returns the following error: Cannot bind to the new display member. Parameter name: newDisplayMember
a table of addresses and a bindingsource for the table a enum list of address type: 0 = "Mailing", 1 = "Physical", 2 = "Shipping" etc...
I would like to bind the datasource of the combobox to the enum so it displays "Mailing", "Physical" etc. Then I would like to change the bindingsource position of the address table based on the user selection of the combobox.
Here is what I have so far:
cbxAddressName.DataSource = New BindingSource(ApplicationEnums.GetEnumList(GetType(ApplicationEnums.CompanyAddressType)), Nothing)
I have bound data from Excel to my project, but now I am trying to pull a specific column from the table and put the information in a combobox. I am trying to pull dates from column O of my excel file, and I want the dates to go into the combobox with no repeats.[code]...
I have a context menu strip (named cmnuRtxtIT) that pops up by right clicking on top of a rich text box in a VB 2008 WinForms application. Context menu strip cmnuRtxtIT has one item named ToolStripMenuInsertFld. This last one has one dropdown item named oolStripComboBoxFlds which is a ToolStripComboBox type. I do the following in the form's Load event to bind ToolStripComboBoxFldsto an Sql database:
Dim dt As New DataTable Dim dta As New SqlDataAdapter("SELECT pkID, txtFlds FROM ApplicationFields", goConn) dta.Fill(dt)
I want to bind data to telerik list view, if the database four record,each page of list view show 3 record, that means it will have an record show on 2nd page then still got 2 record was empty, so i want to show the first, two record under the fourth record,
I'm looking for a method for reading data from a txt file. The text file have this kind of structure (fixed length fields): 0000 AAAAAA BBBBBB CCCCCCCC 0000 JJJJJJ III RRRRRR 1111 XXXX YYYYYYYY ZZZZZZZZ 1111 WW PPPPPPPP ZZZZZZZZ 1111 XXXX YYYYYYYY ZZZZZZZZ 2222 XXXX YYYYYYYY ZZZZZZZZ ...
I have to get them in groups by first field, in some kind of list of dictionary lists or something like this. For this particular example the solution would be: id(list): 0000,1111,2222..... (content)List: 0000 field1(list): AAAAAA,JJJJJJ field2(list): BBBBBB,III field3(list): CCCCCCCC,RRRRRR (content)List: 1111 field1(list): XXXX,WW,XXXX field2(list): YYYYYYYY,PPPPPPPP,YYYYYYYY field3(list): ZZZZZZZZ,ZZZZZZZZ,ZZZZZZZZ (content)List: 2222 field1(list): XXXX... field2(list): YYYYYYYY... field3(list): ZZZZZZZZ...
Right now I have the the whole text stored in a list of strings (one per line).
I want to be able for a user to click on a button and then it runs a function and then shows the results in the data list.i know i can get data and bind it through my tables
So in this gridview, there is a column for status and I want to have a drop down list with Pass, Pending, Fail appear when the edit button is clicked. These values are already in a table, so I need to somehow bind from this table to each ddl for every row.Here is the column from the gridview. As you can see, I would like to just have a label showing when not in edit mode, and a ddl when the edit button is pressed
<asp:TemplateField HeaderText="During Production Status" SortExpression="DuringProductionStatus"> <EditItemTemplate>
I am trying to create a list of a generic type in vb.net 2.0 framework. This is the generic type definition:
Public Class GenericParamMap(Of T) Public Sub New(ByVal pParamName As String, ByVal pPropValue As T) mParamName = pParamName
[Code]....
The compiler does not allow a "T" in the method's parameter because it's not defined, but I'm not sure how or where to define it. I thought it was okay to have a generic method definition.
I have a table in my database with 5 columns (ID1 to ID5) and just one row. I'm trying to bind a comboBox, to show ID1 through ID5 in the combobox when my form loads. I have a dataset and tableAdapter's made for this already. I just want to know how to bind a combobox to those ID values.
I'm looping all the properties in an object via reflection:
For Each p As PropertyInfo In values.[GetType]().GetProperties() If p.CanRead Then 'Do stuff End If Next
how to determine whether the property in question is a generic List(Of T)? If it is I need to loop the list itself.
I've experimented with GetType and TypeOf but have not managed to get anything working.
To clarify, I want to keep this generic. I do not want to specify the type of T, I need to loop the list items and call the ToString method on each item. T could be one of a number of different types (application specific reference types). Is it possible to do this without specifying types?
Public Class notifierMain Public Class Contacts Inherits List(Of row) Public Sub New()
[code]....
When I debug this winforms application I get curType = "notifier.notifierMain+Contacts+row" I want to the Validate function to know it is in MyContacts. How do I do this?
i have issue returning a list in a web method. here is the code
<WebMethod()> _ Public Function getTags(para_parents As String) As List(Of getTypeDetailsByParentName_Result)() Dim context As New PPEntities
[code]....
the error is
Value of type 'System.Collections.Generic.List(Of SaftyonRoad.getTypeDetailsByParentName_Result)' cannot be converted to '1-dimensional array of System.Collections.Generic.List(Of SaftyonRoad.getTypeDetailsByParentName_Result)'
it seems always at this time I cant figure out how to do something maybe it has something to do with lunchtime.
Im having trouble using a method that is defined by an outside company
This is a link to their integration guide:
[URL]
This is their documentation for the class Im trying to use
OrderQueryWebService Class
This class is for SID in particular and is made for use with the notification methods. This is for the Order Query Web Service specifically, allowing clients to return the status of transactions for their merchant, whenever they want to.
Methods / <summary> / Pass through the variables required and receive a list of Transaction objects showing transaction status
[Code].....
The MerchantCode, the MerchantUsername, the MerchantPassword are all good the List is a custom type called SetComHash.Transaction
Everytime I try adding a string to the list such as the transactionNumber and some other values it gives me a type error:
"Value of type string cannot be converted to 'SetcomHash.Transaction'
i have a requirement of using a dropdown list/combobox in data grid for allowing user to select from the list. how can i do that.I want to have a particular column with this option available that should be filled with data from the SQL database.
[Code]...
now in this what i want is that user could select the emp id for which he wants to enter the data.then on the basis of the selection emp name field should be filled automatically and then user enter the salary which get saved after pressing a button on form how could i achieve that in VB.net and using SQL databse
VB 2008 .NET 3.5. I have a custom "Shipment" object that contains a list of "ShippingRate" objects. This list of "ShippingRates" is accessible through a property "Shipment.PossibleShippingRates." That property simply returns a copy of the list of "ShippingRate" for that particular Shipment.
My UI layer receives a list of "Shipment" objects from the BLL. This list is databound to a datagridview, and shows details relevant to the Shipment such as Shipping Address, etc.
I want to bind the "Shipment.PossibleShippingRates" property to a combobox, such that when the user changes the grid row, the combobox reflects the "PossibleShippingRates" for that "Shipment."
In addition, I need a way to store the "ShippingRate" they selected from the combobox for later use.
I have tried a few ideas, but none of them work properly.
I am working on Combobox in VB.NET08 The Combobox have list of Data.The Combobox Style is DropDown.Assume that i set a list of Countries in the Combobox.I need when i type on the Combobox that corseponding data should be heighlite in the list.Means if i type with "A" letter on the Combobox , shows all countries which statrs with "A". and again if i continue with writing 'A' and write 'U' then corresponding country names should be show in the list like 'Australia', 'Astria'.Here list in the sense not any other control , list means in the dropdown list.
What would be the fastest way to sort a list that contains a list of objects, based upon another list? An example follows:Say I have multiple lists of employees. Each individual list has a common property value, say "Department". So I have a list of employees, in one list they all have the department string value of "Sales". In another list all the objects have a department value of "Finance". These lists of employees are then contained in a list which holds them all.
I have a second list, which should drives the sort order of the employee lists. The second list simply contains a list of strings like, "Finance", "Sales", "IT" and so on. I'd like my lists of customers to be sorted in the order of "Finance", "Sales", etc.I'm using VB.NET in .NET 2.0
I have a combobox on a form. It works but I want to filter it with a constant value. I don't want to change the query in the dataset because that would affect other programs. So I click on the little arrow on the combobox in the form design view and then click on Add Query and make my new query which I preview and it's okay. The problem is I can't find any way to make the combobox reference the new query. In the properties for the combobox the Data Source is just the binding source. How do I specify a specific query?
how do i change the display member of a ComboBox after i have entered a code in a textbox that it represent the combobox value?example
Code: 02-001 Combobox: Provider X
if i change the code the provider combobox must change and if i change the provider combobox the code should change!..
if e.keychar = chr(13) Then combobox.valuemember = textbox.text combobox.displaymember = me.stockdataset.selectprovider(@textbox.text) end if
this code change the combo box display member but if I change the comobox by clicking it the code on the textbox doesnt change, to its corresponding code...the combo box is bound to the provider tables....
I have a listbox that is bound to an observable collection of Audio (custom class).The Audio class has two properties, DisplayText (string) and a property called TarpIds (Observable Collection of Integer).I need to allow the user to change the TarpID in the combo box for each list item displayed and catch the selection change.I created a DataTemplate that styles the DisplayText property from the Audio object and adds a ComboBox to display the available TarpIDs for this audio (These are dynamic and unique to each Audio).The DisplayText works great, but I can not get the TarpIDs to display in the ComboBox.FYI I set the ItemSource at run time that binds the ListUploadAudio to the Observable Collection of Audio.[code]
I have cascading data-bound combo boxes, however, if the second of the two boxes does not have the value, I am trying to change the data source of the original process to the default selection.
However I am getting errors no matter what I try to do to get the combo box to clear.
Currently: "Items collection cannot be modified when the DataSource property is set." at the Items.Clear If I try to remove the clear, I get "Cannot bind to the new value member. Parameter name: value" at the valuemember set
I hae a program that opens and reads a textfile database and have several comboboxes with a string of items and the selectedindex is returedn from database
Me.subj_pool_txt.DataBindings.Add("SelectedIndex", Me.BindingSource7, Form10.pool_txt.Text) Upon opening a new file I run this code to clear exisitng databindings and reset text
For Each ctrl As Control In Me.GroupBox1.Controls If TypeOf ctrl Is TextBox Then CType(ctrl, TextBox).DataBindings.Clear()[code]....
My problem is my combobox do not re-bind to new file.They bind fine upon initial instance however
How Do I show the values from the dataset to the text box based on the selection from the combobox list i already populated the combobox my code is. [code]