View Single Post
Old 04-23-2006, 02:07 AM   PM User | #5
e~ternal
New to the CF scene

 
Join Date: Feb 2006
Location: Memphis, TN
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
e~ternal is an unknown quantity at this point
Update

well so far i have figured out that i can get the textbox to populate when i select an item in the dropdown. I have that part working now but the one problem still remains is when i try to add multiple rows in the gridview.

Heres my code:

protected void dropTech_SelectedIndexChanged(object sender, EventArgs e)
{
ContentPlaceHolder mpContentPlaceHolder;
GridView mpControl;

mpContentPlaceHolder =
(ContentPlaceHolder)Master.FindControl("ContentPlaceHolder1");

mpControl = (GridView)mpContentPlaceHolder.FindControl("gvLabor");

//int iRowID = mpControl.FindControl("lbl

//extract the employeeid for the employee that is selected
int iEmployeeID = Convert.ToInt32(((DropDownList)mpControl.Rows[0].Cells[0].Controls[0].FindControl("dropTech")).SelectedItem.Value);
//int iEmployeeID = Convert.ToInt32(((DropDownList)mpControl.Rows[].Cells[1].Controls[0].FindControl("dropTech")).SelectedItem.Value);

//get that employee billing rate
DataSet dsBillingRate = new DataSet();
dsBillingRate = VMBO.instance.getEmployeeBillingRate(iEmployeeID);

Decimal dBillingRate;

foreach (DataRow drBillingRate in dsBillingRate.Tables[0].Rows)
{
dBillingRate = (Decimal)drBillingRate["BillingRate"];

//now make the textbox have that value
((TextBox)mpControl.Rows[0].Cells[0].Controls[0].FindControl("txtRate")).Text = Convert.ToString(dBillingRate);

}
}
e~ternal is offline   Reply With Quote