|
I'm not 100% sure, but I'd take a look at the DisplayMember and ValueMember properties of the ListControl that might be what you're looking for.
- Aaron
|
|
|
|
|
Yes, I am looking for the same . But how can we use this property in a Combobox?
Thanks,
Sandeep
+919891027854
|
|
|
|
|
I have a Hashtable. I want to display the key names of that Hashtable in Combobox whereas I want to use corresponding key values as ValueMember of that Combobox
Thanks,
Sandeep
+919891027854
|
|
|
|
|
I don't know if you'll be able to do it with a HashTable as the ValueMember and DisplayMember properties work in conjunction with the DataSource property, which only accepts IList (list ArrayList for example) and IListSource. What you could do is change your HashTable to an ArrayList that holds a user-defined type. If you look at ListControl.ValueMember[^] it has a good example.
- Aaron
|
|
|
|
|
Hello,
I am having trouble with creating a progress dialog box. I have to retrieve some information from a database and l want to display a dialog box with a progress bar, that increments the time it takes to get all the data.
//Click retrieve information from the database.
//Display dialog box until all data is retrieved.
//Display the data in the datagrid.
I am having trouble with the dialog box part. Is there an easy way to do this.
Many thanks in advance,
Steve
|
|
|
|
|
Take a look here[^]. Even though it deals with ADO.NET v2.0, it's quite similar to your case and it explains how to increment the progressBar control according to the records in your table.
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
send me huffman coding in c#
latif ullah
|
|
|
|
|
|
|
Carefull! He might send you a bag of money worth $.05 cents!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi
i want to insert data into sql server (in C#)
one of the attributes (Article) id define as varchar (size 8000 - the MAX)
i want to insert into Article string lets call the variable S (size lower then 8000 and higher than 1000) but its doesnt work, but if S is define in size 100 its working .
if somebody knows what is the problem i will be glad if he will explain to
me .
eyalso
|
|
|
|
|
Standard question #1:
What do you mean by "not working"?
---
b { font-weight: normal; }
|
|
|
|
|
not working = the insert query doesnt work
eyalso
|
|
|
|
|
In what way isn't it working? Doesn't it insert anything? Does it insert the wrong value? Do you get an error message?
---
b { font-weight: normal; }
|
|
|
|
|
Hi.
Assume that we have an extender control (such as tooltip).
How can we add a Custom TypeEditor for extended property (such as tooltiptext).
Reza
|
|
|
|
|
Hi,
I want to write a report designer but I don't know where I must begin .
Please help me.
Thanks
|
|
|
|
|
Hi, I just wish to know if exist some way of inicialize a vector (all positions) with the same value, without doing any for....
|
|
|
|
|
You'll need to be a bit more specific. C# doesn't actually have a class named Vector. It has ArrayList and List<t> which are essentially vectors (just don't have the name).
What value do you want them to be initialized to?
Jared Parsons
jaredp@beanseed.org
http://spaces.msn.com/members/jaredp/
|
|
|
|
|
here's what I'm sure is an easy one...
I have a project with 5 different windows forms. One is the main program form and 4 of them are displayed by clicking a button on the main form. I'm trying to get each form centered on the main form (they are all modal dialogs). I've chosen "center on parent" on the property sheet for each form, but each form is still spawning what seems to be randomly on screen. I don't think that the main form of the project is set as the parent form for each of the other forms. Is this what the problem is and if so how can I go about giving each form a child relationship to the main form?
Thanks,
John
BTW I'm using Visual Studio 2005 Standard Edition.
-- modified at 21:06 Friday 9th December, 2005
|
|
|
|
|
You are correct. For them to properly center they must have the parent form set. To do this just pass in the parent form as the first paramater to the ShowDialog() method. For instance
public void OnButtonClick(object sender, EventArgs e)<br />
{<br />
SomeForm child = new SomeForm();<br />
if ( DialogResult.OK == child.ShowDialog(this) )<br />
{ <br />
...<br />
}<br />
}
Jared Parsons
jaredp@beanseed.org
http://spaces.msn.com/members/jaredp/
|
|
|
|
|
Thanks a bunch Jared, got it working
Thanks,
John
|
|
|
|
|
:confused Hi,
I'm probably going to get hammered for this-- but here goes........
I'm trying to learn how to debug programs. Specifically, Windows Form Apps.
VS .NET 2003
I've found two kinds of tutorials:
Type 1: Tells you how to set a breakpoint
Tells you how to step in, step out etc.
How to set a watch window etc..
Type 2: Tells you stuff that is so advanced that it's of
no use for "practical" learning... "eax", "stack trace".
Sure, lots of people know this stuff, but what the heck do you do if you don't?
ps- I know what "eax" and a "stack trace" are but it hasn't helped me
learn how to use the debugger.
So here's the fundamental problem I'm having-->
I design a WinForm w/ buttons, TextBoxes, graphs etc...
The program compiles. I run it. Something doesn't work right.
I decide to debug it.
I decide to set a breakpoint.
I run "debug"
The WinForm launches (or doesn't launch until a few "step over" clicks)
And now the "step over" icon and it's friends are "grayed out". Now I'm in this frozen state between
the WinForm and the debugger window with no idea what to do...
Now what? How do I productively use the debugger and also "work" with the
events that fire and make things happen that I can see?
Thanks in advance.....
|
|
|
|
|
SkunkedWorks wrote: Type 2: Tells you stuff that is so advanced that it's of
no use for "practical" learning... "eax", "stack trace".
Debugging can be very advanced and difficult. IMHO the best way to learn is to
- try
- fail
- figure out why you failed
- repeat
SkunkedWorks wrote: And now the "step over" icon and it's friends are "grayed out". Now I'm in this frozen state between
the WinForm and the debugger window with no idea what to do...
Not sure what state you've gotten into here but pressing F5 should get you running again
Jared Parsons
jaredp@beanseed.org
http://spaces.msn.com/members/jaredp/
|
|
|
|
|
Hi All...
I writing some application that in it i have dynamic creating button.
In this case i created one method that will call in each button click.
How can i know what button was press ??
I want to save each button in Hash table and by the method "GetHashCode" to get the number of the button that was press.
But i don't know how to "Set" hash code ...
Someone can help me ?
Thanks.
|
|
|
|
|
Okay, with your idea, you can do the following when you create the buttons, assuming you have a Hashtable named buttonDict and an int named buttonIndex:
Button b = new Button();
b.Text = "Button " + buttonIndex.ToString();
buttonDict[ b ] = buttonIndex;
buttonIndex++; and, then, in your event handler
private void AllButton_Click( object sender, System.EventArgs e )
{
int clickedButtonIndex = -1;
if( buttonDict.ContainsKey( sender ) )
{
clickedButtonIndex = Convert.ToInt32( buttonDict[ sender ] );
}
} However, I think that you're keeping around a Hashtable for no reason. You could, alternatively, do the following in the place where you create your buttons:
Button b = new Button();
b.Text = "Button " + buttonIndex.ToString();
b.Tag = buttonIndex;
buttonIndex++; and in your general button click event handler:
private void AllButton_Click( object sender, System.EventArgs e )
{
int clickedButtonIndex = -1;
Button b = ( Button ) sender;
if( b.Tag != null )
{
clickedButtonIndex = Convert.ToInt32( b.Tag );
}
} I hope that answers your question sufficiently.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|