I am wondering if this is the only way to have this effect (panels at the button and content changing at the top). With this approach, we lose the capability to use RadPanelItem, forcing us to implement the items on each RadPageView.
Thanks.
Hello there, I'm trying to conditionally hide a row on the server side. My code looks like this:
| protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) |
| { |
| if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem) |
| { |
| if (e.Item.OwnerTableView.Name == "Customer") |
| { |
| } |
| if (e.Item.OwnerTableView.Name == "CustomerDetail") |
| { |
| CustomerDetail detail = (CustomerDetail)e.Item.DataItem; |
| if (detail.IsCancelled) |
| { |
| // Hide the row, e.Item.Visible = false doesn't seem to work |
| } |
| } |
| } |
| } |
Dynamically created columns causes problem when column Display = False
We are Telerik v2010 Q1. When add a column with Dispay = false it hides the column, but there is the a large gap to the right of the grid e.g.
Before
|
ID |
Col 2 |
Col 3 |
|
|
|
|
After
|
Col 2 |
Col 3 |
<< GAP?! >> |
|
|
|
|
Extract
//id column
col = new GridBoundColumn();
//TODO: Setting col.Display = false causes a problem
this.uxResults.Columns.Add(col);
//now ammend properties
col.UniqueName = “ID"
col.Visible = true; //NB Note that Display is set to false!!
col.DataField = “ID”
col.HeaderText = "";
col.FilterListOptions = GridFilterListOptions.VaryByDataType;
//col.AllowFiltering = true;
//col.AllowSorting = true;
//col.ReadOnly = true;
col.Display = false;
| protected void RadGrid1_ItemInserted(object source, GridInsertedEventArgs e) |
| { |
| if (e.Exception != null) |
| { |
| Exception eex = e.Exception; |
| string msg; |
| if (ex.InnerException != null) msg = ex.InnerException.Message; |
| else msg = ex.Message; |
| RadGrid1.Controls.Add(new LiteralControl(string.Format("<span style='color:red'>{0}</span>", msg))); |
| e.ExceptionHandled = true; |
| } |
| } |