I have one application of WinForms
which inside list box I am inserting name and price..name and price are stored in two dimensional array respectively. Now when I select one record from the listbox
it gives me only one index from which I can get the string name and price to update that record I have to change name and price at that index for this I want to update both two dimensional array name and price. but the selected index is only one dimensional. I want to convert that index into row and column. How to do that?
But I'm inserting record in list box like this.
int row = 6, column = 10;
for(int i=0;i<row;i++)
{
for(int j=0;j<column;j++)
{
value= row+" \t "+ column +" \t "+ name[i, j]+" \t " +price[i, j];
listbox.items.add(value);
}
}