I have a list view with an item template and some radnumeric text boxes.
I'm binding the radnumerictextboxes programaticaly OnItemCreated.
When I fire a postback the values are all gone.
Any suggestions?
thank you
<telerik:RadListView ID="RadListView1" runat="server" OnItemCreated="RadListView1_ItemCreated">
<ItemTemplate>
<div>
<telerik:RadNumericTextBox ID="txb0" runat="server" Width="50px" />
<telerik:RadNumericTextBox ID="txb1" runat="server" Width="50px" />
</div>
</ItemTemplate>
</telerik:RadListView>
protected void RadListView1_ItemCreated(object sender, RadListViewItemEventArgs e)
{
if (!IsPostBack)
{
RadNumericTextBox txb0 = (RadNumericTextBox)e.Item.FindControl("txb0");
txb0.Value = 1;
RadNumericTextBox txb1 = (RadNumericTextBox)e.Item.FindControl("txb1");
txb1.Value = 2;
}
}
I'm binding the radnumerictextboxes programaticaly OnItemCreated.
When I fire a postback the values are all gone.
Any suggestions?
thank you
<telerik:RadListView ID="RadListView1" runat="server" OnItemCreated="RadListView1_ItemCreated">
<ItemTemplate>
<div>
<telerik:RadNumericTextBox ID="txb0" runat="server" Width="50px" />
<telerik:RadNumericTextBox ID="txb1" runat="server" Width="50px" />
</div>
</ItemTemplate>
</telerik:RadListView>
protected void RadListView1_ItemCreated(object sender, RadListViewItemEventArgs e)
{
if (!IsPostBack)
{
RadNumericTextBox txb0 = (RadNumericTextBox)e.Item.FindControl("txb0");
txb0.Value = 1;
RadNumericTextBox txb1 = (RadNumericTextBox)e.Item.FindControl("txb1");
txb1.Value = 2;
}
}