I am using a grid in my page for the user to insert data into. on opening the page I want the grid to open the insert mode. I put this in and it works but the default values are not showing in the fields. if I just load the page and click on the insert link the values are there. is there a way I can get my default values to show while opening this on the page load?
protected
void RadGrid2_PreRender(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
RadGrid2.MasterTableView.IsItemInserted =
true;
RadGrid2.Rebind();
}
}
my column editor looks like this<
telerik:GridNumericColumnEditor ID="CCTavelCostColumnEditor" runat="server">
<NumericTextBox runat="server" ID="NumericTextBox3" Width="80px" Value="0" NumberFormat-DecimalDigits="0" Type="Currency"
</NumericTextBox>
</telerik:GridNumericColumnEditor>
if it helps my column is like this
<
telerik:GridNumericColumn Aggregate="Sum" DataField="TRAVELCOST" HeaderText="TRAVEL COST" UniqueName="TRAVELCOST" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right"
DataType="System.Decimal" DataFormatString="{0:C}" ColumnEditorID="CCTavelCostColumnEditor" ItemStyle-Width="80px"
FooterAggregateFormatString="{0:C}" FooterStyle-HorizontalAlign="Right">
<FooterStyle HorizontalAlign="Right"></FooterStyle>
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</telerik:GridNumericColumn >