Click here to Skip to main content
15,921,463 members
Home / Discussions / C#
   

C#

 
GeneralRe: Question on simple binding Pin
Heath Stewart30-Jun-04 18:08
protectorHeath Stewart30-Jun-04 18:08 
GeneralRe: Question on simple binding Pin
Brett Slaski1-Jul-04 2:44
Brett Slaski1-Jul-04 2:44 
GeneralRe: Question on simple binding Pin
Heath Stewart1-Jul-04 4:36
protectorHeath Stewart1-Jul-04 4:36 
GeneralRe: Question on simple binding Pin
Brett Slaski1-Jul-04 5:54
Brett Slaski1-Jul-04 5:54 
GeneralRe: Question on simple binding Pin
Heath Stewart1-Jul-04 17:48
protectorHeath Stewart1-Jul-04 17:48 
GeneralRe: Question on simple binding Pin
Brett Slaski2-Jul-04 3:08
Brett Slaski2-Jul-04 3:08 
GeneralRe: Question on simple binding Pin
Heath Stewart2-Jul-04 3:40
protectorHeath Stewart2-Jul-04 3:40 
GeneralRe: Question on simple binding Pin
Brett Slaski2-Jul-04 9:25
Brett Slaski2-Jul-04 9:25 
I tried someting new. I created a new UserControl, but instead of inheriting from System.Windows.Forms.UserControl I inherited from System.Windows.Forms.ComboBox (isn't this now a customcontrol??) Anyway this new user control binds without any problems. I bind to lp2.SelectedValue
Here are the basics.
<br />
public class lp2 : System.Windows.Forms.ComboBox<br />
{<br />
	// Our Variables<br />
	private SqlDataAdapter dataAdapter;<br />
	private SqlConnection sqlConnection;<br />
	private DataSet dataset;<br />
	/// <summary> <br />
	/// Required designer variable.<br />
	/// </summary><br />
	private System.ComponentModel.Container components = null;<br />
<br />
	public lp2()<br />
	{<br />
 	// This call is required by the Windows.Forms Form Designer.<br />
	InitializeComponent();<br />
		// TODO: Add any initialization after the InitializeComponent call<br />
	sqlConnection = Utilities.dbUtilities.getWebDbCn();<br />
	string selectCommand = "select * from lang";<br />
	dataset = new DataSet();<br />
	dataAdapter = new SqlDataAdapter(selectCommand, sqlConnection);<br />
	dataAdapter.Fill(dataset, "lang");<br />
	this.DataSource = dataset;<br />
	this.DisplayMember = "lang.langText";<br />
	this.ValueMember = "lang.lang";<br />
<br />
}<br />
}<br />


My other UserControl is simular except I have a ComboBox added to the class where this class inherits ComboBox.
Now I guess I need to figure out how to get the older UserControl to work since I will be back to the issue when I have a UserControl with more than one control or component on it.
Are there things I must do in a UserControl to make sure I can bind to it's properties?
GeneralOOP implemenation question Pin
mealnumberone30-Jun-04 2:27
mealnumberone30-Jun-04 2:27 
GeneralRe: OOP implemenation question Pin
Colin Angus Mackay30-Jun-04 3:15
Colin Angus Mackay30-Jun-04 3:15 
GeneralRe: OOP implemenation question Pin
mealnumberone30-Jun-04 7:13
mealnumberone30-Jun-04 7:13 
GeneralRe: OOP implemenation question Pin
Heath Stewart30-Jun-04 8:39
protectorHeath Stewart30-Jun-04 8:39 
GeneralMouseHover on toolbar button Pin
Member 114743230-Jun-04 1:52
Member 114743230-Jun-04 1:52 
GeneralRe: MouseHover on toolbar button Pin
Nick Parker30-Jun-04 3:06
protectorNick Parker30-Jun-04 3:06 
GeneralRe: MouseHover on toolbar button Pin
Heath Stewart30-Jun-04 3:55
protectorHeath Stewart30-Jun-04 3:55 
GeneralRe: MouseHover on toolbar button Pin
Nick Parker30-Jun-04 6:28
protectorNick Parker30-Jun-04 6:28 
GeneralRe: MouseHover on toolbar button Pin
Heath Stewart30-Jun-04 3:54
protectorHeath Stewart30-Jun-04 3:54 
Generalrefactoring plugin Pin
steven shingler30-Jun-04 1:40
steven shingler30-Jun-04 1:40 
GeneralRe: refactoring plugin Pin
Werdna30-Jun-04 5:49
Werdna30-Jun-04 5:49 
GeneralRe: refactoring plugin Pin
steven shingler30-Jun-04 5:55
steven shingler30-Jun-04 5:55 
GeneralRe: refactoring plugin Pin
Werdna30-Jun-04 6:07
Werdna30-Jun-04 6:07 
GeneralRe: refactoring plugin Pin
steven shingler30-Jun-04 12:40
steven shingler30-Jun-04 12:40 
GeneralFile transfer problems Pin
janne6730-Jun-04 1:31
janne6730-Jun-04 1:31 
GeneralRe: File transfer problems Pin
Not Active30-Jun-04 2:53
mentorNot Active30-Jun-04 2:53 
Generaloverride button to create an image button... Pin
misterbear30-Jun-04 1:01
misterbear30-Jun-04 1:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.