or
<
telerik:GridBoundColumn AllowFiltering="False" DataField="ID" Groupable="False" HeaderText="ID" ReadOnly="True" Reorderable="False" ShowFilterIcon="False" UniqueName="ID" Display="false">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridBoundColumn>
Hi,
I have usercontrol in which 'RadDockLayout','RadDockZone' and 'RadDock' is defined. Now this usercontrol is binded with in datalist. So for each row these three controls will loaded dynamically.
Now, My question is, how to maintain RadDock state (Collapse/Expand) at each postback?
Please respond ASAP... Thanks
<telerik:RadGrid ID="RadGrid1" runat="server" OnDetailTableDataBind="RadGrid1_DetailTableDataBind"> <MasterTableView DataKeyNames="PayerID"> <DetailTables> <telerik:GridTableView runat="server" Name="Plan" DataKeyNames="PlanID"> <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="PlanID" MasterKeyField="PayerID" /> </ParentTableRelation> </telerik:GridTableView> </DetailTables> </MasterTableView> </telerik:RadGrid>public partial class Default : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { RadGrid1.DataSource = GetPayer(); RadGrid1.DataBind(); } } DataTable GetPlans() { DataTable dt = new DataTable(); dt.Columns.Add("PlanID", typeof(string)); dt.Columns.Add("PayerID", typeof(string)); dt.Columns.Add("PlanName", typeof(string)); dt.Columns.Add("HQState", typeof(string)); dt.Columns.Add("OPState", typeof(string)); dt.Columns.Add("Status", typeof(string)); dt.Rows.Add("0022", "0001", "Red One", "NJ", "NJ", "Open"); dt.Rows.Add("0002", "0002", "Red One", "NJ", "NJ", "Open"); return dt; } DataTable GetPayer() { DataTable dt = new DataTable(); dt.Columns.Add("PayerID", typeof(string)); dt.Columns.Add("PayerName", typeof(string)); dt.Columns.Add("HQState", typeof(string)); dt.Columns.Add("OPState", typeof(string)); dt.Columns.Add("Status", typeof(string)); dt.Rows.Add("0001", "Red One Payer", "NY", "NY", "Open"); dt.Rows.Add("0002", "Red Two Payer", "NJ", "NJ", "Open"); return dt; } protected void RadGrid1_DetailTableDataBind(object sender, GridDetailTableDataBindEventArgs e) { e.DetailTableView.DataSource = GetPlans(); }}
I would like to dynamically assign the id property of a RadToolBarButton dynamically in my code behind sicnce is is supposedly a readonly property. Is there any workaround to get this done? I really need to assign a fixed id to one of the buttons since it is being reference in my JQuery code using its id.
private void PopulateRadToolBar()
{
RadToolBarItemCollection rtb = RadToolBar.Items;
if (!String.IsNullOrEmpty(WebPart.RadToolBarValues))
{
var properties = WebPart.RadToolBarValues.Split(@";".ToCharArray());
rtb.Clear();
foreach (var singleProperty in properties)
{
var itemRow = singleProperty.Split(@",".ToCharArray());
button = new RadToolBarButton();
button.ID = itemRow[0]; // ERROR HERE SINCE ID IS A READ ONLY PROPERTY
button.Text = itemRow[1];
button.NavigateUrl = itemRow[2];
button.Target = itemRow[3];
button.ImageUrl = itemRow[4];
rtb.Add(button);
}
else
{
rtb.Clear();
}
}
}
RadRadialGaugepreview.Scale.Labels.Font =
"normal 7px Arial,Verdana,Tahoma"