Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
QuestionReports Pin
cdpace13-Nov-09 4:55
cdpace13-Nov-09 4:55 
AnswerRe: Reports Pin
Abhishek Sur13-Nov-09 5:48
professionalAbhishek Sur13-Nov-09 5:48 
GeneralRe: Reports Pin
cdpace13-Nov-09 6:33
cdpace13-Nov-09 6:33 
GeneralRe: Reports Pin
Abhishek Sur13-Nov-09 6:56
professionalAbhishek Sur13-Nov-09 6:56 
AnswerRe: Reports Pin
Shameel13-Nov-09 7:49
professionalShameel13-Nov-09 7:49 
GeneralRe: Reports Pin
cdpace13-Nov-09 9:53
cdpace13-Nov-09 9:53 
GeneralRe: Reports Pin
Shameel13-Nov-09 21:24
professionalShameel13-Nov-09 21:24 
QuestionDouble Array Form Pin
Nitegoddess13-Nov-09 3:32
Nitegoddess13-Nov-09 3:32 
I need to create a form that allows a user to create a two dimensional array. I made a form that has 2 numericupdowns that allows the user to set the maximum number of positions and columns within the array. This set of numericupdowns will not be used again so any mention of numericupdowns refers to the following set. Then I have another set of numericupdowns, a textbox and a button to allow the user to set a value which is typed into the textbox for each array combination. The second set of numericupdowns lets them scroll through and set each combination they want to set a value for. I need it so that once they click the button the value in the textbox is saved and the first numericupdown is incremented by + 1 until it reaches it's maximum. I am new to C# and I am not familiar with programming in general. I am using MS C# 2008 to create this windows form. I don't know if it will help much but here is some of the code I have so far:

Ex of what I am trying to do.

Say a user sets the array to dimensions:
Array[3,2]

I want the user to be able to scroll through these possibilities using a numericupdown to set the value of each array dimension,

Array[0,0] = value set by user by typing it into textbox

button clicked and array dimension saved, first numericupdown increased by 1.

Array[1,0] = value set by user by typing it into textbox

button clicked and array dimension saved, first numericupdown increased by 1.

Array[2,0] = value set by user by typing it into textbox

button clicked and array dimension saved, second numericupdown increased by 1.

Array[0,1] = value set by user by typing it into textbox

button clicked and array dimension saved, first numericupdown increased by 1.

Array[1,1] = value set by user by typing it into textbox

button clicked and array dimension saved, first numericupdown increased by 1.

Array[2,1] = value set by user by typing it into textbox

I am hoping that make this more clear.

Here is some of the code I have so far:

namespace Assignment_1
{
    public partial class Form_DefArr : Form
    {
        public int[,] IndxArr;
        public Form_DefArr()
        {
            
            InitializeComponent();

        }

        private void button_CreateNewArr_Click(object sender, EventArgs e)
        {
            decimal FirstDim = (this.numericUpDown_FirstDim.Value - 1);
            decimal SecondDim = (this.numericUpDown_SecondDim.Value - 1);
            numericUpDown_FirstIndx.Maximum = FirstDim ;
            numericUpDown_SecondIndx.Maximum = SecondDim ;

        }

        private void numericUpDown_SecondIndx_ValueChanged(object sender, EventArgs e)
        {

        }

        private void button_EnterData_Click(object sender, EventArgs e)
        {
            int ArrData = int.Parse(textBox_ArrElementData.Text);
            ArrData = Convert.ToInt32(ArrData);
            int FirstIndx = (int)numericUpDown_FirstIndx.Value;
            int SecondIndx = (int)numericUpDown_SecondIndx.Value;
            IndxArr = new int[FirstIndx, SecondIndx];
            IndxArr[FirstIndx, SecondIndx] = ArrData;
        }

    }
}

AnswerRe: Double Array Form Pin
PIEBALDconsult13-Nov-09 4:08
mvePIEBALDconsult13-Nov-09 4:08 
GeneralRe: Double Array Form Pin
Nitegoddess13-Nov-09 4:27
Nitegoddess13-Nov-09 4:27 
AnswerRe: Double Array Form Pin
Saksida Bojan13-Nov-09 6:02
Saksida Bojan13-Nov-09 6:02 
GeneralRe: Double Array Form Pin
Nitegoddess13-Nov-09 6:28
Nitegoddess13-Nov-09 6:28 
GeneralRe: Double Array Form Pin
Saksida Bojan13-Nov-09 6:47
Saksida Bojan13-Nov-09 6:47 
GeneralRe: Double Array Form Pin
Nitegoddess13-Nov-09 7:01
Nitegoddess13-Nov-09 7:01 
GeneralRe: Double Array Form Pin
Saksida Bojan13-Nov-09 7:14
Saksida Bojan13-Nov-09 7:14 
GeneralRe: Double Array Form Pin
Nitegoddess13-Nov-09 7:28
Nitegoddess13-Nov-09 7:28 
GeneralRe: Double Array Form Pin
Saksida Bojan13-Nov-09 8:00
Saksida Bojan13-Nov-09 8:00 
GeneralRe: Double Array Form Pin
ragnaroknrol13-Nov-09 8:07
ragnaroknrol13-Nov-09 8:07 
GeneralRe: Double Array Form Pin
Saksida Bojan13-Nov-09 8:28
Saksida Bojan13-Nov-09 8:28 
GeneralRe: Double Array Form Pin
Nitegoddess13-Nov-09 8:42
Nitegoddess13-Nov-09 8:42 
GeneralRe: Double Array Form Pin
Saksida Bojan13-Nov-09 8:48
Saksida Bojan13-Nov-09 8:48 
GeneralRe: Double Array Form Pin
ragnaroknrol13-Nov-09 8:50
ragnaroknrol13-Nov-09 8:50 
GeneralRe: Double Array Form Pin
Nitegoddess13-Nov-09 8:33
Nitegoddess13-Nov-09 8:33 
GeneralRe: Double Array Form Pin
Saksida Bojan13-Nov-09 8:45
Saksida Bojan13-Nov-09 8:45 
GeneralRe: Double Array Form Pin
Nitegoddess13-Nov-09 8:52
Nitegoddess13-Nov-09 8:52 

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.