简体   繁体   中英

Enable only check-box click event

http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/selecting/row-selection/defaultcs.aspx

I have functionality similar like this but instead I have used grid in which every items are in cell . But in this functionality I want the checkbox should only be selected when it is clicked on checkbox not anywhere except it . How can I achieve it?

As the documentation states, you would simply set the following to false:

ClientSettings.Selecting.AllowRowSelect = false;

The sample code provided:

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

The information can be found here . The use that property to trigger an event which selects your checkbox, you would disable that and allow the checkbox to run independantly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM