|
Hi Allen,
Thanks for your response .I am not looking for GUID .
The Key-value pair will be
For Eg ,
Lookup 49
0 "Unclassified"
1 "Background"
2 "Desktop"
1 "LZHL"
In which Key can be duplicate. I need DataStructure/Collection which can increase dynamically and can hold this values.
Thanks,
Ashish
|
|
|
|
|
Dictionary<object,List<object>>
|
|
|
|
|
It seems you need to have unique key in Dictionary also,
Dictionary<string,> keyValue = new Dictionary<string,>();
keyValue.Add("1","\"Background\"");
keyValue.Add("2", "\"AlignerFail\"");
keyValue.Add("3", "\"LZHL\"");
keyValue.Add("3", "\"Align\"");
Unhandled Exception as already a key present.
I need collection which should not contain uniqueness of key.
It should accept if keys are duplicate.
Can any way we can surpass the key field uniqueness in Hashtable/Dictionary collection??
Thanks,
Ashish
|
|
|
|
|
hi all
Iam Use ComboBox in Windows Application And I wount to use The ValueMember propertes And DisplayMember propertes . Iam Use it but the Value of this Oroper It is the end value of item Added to it .
Now wount to know how i can if the combo have 4 items and iam Select the item number 2 how i can Return the ValueMember from The ComboBox ??
thanks for any boudy Hellp me
Thaer
|
|
|
|
|
I don't really get the question. The DisplayMember sets what is used to display the object. When the selection changes, you can use the SelectedValue property to get the selected value.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
if you want to get the value then
string s;
s = comboBox.SelectedValue;
and if you want to get the selected item text then
string s;
s = comboBox1.SelectedText
wasim khan
|
|
|
|
|
wasimsharp wrote: string s;s = comboBox.SelectedValue;
Won't work. SelectedValue is an object, which would need casting, if it's even a string to start with.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
yes you r write it need casting
xyz s;
s =(xyz)comboBox.SelectedValue;
i think now it will work fine;
thanx Christian Graus
wasim khan
|
|
|
|
|
Thanks Mr But i wount to how i can set the value of the tow propertes to the combobox ??
the your solution is Good but i know use it but i dont know who i can set the Value to itmes in combobox ?
thanks mr
Thaer
|
|
|
|
|
Hello Friends,
I am trying to convert decimal value to string, but its not giving correct value.
decimal z=0.0000008;
string str = z.ToString();
str is not displaying correct value as 0.0000008 but displaying like 8E-7.
Its giving this problem in only .Net version 1.1 not in 2.0.
any issues in conversion from decimal to string in .Net 1.1?
any ideas? thanks in advance
|
|
|
|
|
I suspect you need to provide a format string so it doesn't convert to scientific notation.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thank you for quick response
Can you please provide me the right link for this? it seems you have given wrong link
Thank you
|
|
|
|
|
|
hi.. does anyone know how to put a code inside one of the nodes in treeview?
here's what i wanna do if i clicked node1 a form appears then if i clicked node2 the form closes..
about mdichild how do i close mdichild to show back the mdiparent again..
when i close the mdichild the mdiparent also closes..
ginji
|
|
|
|
|
Use the events of the TreeView.
|
|
|
|
|
how do i used the treeview event for that???
sorry i was new to C# and it's my first time using treeview..
can you tell me the code please..
ginji
|
|
|
|
|
Here you are an example here[^]. I can't tell you the code it's not the way we do it here.
|
|
|
|
|
thanks Zoltan,,
by the way do you know the answer to my second question?? about the mdi child.. if i close the mdicild using the button the mdiparent also closes..
also if i open an mdi child i want the mdiparent to be disabled so that i cant open another child. how do i enabled it again without using instantion?? is that possible?? example code please..
thanks Zoltan
ginji
|
|
|
|
|
Show us some of your code. Show how do you want to accomplish what you're trying to do.
If you want example code do a search in here there are a few article on this, or on google.
|
|
|
|
|
the question is why u use MDI application for that purpose, it looks SDI application match your needs?
dhaim
program is hobby that make some money as side effect
|
|
|
|
|
what is SDI application??
how do i use SDI application?
ginji
|
|
|
|
|
hiii all,
i am having problem in accessing data from the excel file after a blank row is reached....
can anyone tell me the solution??????
thanx in advance...
vinit
vinit
|
|
|
|
|
What sort of problem ? How are you accessing it ? You're saying if there's a blank row in the middle, you can't see anything after it ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
actually i m trying to export data from excel sheets to xml files considering each row in excel sheet as a separate xml file.
i have also used JouniHeikniemi's code to convert excel files into csv files.but the problem i m facing is that if three is a blank row in excel sheet,than my application doesnt jump to next rows to generate xml files.
what should i do to resolve this problem???????
vinit
|
|
|
|
|
If you're using someone elses code, where did it come from ? If a CP article, there's a forum under that article where you can ask the author directly
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|