|
Martin# wrote: Yes, a "make my homework, so I don't have to think!" message board is missing!
Not asking anyone to "make my homework", i simply couldn't get it working... Tried understanding it, tried to get it work and i couldn't, thats why i asked.
Light is faster than sound... Thats why some people look smart till they start to talk.
|
|
|
|
|
Don't take it too personal
Tenkyu wrote:
Light is faster than sound... Thats why some people look smart till they start to talk.
Like that one!
|
|
|
|
|
Tenkyu wrote: Tried understanding it, tried to get it work and i couldn't, thats why i asked.
So what exactly don't you understand? The code snippet you were given is quite simple. It iterates over all list items by index, compares each item to the value of the textbox and then makes a call to the SetSelected method passing the the item index and a boolean indicating whether the item should be selected or not.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
For the first i might add that i'm new to programming, it is one of my first projects i'm playin around with, so didn't know what "iterate" the list meant, and i didn't know how to use "SetSelected" method etc, i'm mostly trying my way there but error messages aint very funny.
Anyways thanks for the help, got it all working now i think.
Light is faster than sound... Thats why some people look smart till they start to talk.
|
|
|
|
|
Will this[^] do?
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
Hey
I have an application that has two comboboxes - the first one (type) is bound to a dataset table and shows all the possible types.
I would like the second one to be bound on the type condition for example:
If there where values it could take such saloon, hatchback, coupe etc.
If the user where to say select VW Golf in the type combobox the combobox below would allow them to select saloon or hatchback. Or if the user were to select BMW 3 Series they would be allowed to select saloon or coupe etc.
I have started down the route of using type as a key in two tables and creating a relation between them but come unstuck when I want to add this to a combobox as my solution is more for datagrids.
If any one could point me in the right direction I would be grateful - is it better to do this without binding the second one and just using SQL to select the type based on the type selection?
Cheers
Dan
|
|
|
|
|
Create a DataView that filters the values you want for the second list when the value of the first list changes.
|
|
|
|
|
you can filter seccond combobox's binding source in order to first combo box's selected value.
or you can read this article:
Parent-Child comboboxes[^]
|
|
|
|
|
Good morning,
I've tried searching in Code Projet and even on the web, but couldn't find anything explaining how to design a custom component for me to use in my forms.
I mean, I saw some articles that use some components (like 3D PieChart) but couldn't understand how it was made.
Can anyone help me?
Thanks,
Gustavo
|
|
|
|
|
|
ok, I'll take a look at that
Thanks
|
|
|
|
|
Hello friends!
I'm having a problem with a datagrid bound to a dataset in ASP.Net with C#
In the database I have entered some text like with an carriage return. But the datagrid trims away the carriage returns...
I would like the datagrid to show these three records like this:
Column1......... Column2............ Column3
-------------------------------------------------
...1..................Test1.1........... This is test one
-------------------------------------------------
...2............... Test2.1............. This is test two
....................Test2.2....................... ................
....................Test2.3....................... ................
-------------------------------------------------
...3 ............. Test 3.1.......................................
-------------------------------------------------
Does anywon know the solution for this?
I have tried to put into the database *n* as a seperator, and in the Datagrid1.ItemDataBound I'v replacing the *n* with \n or \r\n, but whats happens is that for item 2 its like this: Test2.1Test2.2Test2.3 but I want this to be on seperate lines but in the same row of course.
(I'v tried to turn on the .Wrap = true for items also... )
Please let me know if anyone have a solution for this.
Thanks
|
|
|
|
|
I want to access .hlp files that is created in Help Workshop with the help of Help provider in C#.Net.
How can i access? or is there any other solution
-- modified at 7:02 Wednesday 31st January, 2007
|
|
|
|
|
See Section "Into the program", here[^].
SkyWalker
|
|
|
|
|
Without iterating an array is there any in-built method
which can be used to unsplit an array ?
I have a command line application in C# and i want to save
this args received in string[] args of main to a text file.
here i am iterating an array and producing a string out of it and saving to a file.
Is ther any simple way or method to do it ?
|
|
|
|
|
If you want to build a string out of different objects, use StringBuilder (and its Append method).
SkyWalker
|
|
|
|
|
string[] ravsArray= {"First","Second","Third"};
string FinalString= String.Join(" ",ravsArray);
|
|
|
|
|
If it is specifically the command line arguments that you need you can use the Environment.CommandLine which gets the full command line for the current process
|
|
|
|
|
You can use String.Join(String, String[])
Concatenates a specified separator String between each element of a specified String array, yielding a single concatenated string.
|
|
|
|
|
i want a label to show the current system time? is there a method/property i can use to get the system time??
rzvme
|
|
|
|
|
|
lblTime.Text=DateTime.Now.ToString();
if u want this clock to tiking up... then u need to put some javascript...
|
|
|
|
|
you can use System.DateTime.Now
|
|
|
|
|
Call this
lblTime.Text=DateTime.Now.ToString();<br /> in a loop.
V.
I found a living worth working for, but haven't found work worth living for.
|
|
|
|
|
Use 100% of CPU to change a string every second or so ?
I would rather recommend a System.Windows.Forms.Timer to periodically update the label...
Luc Pattyn
|
|
|
|