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

Binding to Radslider

1 Answer 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 19 Mar 2010, 12:14 PM
Hi,
I am binding a value to a Radslider in a Radgrid, this works fine in editmode, however on insert mode I ger the "Unable to cast...." error message. I'm assuming I need to find the control on itemcommand, however, how do I do that and set the value to for the slider to zero for insert mode?

    <telerik:RadSlider ID="RadSlider1" runat="server"   
                LargeChange="25" SmallChange="25" Value='<%# Bind("percent_complete") %>' 
                MinimumValue="0" MaximumValue="100" 
                Width="200" Height="40"   
                ItemType="Tick" TrackPosition="TopLeft" Skin="Sitefinity">  
    </telerik:RadSlider> 

protected void RadGrid_ItemCommand(object source, GridCommandEventArgs e)   
    {  
        if ((e.CommandName == RadGrid.InitInsertCommandName))  
        {  
             ?  
   
 
        }  
    }  

1 Answer, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 24 Mar 2010, 08:35 AM
Hello Karl,

You can change the insertion object when going into insert mode. More details and sample code can be found at the bottom of the following article:
http://www.telerik.com/help/aspnet-ajax/grdinsertingvaluesusercontrolformtemplate.html

Best wishes,
Nikolay
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
Karl
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or