8 Answers, 1 is accepted
0
Hi Prassin,
If you have a custom edit form template with controls of your own, just use e.Item.FindControl("IDofYourControl"). If you are using the built-in edit forms, then you can use the Extract values method to get any of the field values in the edit form:
Hope it helps.
Greetings,
Tsvetoslav
the Telerik team
If you have a custom edit form template with controls of your own, just use e.Item.FindControl("IDofYourControl"). If you are using the built-in edit forms, then you can use the Extract values method to get any of the field values in the edit form:
Hashtable newValues =
new
Hashtable();
((TreeListEditableItem)e.Item).ExtractValues(newValues);
Hope it helps.
Greetings,
Tsvetoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Prassin
Top achievements
Rank 1
answered on 28 Jun 2012, 07:52 AM
Hi Tsvetoslav,
I have tried this code.. i can get the value from a particular control.. but my wish is not that.. i need to find a control and wish to assign the control "ReadOnly" state or "Disabled " in my tree list .. that is my requirement... please help..
Regards,
Prassin
I have tried this code.. i can get the value from a particular control.. but my wish is not that.. i need to find a control and wish to assign the control "ReadOnly" state or "Disabled " in my tree list .. that is my requirement... please help..
Regards,
Prassin
0
Hello Prassin,
Could you paste your code (aspx and code-behind) using the CODE FORMATTER tool of the ticket editor.
Regards,
Tsvetoslav
the Telerik team
Could you paste your code (aspx and code-behind) using the CODE FORMATTER tool of the ticket editor.
Regards,
Tsvetoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Prassin
Top achievements
Rank 1
answered on 28 Jun 2012, 09:33 AM
<asp:TextBox ID=
"txtBoxcode"
Text=
'<%# Bind("SubCatCode") %>' runat="server" Height="8Pt"
Style=
"text-transform: uppercase"
MaxLength=
"4"
>
</asp:TextBox>
Protected
Sub
RadTreeList1_EditCommand(
ByVal
sender
As
Object
,
ByVal
e
As
TreeListCommandEventArgs)
Dim
item
As
TreeListDataItem = TryCast(e.Item, TreeListDataItem)
Dim
txt
As
TextBox = TryCast(item.FindControl(
"txtBoxcode"
), TextBox)
txt.Enabled =
False
End
Sub
0
Hi Prassin,
Just do it in the ItemDataBound event as follows:
Hope it helps.
Greetings,
Tsvetoslav
the Telerik team
Just do it in the ItemDataBound event as follows:
Protected
Sub
RadTreeList1_ItemDataBound(sender
As
Object
, e
As
TreeListItemDataBoundEventArgs)
If
TypeOf
e.Item
Is
TreeListEditFormItem
AndAlso
DirectCast
(e.Item, TreeListEditFormItem).IsInEditMode
Then
Dim
item
As
TreeListEditableItem = TryCast(e.Item, TreeListEditableItem)
Dim
textBox = TryCast(item.FindControl(
"txtDiscount"
), TextBox)
textBox.Enabled =
False
End
If
End
Sub
Hope it helps.
Greetings,
Tsvetoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Prassin
Top achievements
Rank 1
answered on 28 Jun 2012, 10:16 AM
Hi..
Thanks soo much.. its working fine.. and one more thing ... i wish to enable that textbox while click add parent item... edit time need to disable too...
Thanks soo much.. its working fine.. and one more thing ... i wish to enable that textbox while click add parent item... edit time need to disable too...
0
Hi Prassin,
Then, the following code snippet should prove helpful:
Kind regards,
Tsvetoslav
the Telerik team
Then, the following code snippet should prove helpful:
Protected
Sub
RadTreeList1_ItemDataBound(sender
As
Object
, e
As
TreeListItemDataBoundEventArgs)
If
TypeOf
e.Item
Is
TreeListEditFormInsertItem
Then
Dim
item
As
TreeListEditFormInsertItem = TryCast(e.Item, TreeListEditFormInsertItem)
Dim
textBox = TryCast(item.FindControl(
"txtDiscount"
), TextBox)
textBox.Enabled =
True
ElseIf
TypeOf
e.Item
Is
TreeListEditFormItem
AndAlso
DirectCast
(e.Item, TreeListEditFormItem).IsInEditMode
Then
Dim
item
As
TreeListEditableItem = TryCast(e.Item, TreeListEditableItem)
Dim
textBox = TryCast(item.FindControl(
"txtDiscount"
), TextBox)
textBox.Enabled =
False
End
If
End
Sub
Kind regards,
Tsvetoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Prassin
Top achievements
Rank 1
answered on 28 Jun 2012, 11:51 AM
Hi Tsvetoslav,
Thanks soo much for your help...
Regards,
Prassin
Thanks soo much for your help...
Regards,
Prassin