rmokkenstorm
Freshman
- Joined
- Feb 20, 2006
- Messages
- 31
i use this script to select a row from my data grid.. but he doesn't fill it.. what's wrong?
my customrow script
and my code to read it out.. at least it should read it..
my customrow script
Code:
public void dataGrid_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
int rowIndex = dataGrid1.CurrentRowIndex;
if (CustomRow != null)
{
CustomRow(this, new CustomRowEventArgs(barry11,dataGrid1,rowIndex));
}
}
Code:
public class CustomRowEventArgs : EventArgs
{
DataSet barry11;
DataGrid grid;
int row;
public CustomRowEventArgs(DataSet DSet,DataGrid Grid,int Row)
{
grid = Grid;
row = Row;
barry11 = barry11;
}
public DataSet DSet
{
get { return barry11; }
}
public DataGrid Grid
{
get { return grid; }
}
public int Row
{
get { return row; }
}
and my code to read it out.. at least it should read it..
Code:
public virtual void customHandler_CustomRow(object sender, CustomRowEventArgs e)
{
DataSet DSet = e.DSet;
DataGrid dataGrid1 = e.Grid;
int row = e.Row;
textBox.Text = dataGrid1[e.Row,0].ToString();
}