I have four checkboxes such as for Add
, Edit
, View
and Delete
. which is inside gridview
Now I have a table named (WMS_menu_rights)
where I want to store this values as
checked:- Y
Not checked: N.
I want to assign respective rights to the respective USERS on button click.
Here is my gridview image which somethings looks like below
Here is my HTML of the gridview:-
<cc2:Grid ID="GrdRights" runat="server" FolderStyle="../Styles/Grid/style_12"
AllowSorting="False" AutoGenerateColumns="False" AllowColumnResizing="true" AllowAddingRecords="false"
AllowMultiRecordSelection="true" OnRowDataBound="GrdRights_RowDataBound" ViewStateMode="Enabled"
PageSize="100">
<ClientSideEvents OnClientSelect="FunMonthList" />
<ScrollingSettings ScrollHeight="400px" />
<Columns>
<cc2:Column ID="Column1" DataField="MKEY" ShowHeader="false" HeaderText="Select" ReadOnly="true"
Width="5%" runat="server">
<TemplateSettings TemplateId="TemplateWithCheckbox" />
</cc2:Column>
<cc2:Column ID="Column2" DataField="parent_menu" HeaderText="MENU" Visible="true"
ReadOnly="true" Width="10%" runat="server">
</cc2:Column>
<cc2:Column ID="Column4" DataField="child_menu_mkey" Visible="false" ReadOnly="true"
Width="10%" runat="server">
</cc2:Column>
<cc2:Column ID="Column3" DataField="child_menu" HeaderText="SUB MENU" runat="server"
Visible="true" Width="30%">
</cc2:Column>
<cc2:Column ID="Column5" DataField="MKEY" ShowHeader="false" HeaderText="Select" ReadOnly="true" Width="5%" runat="server">
<TemplateSettings TemplateId="TemplateWithCheckbox" />
</cc2:Column>
<cc2:CheckBoxColumn Id="chkAdd" DataField="ADD_FLAG" ShowHeader="true" HeaderText="Add"
Width="5%" runat="server" Align="right">
<TemplateSettings TemplateId="TemplateWithChecAdd" />
</cc2:CheckBoxColumn>
<cc2:CheckBoxColumn Id="chkEdit" DataField="MODIFY_FLAG" ShowHeader="true" HeaderText="Edit"
Width="5%" runat="server" Align="right">
<TemplateSettings TemplateId="TemplateWithChecEdit" />
</cc2:CheckBoxColumn>
<cc2:CheckBoxColumn Id="ChkView" DataField="VIEW_FLAG" ShowHeader="true" HeaderText="View"
Width="6%" runat="server" Align="right">
<TemplateSettings TemplateId="TemplateWithChecView" />
</cc2:CheckBoxColumn>
<cc2:CheckBoxColumn Id="ChkDelete" DataField="DEL_FLAG" ShowHeader="true" HeaderText="Delete"
Width="8%" runat="server" Align="right">
<TemplateSettings TemplateId="TemplateWithChecDelete" />
</cc2:CheckBoxColumn>
</Columns>
<Templates>
<cc2:GridTemplate ID="TemplateWithCheckbox">
<Template>
<asp:CheckBox runat="server" ID="ChkID" OnCheckedChanged="ChkID_CheckedChanged" ToolTip="<%# Container.Value %>" />
</Template>
</cc2:GridTemplate>
<cc2:GridTemplate ID="TemplateWithChecAdd">
<Template>
<asp:CheckBox runat="server" ID="ChkIDAdd" ToolTip="<%# Container.Value %>" />
</Template>
</cc2:GridTemplate>
<cc2:GridTemplate ID="TemplateWithChecView">
<Template>
<asp:CheckBox runat="server" ID="ChkIDView" ToolTip="<%# Container.Value %>" />
</Template>
</cc2:GridTemplate>
<cc2:GridTemplate ID="TemplateWithChecEdit">
<Template>
<asp:CheckBox runat="server" ID="ChkIDEdit" ToolTip="<%# Container.Value %>" />
</Template>
</cc2:GridTemplate>
<cc2:GridTemplate ID="TemplateWithChecDelete">
<Template>
<asp:CheckBox runat="server" ID="ChkIDDelete" ToolTip="<%# Container.Value %>" />
</Template>
</cc2:GridTemplate>
</Templates>
</cc2:Grid>
Now how to write the code for this, that it should SAVE and assign the respective rights
Aucun commentaire:
Enregistrer un commentaire