When I Try:
<telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" Culture="English (United States)" Type="Currency" Font-Size="Smaller" Height="8px" Width="75px" IncrementSettings-Step=".01" AutoPostBack="false" ShowSpinButtons="true" Value='3.49' >
Everything works 'fine', but when I attempt to data bind to the value property (asp.net/.net 3.5) like :
<telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" Culture="English (United States)" Type="Currency" Font-Size="Smaller" Height="8px" Width="75px" IncrementSettings-Step=".01" AutoPostBack="false" ShowSpinButtons="true" Value='<%# Eval("CurrentPrice") %>' >
I get "Specified cast is not valid." as a runtime exception. The type for the CurrentPrice Property is Decimal, since the "Type" property for this control is "Currency" (and it is called a "NUMERIC" text box) I expect a decimal to work.
Any help would be greatly appreciated!
Cos
Hello everyone,
Let’s talk about the example http://demos.telerik.com/ASPNET/Prometheus/Grid/Examples/DataEditing/TemplateFormUpdate/DefaultVB.aspx that is easily accessible to everyone and can perfectly be used to describe my doubt.
Let’s suppose we change the Field Region to State/Province and we want to change the data control to a combobox, filled with the US States. Let’s go further. We put this field before city, and we want to choose the city also in a combobox. But of course, not a simple one, we want the city combobox to show only cities from the US State selected and we must have it in AJAX way.
The way I can imagine it, is to put an AJAX Panel in the city combobox, with state combobox as trigger. Then, in the SelectedIndexChanged event of the state combobox, I make my query to the cities.
Ok, but how do I access this SelectedIndexChanged event, since it is part of my Edit in the RadGrid? I tried a lot of things, and even tried to find it with FindControl, looking each child item of every control and it never appears.
Or is there another simple way to do?
Please, I want really to stay in the example of this link. I don’t want to change to a different approach or an example that would have to redo everything. I think that what I want should be a common need to Form Template Edit Form.
Best Regards,
Mario
Dim drow As DataRow
Dim cnt As Integer = 1
dt = mClas.GetDataTable("SELECT specialtyID, spec_name FROM specialty where spec_status=1")
cbSpecialty.Items.Add(New Telerik.WebControls.RadComboBoxItem("--- Select --- ", ""))
For Each drow In dt.Rows
cbSpecialty.Items.Add(New Telerik.WebControls.RadComboBoxItem(drow("spec_name"), drow("specialtyID")))
Next

If Not Me.IsPostBack Then
Button1.Attributes.Add("onclick", "$find(" + RadEditor1.ClientID + ").set_html('');return false;")
End If
End Sub
