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

Grid / Client-side Row Selection

1 Answer 36 Views
Grid
This is a migrated thread and some comments may be shown as answers.
kollam2003
Top achievements
Rank 1
kollam2003 asked on 07 Nov 2009, 11:27 AM
I have a grid. It has a 'GridClientSelectColumn' and another grid template column.
On grid load the radcombobox should be made visible false. when i select the row the label should be invisible & combobox should be bound from database & made visible. All these should be done at client side. Is it possible?
 <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Progress" UniqueName="RadComboBox_ScoreName" 
                                                            Visible="true"
                                                            <ItemTemplate> 
                                                                <telerik:RadComboBox ID="RadComboBox_ScoreName" runat="server" MarkFirstMatch="True" 
                                                                    Font-Names="Arial" Skin="Web20" Width="80px"
                                                                    <Items> 
                                                                        <telerik:RadComboBoxItem runat="server" Text="--Select--" Value="--Select--" /> 
                                                                    </Items> 
                                                                    <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                                                </telerik:RadComboBox> 
                                                               
                                       
                                                                <asp:Label ID="lblScoreID" runat="server" Visible="false" Text='<%# DataBinder.Eval(Container.DataItem, "ScoreID")%>'></asp:Label> 
                                                            </ItemTemplate> 
                                                            <ItemStyle VerticalAlign="Top" /> 
                                                            <HeaderStyle ForeColor="#192666" Font-Bold="True" /> 
                                                        </telerik:GridTemplateColumn> 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 09 Nov 2009, 09:32 AM
Hello,

Attach the OnRowSelected event to RadGrid and access the RadComboBox/Label clientside object using findControl() method to show it.

JavaScript:
 
function OnRowSelected(sender, eventArgs) { 
        var radComboBox1 = eventArgs.get_gridDataItem().findControl("RadComboBox_ScoreName"); 
        // Set the visibility 
    } 

Checkout the following link to know more about most important methods of the client-side RadComboBox object:
Client-Side Basics
RadComboBox object



-Shinu.
Tags
Grid
Asked by
kollam2003
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or