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

Grid with checkbox

0 Answers 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Susi
Top achievements
Rank 1
Susi asked on 02 Jul 2012, 05:15 AM
Dear All,

        We are developing product in asp.net using c sharp in 4-tier architecture namely DataAccessLayer,BusinessLayer,ServiceLayer and PresentationLayer.How to bind multiple Roles and RoleFeaures in RadGrid and here Roles are parent and rolefeature are child when i click or expand roles,list of role feature should be display also Every role have rolefeatures and user can be assign and un-assign role features to particular Role by Checkbox.
    Here i have three methods are selectRoles,selectRoleFeatures and Assign-UnassginRoleFeatures which is allocated to particular user.
how to implement this which kind of grid suitable for this and what is code to aspx and aspx.cs pages..


My aspx page code is
 
 <telerik:RadGrid ID="Roles" runat="server" AutoGenerateColumns="false">
        <MasterTableView DataKeyNames="ID">
        <Columns>
        <telerik:GridTemplateColumn UniqueName="Name" HeaderText="Name">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("Name") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="Description" HeaderText="Description">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("Description") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="StatusName" HeaderText="StatusName">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("StatusName") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="ParentRoleId" HeaderText="ParentRoleId">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("ParentRoleId") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
        </Columns>
        </MasterTableView>
        </telerik:RadGrid>
 
         <telerik:RadGrid ID="RoleFeature" runat="server" AutoGenerateColumns="false">
        <MasterTableView DataKeyNames="ID">
        <Columns>
        <telerik:GridTemplateColumn UniqueName="Name" HeaderText="Name">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("Name") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="Description" HeaderText="Description">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("Description") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="StatusName" HeaderText="StatusName">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("StatusName") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="ParentRoleFeatureId" HeaderText="ParentRoleFeatureId">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("ParentRoleFeatureId") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
        </Columns>
        </MasterTableView>
        </telerik:RadGrid>
My aspx.cs code is
protected void Page_Load(object sender, EventArgs e)
      {
          if (!Page.IsPostBack)
          {
              ApplicationProcess a = new ApplicationProcess();
              Roles.DataSource = a.GetRoles();
              Roles.DataBind();
 
              RoleFeature.DataSource = a.GetRoleFeatures(1);
              RoleFeature.DataBind();
          }
 
      }

Thanks in Advance..!

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Susi
Top achievements
Rank 1
Share this question
or