Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/260.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 仅启用复选框单击事件_C#_Kendo Ui_Kendo Grid - Fatal编程技术网

C# 仅启用复选框单击事件

C# 仅启用复选框单击事件,c#,kendo-ui,kendo-grid,C#,Kendo Ui,Kendo Grid,我有类似的功能,但我使用了网格,其中每个项目都在单元格中。但是在这个功能中,我希望复选框只能在点击复选框时被选中,而不是在除它之外的任何地方。 我怎样才能做到呢 如文档所述,您只需将以下内容设置为false: ClientSettings.Selecting.AllowRowSelect = false; 提供的示例代码: <telerik:RadGrid ID="RadGrid1" runat="server"> <ClientSettings>

我有类似的功能,但我使用了网格,其中每个项目都在单元格中。但是在这个功能中,我希望复选框只能在点击复选框时被选中,而不是在除它之外的任何地方。
我怎样才能做到呢

如文档所述,您只需将以下内容设置为false:

ClientSettings.Selecting.AllowRowSelect = false;
提供的示例代码:

  <telerik:RadGrid ID="RadGrid1" runat="server">
    <ClientSettings>
      <Selecting AllowRowSelect="True" />
    </ClientSettings>
    <SelectedItemStyle BackColor="Fuchsia" BorderColor="Purple" BorderStyle="Dashed"
      BorderWidth="1px" />
  </telerik:RadGrid>

可以找到这些信息。如果使用该属性触发选择复选框的事件,您将禁用该属性并允许复选框独立运行。

在我的情况下,不会选择整行,但如果您单击复选框所在的单元格,复选框将被选中,则只允许单击复选框。