Halo to all.. Im new in C#..
Pls. Do help.. I have a problem on creating an array of array.. I have dis settings
comboport = 16 array;
combochannel = 81 array;
In 1 comboport there should be 81 combochannel. First i have to set da comboport into selected index, then select different channel.
And in 1 channel there should be desired combosensor and combooutput used.
first group.
i have dis code.. Selecting da ComboChannel used
private void comboIOChannel_SelectedIndexChanged(object sender, EventArgs e)
{
IOChan = comboIOChannel.SelectedIndex;
comboIOSensor.SelectedIndex = IOSensor[IOChan];
comboOutput.SelectedIndex = IOOutput[IOChan];
}
Main group.... Selecting da comboport used.
private void comboPortIO_SelectedIndexChanged(object sender, EventArgs e)
{
IOPortNumber = comboPort.SelectedIndex;
combochannel.selectedindex = IOChannelNo [IOPortNumber];
comboIOSensor.SelectedIndex = IOSensor[IOPortNumber];
comboOutput.SelectedIndex = IOOutput[IOPortNumber];
}
Now da problem is eveytime i select da comboport, da combosensor and combooutput is not changing on da selected items..
please do help and take a look of my codes.. any ideas Please..
Thanks..
Loading
arsTotlesuckPosted Aug 1, 2006, 9:18 PM
Thanks.. 4 replying.. here is my initialization..
public class Form1 : System.Windows.Forms.Form
{
private int IOPortNumber; // this is used 4 the comboport selection.
private int[] IOChannelNo = new int[16];
private int[] ioSensor = new int[16];
private int[] ioOutput = new int[16];
private int IOChan; // this is used 4 the combochannel selection..
private int[] IOSensor = new int[81];
private int[] IOOutput = new int[81];
}
public Form1()
{
//
InitializeComponent();
//
comboportnumber.selectedIndex = 0;
combochannel.selectedindex = 0;
combosensor.selectedindex = 0;
combooutput.selectedindex = 0;
}
The idea of the program is when the user select the comboport, the user can set the combochannel a desired selection. he can set either channel1,2,3... and so on.. in every channel there is a corresponding combosensor and combooutput assigned. Everytime a new comboport is selected there is a new set of combo channel and so on..
Thanks in advance.. please do help.. Can i get your email ad? so that i can mail you personally..
Thank YOU so much..
Krishnaraj LPosted Aug 1, 2006, 10:38 AM