|
Hello
I have a combo box with a list of clients. I need to do search on the the PK to get the details of the client. This worked fine, however the customer wants the combo box to be in sorted order. So i set the property for the combo box to sorted. Now that I have done that the client names are in order but do not corrspond to the value member. In the database the clientID is indentity incremented integer.
<br />
Me.cboClients.DataSource = ds1.Tables(0).DefaultView<br />
<br />
Me.cboClients.DisplayMember = "Name"<br />
Me.cboClients.ValueMember = "ClientID"<br />
in the selectionchangedcommitted event i have this
<br />
client = Me.cboClients.SelectedValue()<br />
'calls procedures to search for client's details<br />
Is there an easy way to get a PK value form a client that is selected from the combo box. I can't search for the client name, as some clients have the same name. Not unique.
Many thanks in advance,
Steve
|
|
|
|
|
I don't remember ever having this problem, but the worksaround is easy enough.
If the customer wants the combobox sorted, just have the SQL sort the data when it's retrieved from the database. Then you can bind your ComboBox to a pre-sorted list and not worry about the ComboBox doing it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks for your help.
This is the solution
SELECT * FROM Clients
ORDER BY Name ASC
|
|
|
|
|
Dear All,
I am new to this COM usage in VB6. I created a COM object and it was given me a dll file and also installed to the computer so I can get the dll in References in VB6.
I typed the example code given in the MatLab and also a sample code Building COM Components Using MATLAB - Part I by A Riazi, But It giving me an error message called "Automation Error. The specified module could not be found".
Please help me to go throught this.
Thaks All
Prageeth
Dhanushka P
Prageeth
|
|
|
|
|
What kind of dll is it? Win32? .Net?
Have u reged the file?
Try following: Close your developmentsuite und reg the dll. then u check it at u're references and try it again.
|
|
|
|
|
I try to change a treenode text value! How I can do as well as window: Press rightmouse button, select "Rename" and OK!
Tell me! I'm a beginner in VB.NET!
Thanks!
THT
|
|
|
|
|
select a node.. store this in a variable.. and renames it with mynode.Text = "test"
|
|
|
|
|
Simple question;
Where is the selection rectangle? How do i select multiple controls while designing a web page using VB.NET 2005?
Do i have to hold control and click every single control on my form?
|
|
|
|
|
That's what I usually do.
|
|
|
|
|
Hi,
How can i draw a string on a picturebox and let the user define the location of the text? Cuz im trying to make a program to create covers for cd's but if the user can't define the location of the text the program is pretty useless Any ideas, anyone?
--Zaegra--
|
|
|
|
|
You need to ditch the picturebox, it's just for newbies to show pictures with. Draw your bitmap in the paint event of your form. Then, you can draw a string on top of it, where-ever you like.
|
|
|
|
|
I have a small application that I've wrote to track company assets and I have a few employees that have troubles seeing the screen. We've increased the DPI setting: to 120dpi from 96dpi. My anchors and docking attributes are set and I'm still having a deformed application. Has anyone run into this problem or have any suggestions on a resolution.
Thanks.
|
|
|
|
|
How do you mean "deformed"? Do you have a screenshot?
|
|
|
|
|
I have a few users that need extra large fonts and they goto 120 DPI to see the screen and I'm getting this on there PC's prtscn[^]
|
|
|
|
|
I have created a program in Excel that makes a set of tournament brackets for head to head competition. I've created and recorded the necissary Macros to get the functionality that I wish to implement. However when I try to create the Form for the user to select the options for the brackets, I continue to receive errors related to the frames on the form, but it doesn't allow me to remove them. What I would like to do is transfer this project to VB.Net and only use Excel as the bracket visual/print out. In my dealings with VB6, I remember being able to draw lines and shapes on the Forms as well as being able to print the Forms. However, I've been unable to find this utility in VB.Net. If I can find this function, I would consider ditching Excel all together. I am using VS'03 for my .Net development. Any suggestions?
|
|
|
|
|
I read the article "Sorting and paging with a custom DataGrid class" By Sangra. [http://www.codeproject.com/useritems/EditNestedDataGrid.asp]
and I need to create 3 nested datagrid and I have a problem to catch the mouse click on the second grid.
any help will be grate
10x.
|
|
|
|
|
hi friends,
is it possible to change the query at runtime from visual basic to show the crystal report?
I know only to replace the parameter.But how can I call the report with new sql statement ?
I tried with control.sqlquery but not working.
|
|
|
|
|
hi,
1. yes its possible to change the query at runtime.
2. cryrpt.SqlQuery
3. try checking the fields in the report and fields you give in the sqlquery, both should match.
hope this works
Nitin...
|
|
|
|
|
what do you mean by its possible??
you have a dataset fill it bu the query you want, btw the you can the crystal report all of it by run time you can let the user select the grouping field and the fields to appear and the sorting on any field the user want,
you have to search more for your question it seems to me that this this the first time you use the crystal report,
search on the net to find how we can use the crystal reports
Regards
|
|
|
|
|
U cant ask Dummy question like this , search and find the Answer
<big><small>WE ETHIER FIND A WAY OR DIE TRIEN</small></big>
Mohamad A. Flefel
mflefel@hotmail.com
+962 79 5963865
C#.net & VB.net Developer
|
|
|
|
|
How do I automatically resize the Form when the screen resolution changes between design-time and runtime
Regards
Suman
|
|
|
|
|
By setting the anchor or dock properties on your controls.
|
|
|
|
|
I am using vs2003 for a vb.net windows app.
I need to create a web browser app that saves password that login to a web site. Theses user accounts are in a database that I can change. The web browser app shares theses login accounts for more users. The web browser app manages current users and kick them off when more users join the wait queue. Micro share accounts.
The problem I am running into is that javascript popups, like calling a javascript function that uses window.open, jump out of my app and opens in the default web browser.. and needs to be kept in my browser app. When it opens in default web browser the login authorization falsea and then requires them to login. I currently hide the login screen from the user and can't let them see it.
What work arounds can I do?
|
|
|
|
|
Hi all, I am quite new to VB.NET.
I need a subroutine that will download a file from the internet and place it in a folder location.
Can anyone advise me on how to do this?
many thanks
|
|
|
|
|
Use the following method
my.Computer.Network.DownloadFile
|
|
|
|