1
Answer

How to Get a value to DropDownList which is already Binded with other Table Data?

Photo of Rajesh Kumar

Rajesh Kumar

12y
2.4k
1

Hello there,

I have a problem which i can't understand how to solve it. Help me to get rid of this.

1. My web form having the Employee fields like No(TextBox), Name(TaxtBox), Salary(TextBox), Designation(DropDownList).
2. My form is used to Save, Update and Delete the Employee's Data from Employee Table.
3. I bind the Designation Table Data to the Designation DropdownList.
4. Insert was working good (Enter data to TextBoxes and Select a value in DropDownList).
5. Whenever i want to update data, i enter the No(TextBox) and press Edit Button. I get Name, Salary. But i can't get Designation to DropDownList to Change values and Update the particular Employee's data.

That is the problem i faced. Help me..

Thanks..

Answers (1)

0
Photo of Nilanka Dharmadasa
NA 5.2k 0 15y

Hi Friend,
 
As I feel, what you have done is correct. If you change the size of the matrix then definetely you will have to reassign the values of each and every pixel. I dont think you can stop that by using another way.
 
You can use a class like this. So you can set the values from outside according to OOP concepts.
 

public class MyImage
{
 private int _ImageSize = 16;
 private double[,] _Matrix;
public MyImage(int imgsize)
{
      _ImageSize = imgsize;
      _Matrix = new double[_ImageSize, _ImageSize];
}

 
 
 

 public double this[int x, int y]
 {
  get { return _Matrix[x, y]; }
  set { _Matrix[x, y] = value; }
 }
}

 
Mark Do you like this answer checkbox if this helps you.