Click here to Skip to main content
16,005,389 members
Home / Discussions / C#
   

C#

 
Generaltree view issues Pin
Anonymous13-Jul-05 17:31
Anonymous13-Jul-05 17:31 
GeneralRe: tree view issues Pin
Rob Graham13-Jul-05 17:40
Rob Graham13-Jul-05 17:40 
GeneralRe: tree view issues Pin
Anonymous13-Jul-05 17:57
Anonymous13-Jul-05 17:57 
GeneralRe: tree view issues Pin
mav.northwind13-Jul-05 22:46
mav.northwind13-Jul-05 22:46 
GeneralRe: tree view issues Pin
Anonymous14-Jul-05 6:00
Anonymous14-Jul-05 6:00 
GeneralCombo box bind to object ... need help Pin
kakarato13-Jul-05 16:37
kakarato13-Jul-05 16:37 
GeneralRe: Combo box bind to object ... need help Pin
Christian Graus13-Jul-05 16:57
protectorChristian Graus13-Jul-05 16:57 
GeneralRe: Combo box bind to object ... need help Pin
kakarato13-Jul-05 20:39
kakarato13-Jul-05 20:39 
I think my poor english make u misundestand.
I've code below in my form ...
<br />
private struct MonthList<br />
{<br />
	public MonthList(string desc,string monthNo, string shortdesc)<br />
	{<br />
		this._desc = desc;<br />
		this._number = monthNo;<br />
		this._shortdesc = shortdesc;<br />
	}<br />
<br />
	private string _desc;<br />
	private string _number;<br />
	private string _shortdesc;<br />
<br />
	public string monthDesc<br />
	{<br />
		get	{return _desc;}<br />
	}<br />
<br />
	public string monthNo<br />
	{<br />
		get {return _desc;}<br />
	}<br />
<br />
	public string shortDesc<br />
	{<br />
		get {return _shortdesc; }<br />
	}<br />
}<br />
<br />
private void init_cboMonth()<br />
{<br />
	ArrayList month = new ArrayList ();<br />
		<br />
	month.Add( new MonthList ("January","1","Jan"));<br />
	month.Add( new MonthList ("Feburay","2","Feb"));<br />
	month.Add( new MonthList ("March","3","Mar"));<br />
	month.Add( new MonthList ("April","4","Apl"));<br />
	month.Add( new MonthList ("May","5","May"));<br />
	month.Add( new MonthList ("June","6","Jun"));<br />
	month.Add( new MonthList ("July","7","Jly"));<br />
	month.Add( new MonthList ("August","8","Aug"));<br />
	month.Add( new MonthList ("September","9","Sep"));<br />
	month.Add( new MonthList ("Otocber","10","Oct"));<br />
	month.Add( new MonthList ("November","11","Nov"));<br />
	month.Add( new MonthList ("December","12","Dec"));<br />
			<br />
	this.comboMonth.DataSource = month;<br />
	this.comboMonth.DisplayMember =  "monthDesc";<br />
	this.comboMonth.ValueMember = "monthNo";<br />
<br />
}<br />


It work fine in the form..
by when i try to seperate code above it to another file like below

<br />
public class stdData<br />
{<br />
	public static ArrayList getMonthList()<br />
	{<br />
		ArrayList month = new ArrayList ();<br />
		month.Add( new MonthList ("January","1","Jan"));<br />
		month.Add( new MonthList ("Feburay","2","Feb"));<br />
		month.Add( new MonthList ("March","3","Mar"));<br />
		month.Add( new MonthList ("April","4","Apl"));<br />
		month.Add( new MonthList ("May","5","May"));<br />
		month.Add( new MonthList ("June","6","Jun"));<br />
		month.Add( new MonthList ("July","7","Jly"));<br />
		month.Add( new MonthList ("August","8","Aug"));<br />
		month.Add( new MonthList ("September","9","Sep"));<br />
		month.Add( new MonthList ("Otocber","10","Oct"));<br />
		month.Add( new MonthList ("November","11","Nov"));<br />
		month.Add( new MonthList ("December","12","Dec"));<br />
		return month;<br />
	}<br />
}<br />
<br />
private struct MonthList<br />
{<br />
	public MonthList(string desc,string monthNo, string shortdesc)<br />
	{<br />
		this._desc = desc;<br />
		this._number = monthNo;<br />
		this._shortdesc = shortdesc;<br />
	}<br />
<br />
	private string _desc;<br />
	private string _number;<br />
	private string _shortdesc;<br />
<br />
	public string monthDesc ...<br />
	public string monthNo ...<br />
	public string shortDesc ...<br />
}<br />


in the form ..

<br />
private void init_cboMonth()<br />
{<br />
	stdData stdData = new stdData();<br />
 	ArrayList month = stdData.getMonthList();<br />
<br />
	this.comboMonth.DataSource = month;<br />
	this.comboMonth.DisplayMember =  "monthDesc";<br />
	this.comboMonth.ValueMember = "monthNo"; //this line will cause error<br />
}<br />


So what is goinf wrong ? thanks.
GeneralRe: Combo box bind to object ... need help Pin
J4amieC13-Jul-05 21:56
J4amieC13-Jul-05 21:56 
GeneralRe: Combo box bind to object ... need help Pin
kakarato13-Jul-05 22:14
kakarato13-Jul-05 22:14 
Questionhow can I access, windows forms properites by other thread than the form Pin
machocr13-Jul-05 11:18
machocr13-Jul-05 11:18 
AnswerRe: how can I access, windows forms properites by other thread than the form Pin
Sau Fan Lee13-Jul-05 13:13
Sau Fan Lee13-Jul-05 13:13 
GeneralRe: how can I access, windows forms properites by other thread than the form Pin
machocr14-Jul-05 4:25
machocr14-Jul-05 4:25 
GeneralMemory problem Pin
AnonymousTwo13-Jul-05 9:21
AnonymousTwo13-Jul-05 9:21 
GeneralRe: Memory problem Pin
Dave Kreskowiak13-Jul-05 9:42
mveDave Kreskowiak13-Jul-05 9:42 
GeneralGET Image Constructor Pin
Expert Coming13-Jul-05 9:12
Expert Coming13-Jul-05 9:12 
GeneralRe: GET Image Constructor Pin
Judah Gabriel Himango13-Jul-05 9:18
sponsorJudah Gabriel Himango13-Jul-05 9:18 
GeneralRe: GET Image Constructor Pin
Expert Coming13-Jul-05 18:25
Expert Coming13-Jul-05 18:25 
GeneralRe: GET Image Constructor Pin
Judah Gabriel Himango14-Jul-05 5:03
sponsorJudah Gabriel Himango14-Jul-05 5:03 
GeneralText can't be fully displayed on a button Pin
sparks_lu13-Jul-05 8:52
sparks_lu13-Jul-05 8:52 
GeneralCOM+ &amp; .NEt parameters by reference Pin
raforaez13-Jul-05 8:06
raforaez13-Jul-05 8:06 
GeneralRe: COM+ &amp; .NEt parameters by reference Pin
Judah Gabriel Himango13-Jul-05 9:11
sponsorJudah Gabriel Himango13-Jul-05 9:11 
GeneralRe: COM+ &amp; .NEt parameters by reference Pin
raforaez13-Jul-05 9:28
raforaez13-Jul-05 9:28 
GeneralDataGrid: lock row height, paint icons in BoolColumn Pin
SebbaP13-Jul-05 7:30
SebbaP13-Jul-05 7:30 
GeneralScroll panel from caret Pin
mr_seus13-Jul-05 6:31
mr_seus13-Jul-05 6:31 

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.