This is a migrated thread and some comments may be shown as answers.

Populating a custom edit form

3 Answers 77 Views
Grid
This is a migrated thread and some comments may be shown as answers.
WCRA Dev
Top achievements
Rank 1
WCRA Dev asked on 24 Jun 2010, 10:21 PM
I've built a RadGrid with a custom edit form.  I then use this form for both inserting and editing of records.  The insert portion works correctly but when I try to edit a record the form comes up without any values in the RadNumericTextBox.

I've tried populating the fields like the code below but then I get an error error when I switch to insert mode.
<telerik:RadNumericTextBox ID="txt_open_indemnity" Runat="server" Text='<%#  Bind( "paid_indemnity" ) %>'  
    CssClass="style2" Culture="English (United States)" DataType="System.Decimal"  
    TabIndex="8" Type="Currency" Value="0" Width="100px"
</telerik:RadNumericTextBox> 

How do I populate the text fields when the RadGrid is in edit mode?

3 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 28 Jun 2010, 12:34 PM
Hello Christian,

Try setting the binding expression for the DbValue property of the numeric box (do note that it is not available in Intellisense since it is marked as not browsable).

Greetings,
Tsvetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
WCRA Dev
Top achievements
Rank 1
answered on 28 Jun 2010, 02:18 PM
Could you provide an example?  I'm not sure what you mean.
0
Tsvetoslav
Telerik team
answered on 29 Jun 2010, 02:29 PM
Hi Christian,

Below is the mark-up for the solution:

<telerik:RadNumericTextBox ID="txt_open_indemnity" Runat="server" DbValue='<%#  Bind( "paid_indemnity" ) %>'   
    CssClass="style2" Culture="English (United States)" DataType="System.Decimal"   
    TabIndex="8" Type="Currency" Value="0" Width="100px">  
</telerik:RadNumericTextBox


Greetings,
Tsvetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
WCRA Dev
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
WCRA Dev
Top achievements
Rank 1
Share this question
or