Checkbox is not clickable/accessible.

2 posts, 0 answers
  1. Peter
    Peter avatar
    2 posts
    Member since:
    May 2017

    Posted 08 Jun 2017 Link to this post

    Hi, I'm trying to make my Checkbox clickable if that's a word.. I am having trouble because when I try to change it into a <telerik:GridTemplateColumn> with a the ItemTemplate stuff data does not get fetched from the server. To clear it up when I change it to a TemplateColumn the data from the server does not transfer and the checkboxes ARE clickable but checks do not appear where they should be. What I want is the checkboxes to appear as "clickable" and data appears where it should be, and also when a checkbox is checked the data will go to the SQL server. Sorry, if I'm asking for too much.... I'm still learning.:)

     

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
     
    <!DOCTYPE html>
     
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
         <telerik:RadGrid ID="CGRUnPaidFees2017" runat="server" AllowAutomaticInserts="True" CGRUnPaidFees2017_Init="true" OnItemDeleted="CGRUnPaidFees2017_ItemDeleted" OnItemInserted="CGRUnPaidFees2017_ItemInserted"
                OnItemUpdated="CGRUnPaidFees2017_ItemUpdated" OnPreRender="CGRUnPaidFees2017_PreRender" AllowAutomaticUpdates="True" AllowPaging="True"
                AutoGenerateColumns="True" DataSourceID="UnPaidFees2017" Height="945px" Width="1380px">
    <GroupingSettings CollapseAllTooltip="Collapse all groups" CaseSensitive="False"></GroupingSettings>
        <SortingSettings EnableSkinSortStyles="False" />
     
    <ExportSettings ExportOnlyData="True"></ExportSettings>
     
        <ClientSettings>
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="Paid" DataSourceID="UnPaidFees2017" PageSize="34" AllowFilteringByColumn="True" ShowGroupFooter="True" GridLines="Both">
            <Columns>
                <telerik:GridBoundColumn DataField="School" HeaderButtonType="PushButton" FilterControlAltText="Filter School column" HeaderText="School" SortExpression="School" UniqueName="School">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Student_Matric" HeaderButtonType="PushButton" FilterControlAltText="Filter Student_Matric column" HeaderText="Student_Matric" SortExpression="Student_Matric" UniqueName="Student_Matric" DataType="System.Double">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Name" HeaderButtonType="PushButton" FilterControlAltText="Filter Name column" HeaderText="Name" SortExpression="Name" UniqueName="Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Fee_Amount" HeaderButtonType="PushButton" FilterControlAltText="Filter Fee_Amount column" HeaderText="Fee_Amount" SortExpression="Fee_Amount" UniqueName="Fee_Amount" DataType="System.Double">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Fee" FilterControlAltText="Filter Fee column" HeaderButtonType="PushButton" HeaderText="Fee" SortExpression="Fee" UniqueName="Fee">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Date_Issued" DataType="System.DateTime" HeaderButtonType="PushButton" FilterControlAltText="Filter Date_Issued column" HeaderText="Date_Issued" SortExpression="Date_Issued" UniqueName="Date_Issued">
                </telerik:GridBoundColumn>
                <telerik:GridCheckboxColumn DataField="Paid" FilterControlAltText="Filter Paid column" HeaderText="Paid" HeaderButtonType="PushButton" SortExpression="Paid" UniqueName="Paid" AutoPostBackOnFilter="True">
                </telerik:GridCheckboxColumn>
            </Columns>
            <EditFormSettings>
             
            </EditFormSettings>
        </MasterTableView>
     
        <FilterItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
     
        <PagerStyle PageSizes="30;60;90;120" PageButtonCount="30" />
     
    </telerik:RadGrid>
             <asp:SqlDataSource ID="UnPaidFees2017" runat="server" ConnectionString="<%$ ConnectionStrings:pedrolConnectionString %>"
                    SelectCommand="SELECT School, [Student Matric] AS Student_Matric, Name, [Fee Amount] AS Fee_Amount, Fee, [Date Issued] AS Date_Issued, Paid FROM UnPaidFees2017"
                    UpdateCommand="UPDATE UnPaidFees2017 SET Paid = @Paid" OnSelecting="UnPaidFees2017_Selecting" InsertCommand="INSERT INTO UnPaidFees2017(Paid) VALUES (@Paid)">
                  <InsertParameters>
                      <asp:Parameter Name="Paid" Type="Boolean" />
                  </InsertParameters>
              
                  <UpdateParameters>
                      <asp:Parameter Name="Paid" Type="Boolean" />
                  </UpdateParameters>
              
             </asp:SqlDataSource>
        </div>
        </form>
    </body>
    </html>

     

    I know there's a bunch of junk in my <telerik:RadGrid /> I was trying to solve my issue and couldn't, let me know if you need more info, I'll send whatever I can.

  2. Peter
    Peter avatar
    2 posts
    Member since:
    May 2017

    Posted 08 Jun 2017 in reply to Peter Link to this post

    Nevermind, I solved it! Thanks
Back to Top