In my popup edit form I have a templated column "TTL" and its TextBox "TTLTextBox".
I want to suggest a value for this, and have used this code, which does not presen an inital value,
but has no error messages. Can you tell me why?
Thanks
Clive
I want to suggest a value for this, and have used this code, which does not presen an inital value,
but has no error messages. Can you tell me why?
Thanks
Clive
Private Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated |
If TypeOf e.Item Is GridEditableItem And e.Item.IsInEditMode Then |
If e.Item.OwnerTableView.IsItemInserted Then |
'item is about to be inserted |
Dim item As GridEditableItem = DirectCast(e.Item, GridEditableItem) |
Dim TxtBx As TextBox = DirectCast(item.FindControl("TTLTextBox"), TextBox) |
TxtBx.Text = "21" |
Else |
'item is about to be edited |
End If |
End If |
End Sub the rekevant column declaration is <
telerik:GridTemplateColumn DataField="TTL"
DataType="System.Int16" HeaderText="TTL"
SortExpression="TTL" UniqueName="TTL">
<EditItemTemplate>
<asp:TextBox ID="TTLTextBox" runat="server" Text='<%# Bind("TTL") %>'
Width="30px" MaxLength="3" style="text-align:right"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="TTLLabel" runat="server"
Text='<%# Eval("TTL") %>'></asp:Label>
</ItemTemplate>
|