One of my clients wants a set up multiple dropdown lists as a set of outbound links (yes, I cringed too, but he does have his reasons. there are 3 dropdowns, each one pertaining to its own group of links. When each dropdown has its SelectedIndexChanged, it then redirects based on the choice made. However, lets say I make a choice in the second dropdown. It goes to the proper link. If I then choose a link in the first dropdown, it goes to the proper link. Then if I select a link in the third dropdown, it will go to the link specified in the choice I made in the FIRST dropdown.
How can I code it so that it will always select the most recent selection?
I have multiple combox boxes, A B C Combobox B has items Fruit, Veg, Dairy Combobox C needs to contain 3 list and depending on what value is selected in Combo Box B.
For example, If I select Veg in Combo Box B, I would like to have a drop down list containing "tomatoes, lettuce, onion,..........." If I select Dairy in Combo Box B, I would like to have a drop down list containing "Milk, Cheese...................."
I have a label with a tooltip attribute for rollover effect. This works all great. However, it seems to get hidden behind any dropdown lists that are nearby. I have tried adjusting the z-index, without any luck. This issue does not appear in firefox, and I have not tested it in later versions of IE.
I realize this is probably due to IE6s poor css standards-compatibility, but how can I get around this?
what is the best way to load dropdown lists from reference/lookup tables for a desktop application? the application is layed out into 3 tiers. I've built up my entities.the front end has a form with 6 tabs. and one big save (another discussion :)Should I load them all when the form is initially loaded? Are there any caching mechanisms I could use?
it is vb.net app on a network drive that is accessed by several users.it's also worth noting that some reference tables may be updated. Via another form.
How do I make the default modelbinding handle Lists?
Let's say I have a ShoppingCart class, which has a ShoppingCartItem List:
Public Class ShoppingCart Public Property CouponCode As String Public Property Items As New List(Of ShoppingCartItem) End Class
[Code]....
However, when I submit the page, no values are picked up, not even the CouponCode field. The model object is empty. What gives?
Ultimately, my goal is to add/remove items clientside via javascript and then have the modelbinder pick up the changes automatically when the page is submitted.
Update: I was just missing the Property keyword from my model properties declarations. It's too late, and I got to get some sleep. :)
I want to create a website where it is possible to add dynamically "X" dropdown-lists (or other elements)These dropdown-lists should be shown on the website and furthermore there should be an other element be shown, that depends on the dropdown-list (for example: if the user chooses option "A" there is a checkbox, if the user chooses "B" there is a input field)
For my first post I've got a tricky question. I'm past walking through tutorials but not far enough to join the Open Source Community.this Question I'm trying to create a program that tracks combinations used in Alchemy Games (Generally on a mobile phone etc)I've got the following classes
Class Game contains properties for Elements and Combinations Class Elements Inherits List(Of Element) Class Combinations Inherits List(Of Combination) Class Element Class Combination
Combination contains Element 1 and Element 2 and List(Of Element) for the results My Question: Using Game.Elements how can I add a readonly property for combinations of that element.
I have a small HR app.First step for user is to select the employee.I wanted a single combobox (autocomplete , drop-down), where the user can start typing either firstname lastname or nickname (these are 3 different fields in an SQL DB).At first, I would have the user check a checkbox near the combobox to select what they would be searching by (first, last, nick name), but then I thought - someone could probably help me with an example of not having to select which name type they are searching for, but just start typing and the combobox would autocomplete based on whichever name ?
Say I have three lists containing multiple objects. Lets also assume they each contain the same number of items. [code]...
Now say I have a dataGridView that I have defined as having three columns. Is there a way to assign the contents of each of the lists to each of the three columns (e.g. column 1 = myList1, column 2 = myList2, etc.) without iterating through each of the lists? I know I could define a dataTable, create the columns, and iterate through each of the lists...then associate the dataTable to the dataGridView's dataSource. However, I don't want to iterate through the lists since in my real application, these lists are large and the iteration would take too long. I'm just wondering how to assign these lists to a column in a dataTable in bulk.
I am working on a project for software engineering where we are trying to create a warehouse inventory system. I have created an inventory page where I can add/delete/search for an item as well as access invoices and reorder items... i am struggling on the delete item part. I have my design set up where there are four different lists on my page. One for name, one for serial number, one for RFID number and one for amount in stock. I want to be able to select an item by name and its information in serial number, rfid, and amount also select and have no idea how to go about this..I wanted to use four different lists because I need to be able to delete an item from the list and it remove just one from that stock and not the entire item unless there is only one of that item left in stock.
for my inventory page
Public Class InventoryDepartment Private Sub InventoryDepartment_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
I want to combine multiple lists of items into a single list, retaining the overall order requirements. i.e.:
1: A C E 2: D E 3: B A D
result: B A C D E
above, starting with list 1, we have ACE, we then know that D must come before E, and from list 3, we know that B must come before A, and D must come after B and A.If there are conflicting orderings, the first ordering should be used. i.e.
1: A C E 2: B D E 3: F D B
result: A C F B D E 3 conflicts with 2 (B D vs D B), therefore requirements for 2 will be used.
If ordering requirements mean an item must come before or after another, it doesn't matter if it comes immediately before or after, or at the start or end of the list, as long as overall ordering is maintained.
This is being developed using VB.Net, so a LINQy solution (or any .Net solution) would be nice - otherwise pointers for an approach would be good.
Edit: Edited to make example 2 make sense (a last minute change had made it invalid)
I have a problem with my combo box. Currently when i select the drop down option I get only one row that is picked from the database. However I would like two Columns to be seen. The Table is [User] with fields - ID, Position, Details.
It currently shows 'Position' However I would like it to drop down with: ______________ ID | Position |
I have a handle event that takes care of about 50 buttons. Is there a way to determine which button is being clicked when the event is handled? I have tried using the FromHandle, but I can't seem to get it to work.
I have multiple textboxes which I want them to perform the same thing upon clicking them. By default I can use the handles textbox1.click for 1 single textbox but I am not sure how to do handle multiples of them. Of course I can write a handler for every single textbox but I have about 50.
Sub TextBox1_click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.Click If Button9.Text = "Make Changes" Then If TextBox2.Text <> "" Then Frm_Cine1.Show() [Code] .....
I am making a program which will read data from csv and pick up Username & Computer name from the csv.
Then it will run commands via telnet with those username and computer on line at a time. I have reached this goal without any problem. I wanted to paste the code here but its too much.
Basically what i now want to do is have a option for user to skip a command.
Like if csv have 3 users in it. i.e.
j.doe, comp1 t.test, comp2 u.user, comp3
Popup will come and say do you want to run the command "add user j.doe, comp1" something and you will have option to say Yes, No , Cancel.
Where yes will run the command and no will skip that user (go to next one) and cancel will end the whole process.
I know Msgbox yes,no is there but i dont know how to skip that user.
Following is the code which migh
vb Dim objCmdSelect As New OleDbCommand("SELECT * FROM " & fileNam & "", objConn) For i = 0 To objDataset1.Tables(0).Rows.Count - 1
I have two lists. One list is a list of names, the other list is a list of how many times each name is found in the first list noted in the database
so... Nick John Jim Jack
is the firs tlist
10 13 13 2
is the second list. Nick had 10, john 13 and so on.I want to sort the second list from large to small, but have the index for the first list still linked to the correct amount of calls.i do it this way so I can
for x = 0 to num_of_names string = lst_name(x) & "-" & lst_count(x) next x
I have an application which I've designed to relay information on a large screen, like news feeds etc. It scrolls labels inside panels so the text moves in a readable fashion. It actually works quite well but it seems to struggle sometimes by consuming too many CPU cycles. I've turned on double-buffering on the form as I remember this graphics method from years ago. This improves the display drawing in general but I am still getting flickering and sometimes the scrolling slows down considerably.
I am new to VB and I have a database that has three related tables. These tables show information about computer engineers. table one is engineers details table two is engineers allocated table three is jobs
My form needs to have buttons where a user can obtain information View details of all Engineers View Names of all the Engineers working on a specified job. Add a new engineer
I have set up the connection to the data base using the wizards and also made the dataset. How to handle retrieving the data from multiple tables. Here is a screen shot of my data set
I am using KeyPressEventArgs to restrict several text boxes to numeric entries only. Rather than repeat the code, I thought I would make a "RestrictToNumeric" subroutine and call it from each "KeyPress" event. Like So:
Private Sub txt1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt1.KeyPress RestrictToNumeric() End Sub
[code].....
The problem I am encountering is that the variable 'e' is used before it has been assigned a value, causing a null reference at runtime.
So I tried to add Dim e As System.Windows.Forms.KeyPressEventArgs As?to the RestrictToNumeric sub.I cannot figure out what I need to "Dim" it as...
I am making a checkbook balancer and so far so good. But, I need it to be able to handle multiple deposits or debits. The line for it is below:I need it to first do what is in the first grouping box (deposit or withdraw), and then handle the second, and then the third. Here is the coding for the Apply button:
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
I've got my serial/com port code working ok using the standard Port.DataReceived handler:
AddHandler Port.DataReceived, AddressOf port_DataReceived I now want to be able to handle multiple COM ports. Do I have to create multiple copies of the handler sub or is there a way the handler sub can tell which COM port it was called for?
I have a gridview which can be filtered from one or more values in a querystring. That all works great: e.g. "?subject=Maths&authorName=Bond_James&type=Magazine" The values passed to the query string come from 3 drop down lists: Subject, Author, Type.What I'd like is when the user presses "Filter" it will take the selected values from the drop down lists and pass them to the querystring - it could be 1 value, 2, or all 3 (like above).
The drop down lists have an item called "All Subjects" / "All Author" / "All Type" each with a value of -1. The idea being that if the user leaves these items selected then the Filter button just ignores them.
Here is my code so far:
Protected Sub buttonFilterGo_Click(ByVal sender As Object, ByVal e As EventArgs) Handles buttonFilterGo.Click Dim queryString As String Dim selectedAuthorString As String = "author=" & dropAuthorList.SelectedItem.Value
[code]....
Also, one more thing. How do I get the drop down lists to have the filters selected when the page re loads?
EDIT: I changed the default values of the drop down lists to "" - this leaves the URL looking messy though ?author=&subject=&type= This works, is it the best way?
I am created a Vb.net ERP Application! In this application I handle core accounting concepts. I have handled Salebill and many of accounting form. I take salebill billno from Database by selecting maximum srno from salebill Table but whenever multiple user trying to access this form at a time, everyone gets same billno. How I handle this situation to show different bill no to different users?
I am facing a problem in VB .net Client/Server application where I am successfully able to talk between them using TCPListener and TCPClient class usage. However, when I try to connect another Client to the same server on the same welcome port, it errors out throwing an exception or behaves very unexpectedly.Isn't it true that the Server connection is on a WELCOME PORT for all the clients, and that each client connected gets a new port to carry on its communication with the server AUTOMATICALLY (according to the Tomcat webserver working)
Is there another way to handle the leave event of multiple textboxes other then coding in each event handler? I may not be using correct terms instead of doing this: (Existing) Private Sub leveladjstvaltxt_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles leveladjstvaltxt.Leave If Me.leveladjstvaltxt.Text <> "" Then Dim levels As Integer = CInt(Me.leveladjstvaltxt.Text) Me.leveladjstvaltxt.Text = Format(levels, "#,###")
I have 30 TextBoxes all need same formatting , so I was trying to come up with something like this: (trying) For Each ctrl As Control In Me.Controls If TypeOf ctrl Is TextBox And ctrl.Text <> "" Then Dim val As Double = CDbl(ctrl.Text) CType(ctrl, TextBox).Text = Format(val, "#,###") End If
I am stuck though and don't know where I would place that code if this is something that is even possible. Only thing I can currently think of is in the leave event which defeats the purpose, I wanted to avoid having to place the code in 30 different textoxes leave event.
I have a vb.net application in which there is a main form. There are around 10 classes each having their own functionalities like tcpactions, fileactions, serialport actions etc. The user interacts with the main form and does certain actions which will invoke the methods in these classes. Now I have a notifications textarea in the mainform and i want to show the current action being performed in those classes and their results in the notifications area.
for example when a user clicks a "Start Process" Button in the form i invoke the method "launchprocess" in a class "ProcessActions". Now this method tries to launch about 7 different process and after launching it sends notification such as "process 1 launched" or if it fails it sends notifications such as "process 1 launch failed".
I currently use event handlers and use them to show notifications but with the amount of events i have to handle it is getting cumbersome and i might have to add even more classes in the future. So is there a better way of handling notifications from other classes.
I want to use One routine to handle multiple events & i want to give the list class object to the routine handle clause in vb.net. Is it possible? I have 100 buttons on my web page & i want to handle click event of each button. I have same coding on each button but the only difference is that, which button is calling the event handling routine. So i want to make one sub routine for handling event of all my buttons.
I can solve this by writing each button name in the handles clause like - Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ImgRCP_26.Click, ImgRCP_27.Click,. But it is so lengthy procedure. So that why i want to handle my button in the arraylist. How to do this?