RadGrid AllowRowSelect =" True"不使用TextBox? [英] RadGrid AllowRowSelect = "True" Not working with TextBox?

查看:85
本文介绍了RadGrid AllowRowSelect =" True"不使用TextBox?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在RadGrid中,我们没有使用任何EditMode(Batch / EditForms / PopUp)。我们正在使用带有ItemTemplate的TemplateColumn。

我们为Grid中的某些列(我们在ItemTemplate中声明)中的某些列和TextBox提供了标签。

In RadGrid, we are not using any EditMode(Batch/EditForms/PopUp). We are using TemplateColumn with ItemTemplate.
We have Labels for some columns and TextBoxes for some columns in the Grid(which we declared in ItemTemplate).

<telerik:GridTemplateColumnDataField="Product_Name"GroupByExpression="Product_Name Group by Product_Name"
                        UniqueName="Product_Name"InitializeTemplatesFirst="false"HeaderStyle-Width="110"HeaderText="Product Name"HeaderStyle-CssClass="CommonColumns">
                        <HeaderTemplate>
                            <table>
                                <tr>
                                    <tdalign="center">
                                        <asp:LinkButtonID="lnkSortProduct_Name"runat="server"CommandArgument="Product_Name"CommandName="Sort"
                                            Text="Product Name"></asp:LinkButton>
                                    </td>
                                </tr>
                            </table>
                        </HeaderTemplate>
                     
                        <ItemTemplate>
                            <telerik:RadNumericTextBoxID="txtProduct_Name" runat="server"Text='<%#Eval("Product_Name")%>' Width="100px" MaxLength="15" MinValue="-99999999999999" MaxValue="99999999999999" IncrementSettings-InterceptArrowKeys="false" NumberFormat-NegativePattern="(n)" IncrementSettings-InterceptMouseWheel="false" NumberFormat-DecimalDigits="0"  onchange="javascript:showMsg=true;" CssClass="RightAlign"  önkeydown = "return (event.keyCode!=13);" >                                
                            </telerik:RadNumericTextBox>
                        </ItemTemplate>
                        <ItemStyleHorizontalAlign="Left"/>
                    </telerik:GridTemplateColumn>





标签栏:



Label Column:

<telerik:GridTemplateColumnDataField="Product Code"GroupByExpression="Product Code Group by Product Code"SortExpression="Product Code"
    UniqueName="Product Code"InitializeTemplatesFirst="false"HeaderStyle-Width="70"
    HeaderText="Product Code"HeaderStyle-CssClass="CommonColumns">
    <HeaderTemplate>
        <table>
            <tr>
                <tdalign="center">
                    <asp:LinkButtonID="lnkSortProduct Code"runat="server"CommandArgument="Product Code"CommandName="Sort"
                        Text="Product Code"></asp:LinkButton>
                </td>
            </tr>
        </table>
    </HeaderTemplate>
 
    <ItemTemplate>
        <asp:LabelID="lblProduct Code"runat="server"Text='<%#Eval("Product Code")%>'></asp:Label>
    </ItemTemplate>
    <ItemStyleHorizontalAlign="Left"/>
</telerik:GridTemplateColumn>







我们的要求是:



突出显示所选行,我们在客户端设置中放置了AllowRowSelect =True属性 - ><选择AllowRowSelect =true/> ;.



对于标签,我们将选中行突出显示,但是如果我们点击TextBox特定的选定行没有突出显示。



因此,我们找不到选定的RadGrid行。




Our requirement is:

Highlight the Selected Row, we have placed "AllowRowSelect="True" property in the Client Settings -- > <Selecting AllowRowSelect="true" />.

For Labels we are getting Selected Row Highlighted, But if we click on the TextBox the particular selected row not getting Highlighted.

In this reason, we are unable find the Selected RadGrid Row.

推荐答案

http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-rows-not-selected-on-textbox- click.aspx [ ^ ]


这篇关于RadGrid AllowRowSelect =&quot; True&quot;不使用TextBox?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆