Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="servDiv" style="display:block;overflow-y: auto; height:350px; " runat="server" ClientIDMode="static">
- <it:GridViewControl ID="gvOperations" runat="server" AutoGenerateColumns="false" IsResponsive="true" CssClass="table table-resp-to1199 inside-table table-align-middle cheque-table" EmptyDataText="<%$FrontEndResources:TRX01202,NoOperationsInfo%>"
- GridLines="None" AllowsTopAnchor="true" EnableRowClicks="false" OnRowDataBound="gvOperations_RowDataBound" DataKeyNames="TransactionId,TransactionDescription">
- <Columns>
- <asp:BoundField Visible="false" DataField="TransactionId" />
- <asp:TemplateField HeaderText="<%$FrontEndResources:TRX01202,IncludeService%>" HeaderStyle-CssClass="col-xs-1 col-sm-1 col-md-1 col-lg-1 text-center" ItemStyle-CssClass="col-xs-1 col-sm-1 col-md-1 col-lg-1 text-center">
- <ItemTemplate>
- <div id="addService" runat="server" class="big-checkbox" style=" margin-top: -13px; float: right; margin-bottom: 32px;">
- <input id="chkServices" runat="server" type="checkbox" />
- <label id="ServiceBox" runat="server"></label>
- </div>
- </ItemTemplate>
- </asp:TemplateField>
- </Columns>
- </it:GridViewControl>
- </div>
- protected void gvOperations_RowDataBound(object sender, GridViewRowEventArgs e)
- {
- if (e == null) return;
- if (e.Row.RowType == DataControlRowType.DataRow)
- {
- var addService = e.Row.FindControl("addService") as HtmlControl;
- var chkServices = e.Row.FindControl("chkServices") as HtmlInputCheckBox;
- ProfileTransactionDetail trx = e.Row.DataItem as ProfileTransactionDetail;
- if (trx.CanChange && trx.CanExecute)
- chkServices.Checked = true;
- addService.Visible = true;
- addService.Attributes.Add("OnClick", sb2.ToString());
- /// Bug:18472
- if (outCorporateUser != null)
- {
- if (!outCorporateUser.AllServices)
- {
- var trxDetail = outCorporateUser.Services.FirstOrDefault(s => s.TransactionId == trx.TransactionId);
- if (trxDetail != null)
- chkServices.Checked = trxDetail.CanExecute;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment