in my radgrid i use template as EditFormType. When I open the edit form for a grid item I want to show or hide a texbos based on the value populated in it. It can be achieved this way:
Protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
{
GridEditFormItem item = (GridEditFormItem)e.Item;
TextBox TextBox1 = (TextBox)item.FindControl("TextBox1");
//OR/// TextBox txtbox = (TextBox)item["TextBox1"].Controls[0];
if (TextBox1.Text == "your value")
{
TextBox1.Visible = false;
}
}
}
Tuesday, January 11, 2011
Friday, January 07, 2011
radwindow pops up all the time unexpected
I use the following line in code behind to open a radwindow:
During as soon as I opened the window once, any postback will cause this window to popup again.
The solution is simple, just put the following code into page_load event.
RadWindow1.Visible = false;
Posted by SF at 8:56 am 0 comments
Subscribe to:
Posts (Atom)