Hello,
i am using v2008.3.1105.35
I am trying to data bind a text box in the panel bar's item template to a field in my data source. But it dose not seem to to working correctly. Here are the important parts:
It runs with no errors but the text box is blank. Am I doing this in the wrong order or missing a step?
If i data bind to a panel bar property it works as expected
Thanks for the help.
i am using v2008.3.1105.35
I am trying to data bind a text box in the panel bar's item template to a field in my data source. But it dose not seem to to working correctly. Here are the important parts:
| <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Telerik" Width="800px"> <ItemTemplate> <asp:TextBox ID="TextBox2" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ItemDesc")%>' /> </ItemTemplate> </telerik:RadPanelBar> |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!IsPostBack) |
| { |
| BindPanelBar(); |
| for (int i = 0; i < RadPanelBar1.Items.Count; i++) |
| RadPanelBar1.Items[i].DataBind(); |
| } |
| } |
| protected void BindPanelBar() |
| { |
| DataTable dt; |
| // snip: code building the datatable |
| RadPanelBar1.DataSource = dt; |
| RadPanelBar1.DataTextField = "Title"; |
| RadPanelBar1.DataValueField = "ID"; |
| RadPanelBar1.DataFieldID = "Alt_ID"; |
| RadPanelBar1.DataBind(); |
| } |
It runs with no errors but the text box is blank. Am I doing this in the wrong order or missing a step?
If i data bind to a panel bar property it works as expected
| <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Telerik" Width="800px"> |
| <ItemTemplate> |
| <asp:TextBox ID="TextBox2" runat="server" Text='<%# DataBinder.Eval(Container, "Text")%>' /> |
| </ItemTemplate> |
| </telerik:RadPanelBar> |
Thanks for the help.