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

[Solved] Access the value of a column when binding html attributes to a NumericTextBox

0 Answers 71 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Daniel Blendea
Top achievements
Rank 1
Daniel Blendea asked on 15 Dec 2011, 08:54 PM
Hello,

Is it possible to access the value of a column when binding html attributes to a NumericTextBox?

@(Html.Telerik().NumericTextBox().Name( "Value" ).Spinners( true )
                .MinValue( -1 ).MaxValue( 1 )
                .IncrementStep( 0.01 ).DecimalDigits( 2 )
            .ClientEvents( events => events.OnChange( "onChangeValue" ) )
                .InputHtmlAttributes( new { data_id="<#= Id #>" } ))

The above code is from an Edit Template, used to edit a cell in a Telerik Grid:

columns.Bound( ot => ot.Value ).HtmlAttributes( new { @class = "col-value" } );

Now, I need to set the "data-id" attribute of the textbox to the value of the column Id.
Tags
NumericTextBox
Asked by
Daniel Blendea
Top achievements
Rank 1
Share this question
or