hi all,
i am trying to generate a report, iam using sql server 2000 and Asp.net 2.0. First to select the columns iam using the list box... as we can order by the query result from the selected columns only, i want to use another list box which contains only selected columns..
1. Iam filling the columns names required into the listbox it is selecting the columns in the select statement to generate report.
2. I have another list box in which the columns names for order by condition, which were selected in the first listbox.(if any item is selected in the first listbox, then that item should be displayed in the second listbox(order by listbox). and if the item in the first list box is unselected then that item should not be present in the second listbox(order by list box) and it should be done without the user action (contains no buttons for adding and removing items).
Can You Please make me know whether it is possible.. if yes can u please give me an idea with a sample code....
Thank you boss
2 4435 PRR 750
Recognized Expert Contributor
Could you post some code? What have you tried so far? Look into SelectedIndexCh anged .... Set AutoPostBack property of Listbox to true...
Hi Vinod,
As you have said, to move items from one listbox to another, you can utilize the same concept which is used when moving items on button clicked. You just need to execute the codes on SelectedIndexCh anged event of the source listbox. Here in Moving Items from one listbox to another in asp.net web page using C#, you can see the code.
Hope this helps. Thanks.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Matt Sawyer |
last post by:
Hi,
I'm attempting to do a drag and drop operation from one listbox to another.
I have my listboxes setup with SelectionMode = MultiExtended so that I can
use the shift key, cntrl key, etc. to make multiple selections.
The problem I am having is that when I use the shift key to select a range
of items, I first click on one item (item gets highlighted), then, holding
down the shift key, I select another item (the range of items gets...
|
by: Oddball |
last post by:
Ok - I have a ListBox control and I'm ready to write my own DrawItem event handler.
What I want to draw as the item is another control. I have created a user control that I
would like to list in this listbox but I can't for the life of me figure out how to draw the
control inside ListBox...
I get as far as:
private void lbImageList_DrawItem(object sender,
System.Windows.Forms.DrawItemEventArgs e)
|
by: Bob P. |
last post by:
Hello,
I have a page with:
* two side-by-side asp:listboxes and two arrow asp:buttons allowing
users to add/remove email addresses between them -- very much like
Outlook, where you have the address book on the left, and you build
the message recipients on the right.
* an asp:button that, when clicked, fires off some code to create and
send the mail message
|
by: Sparky Arbuckle |
last post by:
The code below works to an extent. The problem with it is that no
matter which item is selected, the first one in the list is always the
item that gets added/removed. How can I alleviate this problem? I have
tried If Not Page.IsPostBack and still nothing.
Private Sub btnCol1ToCol2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnCol1ToCol2.Click
Dim s As String = lbColumn1.SelectedItem.Text()...
|
by: segue |
last post by:
Hi;
I need to change the order of a listbox array from a form app
where I select order up or down.
What's a good way to do that?
Regards;
Segue
| |
by: Academia |
last post by:
(If you've seen this in the drawing NG, sorry. I inadvertently sent it
there.)
I have a listbox populated with Objects.
The Class has a String field that ToString returns.
I assume that is what the ListBox uses for its display. Correct?
|
by: lukasmazur |
last post by:
Hi
I have a problem with using listBox1. I have a two forms form1 and
form2. In form1 are controls listBox1, textBox1 and button witch
creating object of class Form2. In class Form2 I create a pointer to
object of class Form1. I don't known how to use method add(), where
can I find it. From Form1 I can add value like this this->listBox1-
I cant find it. I have textBox1 on Form1 and I can change text in this
control like this ...
|
by: bogdan |
last post by:
Hi,
I have two listboxes on a page and need to move items between them - using
buttons (e.g. "<<" ">>"). Can this be done on a client side in asp.net?
I'd like to avoid hitting the server on every add/remove.
Thanks,
Bogdan
|
by: erbear |
last post by:
Hi all,
I am new to VB, and I am having some troubles. I have a listbox that when you click on the item it displays a picture in a picture box and a message in a label. It works fine when an item is manually selected, but I want forward and back buttons that will do this. It works once but it doesn't highlight the new item in the listbox, so it gets stuck. I can't use a loop either.
Any help is greatly appreciated. See code below:
...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |