|
-
Oct 4th, 2006, 07:14 AM
#1
Thread Starter
New Member
i cannot get values from the grid
I have populated a datagrid on page load.The grid contain a bound column and 3 template columns.The template columns contain dropdownlist and labels.i have a button on the page and the action of that button is to get the values from the grid and print it on the label (lblMessage.Text) which is also suitated on the page.Now the problem is when i click the button the information of bound columns is displayed but the information of the template column is invisible.It doesnt gives error but the values are not printed on the label
my code is
private void btnAddToCart_Click(object sender, System.EventArgs e)
{
string Degree="";
foreach(DataGridItem objDataGridItem in dgPrice.Items ) {
Degree =Degree+ ((DropDownList)objDataGridItem.FindControl("drpQty")).SelectedItem.Text;
Degree =Degree+((Label)objDataGridItem.FindControl("lblSizeInches")).Text;
}
lblMessage.Text=Degree;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|