______________________________________
.JS
______________________________________
function ObtieneFocoYValoresGrilla(s, e) {
gvDetPago.PerformCallback("FOCO," + gvDetPago.GetFocusedRowIndex());
gvDetPago.GetRowValues(gvDetPago.GetFocusedRowIndex(), 'cod_tipo_cuota;cod_concepto;Moneda', OnGetRowValues);
}
function OnGetRowValues(values) {
gvDetPago.PerformCallback("FOCOVALUESGRID," + gvDetPago.GetFocusedRowIndex() + ","+ values);
}
______________________________________
.ASPX
______________________________________
<dx:ASPxGridView ID="gvDetPago" runat="server" Width="100%" CssClass="margenGrillaCentro"
AutoGenerateColumns="False" ClientInstanceName="gvDetPago" KeyFieldName="operacion;cod_tipo_cuota;num_cuota;cod_concepto;correlativo">
<ClientSideEvents EndCallback="function(s, e){EndCallGrid(s, e);}"
FocusedRowChanged="ObtieneFocoYValoresGrilla"
CustomButtonClick="function(s, e) {
if (e.buttonID == 'upd')
{
if (confirm('¿Desea Grabar?'))
{
s.UpdateEdit();
}
}
}" />
<%--<SettingsBehavior AllowFocusedRow="True" AllowDragDrop="false" ConfirmDelete="true" AllowSort="False" />--%>
<SettingsBehavior AllowSort="False" AllowDragDrop="False" AllowFocusedRow="True"
ColumnResizeMode="Control" ConfirmDelete="True" />
<SettingsPager Visible="True" Mode="ShowPager" PageSize="5" Position="Bottom" />
<SettingsEditing Mode="PopupEditForm" PopupEditFormHorizontalAlign="Center" PopupEditFormShowHeader="True"
PopupEditFormVerticalAlign="Middle" PopupEditFormWidth="500px" />
<Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="150" ShowHorizontalScrollBar="true"
ShowFooter="True" />
<SettingsText ConfirmDelete="¿Está seguro que desea eliminar este registro?" PopupEditFormCaption="Ingreso y Edición de Valores" />
<TotalSummary>
<dx:ASPxSummaryItem SummaryType="Sum" FieldName="PagadoCuotaPeso" DisplayFormat="Total Cuota: {0:N0} "
ShowInColumn="Operación"></dx:ASPxSummaryItem>
<dx:ASPxSummaryItem SummaryType="Sum" FieldName="interes_mora" DisplayFormat="Total Interes Mora: {0:N0} "
ShowInColumn="Operación"></dx:ASPxSummaryItem>
<dx:ASPxSummaryItem SummaryType="Sum" FieldName="total_pagado" DisplayFormat="Total Pagado: {0:N0} "
Tag="tot" ShowInColumn="Operación"></dx:ASPxSummaryItem>
</TotalSummary>
<Columns>
<dx:GridViewCommandColumn VisibleIndex="0" ButtonType="Image" CellStyle-Font-Size="9px"
Caption=" " Width="50px">
<EditButton Text="Editar" Visible="true" Image-Url="../../../Style/img/botones/pencil_small.png">
<Image Url="../../../Style/img/botones/pencil_small.png" />
<Image Url="../../../Style/img/botones/pencil_small.png">
</Image>
</EditButton>
<CancelButton Text="Cancelar" Visible="true" Image-Url="../../../Style/img/botones/stop.png">
<Image Url="../../../Style/img/botones/stop.png">
</Image>
</CancelButton>
<UpdateButton Text="Grabar" Visible="True" Image-Url="../../../Style/img/botones/save.png">
<Image Url="../../../Style/img/botones/save.png">
</Image>
</UpdateButton>
<DeleteButton Visible="true" Text="Eliminar" Image-Url="../../../Style/img/botones/remove_minus_sign_small.png">
<Image Url="../../../Style/img/botones/remove_minus_sign_small.png" />
</DeleteButton>
<CellStyle Font-Size="9px">
</CellStyle>
</dx:GridViewCommandColumn>
<%-- <dx:GridViewDataTextColumn Caption="Operación" FieldName="operacion" Visible="true"
Width="70px" VisibleIndex="1" CellStyle-HorizontalAlign="Left" EditCellStyle-HorizontalAlign="Left"
ReadOnly="false">
<PropertiesTextEdit Width="150px">
<ClientSideEvents KeyDown="SoloNumeros2" GotFocus="NoCopyPaste" LostFocus="SiCopyPaste"
ValueChanged="function(s, e){ cbckPage.PerformCallback('R,' + s.GetValue()) }" />
</PropertiesTextEdit>
<DataItemTemplate>
<dx:ASPxLabel ID="txbOp" Width="70px" ClientInstanceName="txbOp" runat="server" Text='<%# Bind("operacion")%>'>
</dx:ASPxLabel>
</DataItemTemplate>
<CellStyle HorizontalAlign="Left">
</CellStyle>
</dx:GridViewDataTextColumn>--%>
<dx:GridViewDataTextColumn Caption="Operación" FieldName="operacion" VisibleIndex="1"
Visible="true" EditCellStyle-HorizontalAlign="Right" CellStyle-HorizontalAlign="Right"
HeaderStyle-HorizontalAlign="Right" ReadOnly="false">
<EditCellStyle HorizontalAlign="Right">
</EditCellStyle>
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
<CellStyle HorizontalAlign="Right">
</CellStyle>
<DataItemTemplate>
<dx:ASPxLabel ID="txbOp" ClientInstanceName="txbOp" runat="server" Text='<%# Bind("operacion")%>'>
</dx:ASPxLabel>
</DataItemTemplate>
<EditItemTemplate>
<dx:ASPxTextBox ID="txtOperacion" Text='<%# Bind("operacion")%>' runat="server" MaxLength="12"
DisplayFormatInEditMode="True" HorizontalAlign="Right">
<ClientSideEvents KeyDown="SoloNumeros2" GotFocus="NoCopyPaste" LostFocus="SiCopyPaste"
ValueChanged="function(s, e){ cbckPage.PerformCallback('R,' + s.GetValue()) }" />
</dx:ASPxTextBox>
</EditItemTemplate>
<PropertiesTextEdit Style-HorizontalAlign="Right">
<Style HorizontalAlign="Right"></Style>
</PropertiesTextEdit>
</dx:GridViewDataTextColumn>
<%-- <dx:GridViewDataComboBoxColumn Caption="Tipo Cta." FieldName="cod_tipo_cuota" EditCellStyle-HorizontalAlign="Left"
CellStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" VisibleIndex="2"
ReadOnly="false" Width="120px">
<PropertiesComboBox Width="150px" ValueType="System.String" TextField="desc_valor"
ValueField="valor" DataSourceID="objTipoCuota">
<ClientSideEvents ValueChanged="function(s, e){ cbckPage.PerformCallback('TC,' + s.GetValue()); }" />
</PropertiesComboBox>
<EditCellStyle HorizontalAlign="Left">
</EditCellStyle>
<HeaderStyle HorizontalAlign="Left"></HeaderStyle>
<CellStyle HorizontalAlign="Left">
</CellStyle>
</dx:GridViewDataComboBoxColumn>--%>
<dx:GridViewDataComboBoxColumn Caption="Tipo Cta." FieldName="cod_tipo_cuota" EditCellStyle-HorizontalAlign="Left"
CellStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" VisibleIndex="2"
ReadOnly="false" Width="120px">
<%--<DataItemTemplate>
<dx:ASPxComboBox ID="cbxTipoCuota0" ClientInstanceName="cbxTipoCuota0" ValueField="valor"
SelectedIndex="0" DataSourceID="objTipoCuota" TextField="desc_valor" ValueType="System.String"
runat="server" Width="100px" HorizontalAlign="Right" Enabled="False" >
</dx:ASPxComboBox>
</DataItemTemplate>--%>
<EditItemTemplate>
<dx:ASPxComboBox ID="cbxTipoCuota" ClientInstanceName="cbxTipoCuota" ValueField="valor"
DataSourceID="objTipoCuota" TextField="desc_valor" ValueType="System.String"
runat="server" Width="150px" HorizontalAlign="Right">
<ClientSideEvents ValueChanged="function(s, e){ cbckPage.PerformCallback('TC,' + s.GetValue()); }" />
</dx:ASPxComboBox>
</EditItemTemplate>
<PropertiesComboBox Width="150px" ValueType="System.String" TextField="desc_valor"
ValueField="valor" DataSourceID="objTipoCuota">
<ClientSideEvents ValueChanged="function(s, e){ cbckPage.PerformCallback('TC,' + s.GetValue()); }" />
</PropertiesComboBox>
<EditCellStyle HorizontalAlign="Left">
</EditCellStyle>
<HeaderStyle HorizontalAlign="Left"></HeaderStyle>
<CellStyle HorizontalAlign="Left">
</CellStyle>
</dx:GridViewDataComboBoxColumn>
<dx:GridViewDataTextColumn Caption="Corr." FieldName="correlativo_origen" Width="100"
EditCellStyle-HorizontalAlign="Left" CellStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"
VisibleIndex="3" ReadOnly="false">
<EditCellStyle HorizontalAlign="Left">
</EditCellStyle>
<HeaderStyle HorizontalAlign="Left"></HeaderStyle>
<CellStyle HorizontalAlign="Right">
</CellStyle>
<DataItemTemplate>
<dx:ASPxLabel ID="lblCorrelativo" ClientInstanceName="lblCorrelativo" runat="server"
Text='<%# Bind("correlativo_origen")%>'>
</dx:ASPxLabel>
</DataItemTemplate>
<EditItemTemplate>
<dx:ASPxSpinEdit ID="txbCorrelativo" ClientInstanceName="txbCorrelativo" runat="server"
Width="150px" Text='<%# Bind("correlativo_origen") %>' MinValue="0" MaxValue="2147483647"
MaxLength="10" NullText="0" HorizontalAlign="Right" DecimalPlaces="0" SpinButtons-ShowIncrementButtons="false"
SpinButtons-ShowLargeIncrementButtons="false">
</dx:ASPxSpinEdit>
</EditItemTemplate>
</dx:GridViewDataTextColumn>
<%-- <dx:GridViewDataTextColumn Caption="Corr." FieldName="correlativo_deuda" Width="100"
EditCellStyle-HorizontalAlign="Left" CellStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"
VisibleIndex="3" ReadOnly="false">
<EditCellStyle HorizontalAlign="Left">
</EditCellStyle>
<HeaderStyle HorizontalAlign="Left"></HeaderStyle>
<CellStyle HorizontalAlign="Right">
</CellStyle>
<DataItemTemplate>
<dx:ASPxLabel ID="lblCorrelativo" ClientInstanceName="lblCorrelativo" runat="server"
Text='<%# Bind("correlativo_deuda")%>'>
</dx:ASPxLabel>
</DataItemTemplate>
<EditItemTemplate>
<dx:ASPxSpinEdit ID="txbCorrelativo" ClientInstanceName="txbCorrelativo" runat="server"
Width="150px" Text='<%# Bind("correlativo_deuda") %>' MinValue="0" MaxValue="2147483647"
MaxLength="10" NullText="0" HorizontalAlign="Right" DecimalPlaces="0" SpinButtons-ShowIncrementButtons="false"
SpinButtons-ShowLargeIncrementButtons="false">
</dx:ASPxSpinEdit>
</EditItemTemplate>
</dx:GridViewDataTextColumn>--%>
<dx:GridViewDataTextColumn Caption="Cuota" Width="80" FieldName="num_cuota" EditCellStyle-HorizontalAlign="Left"
CellStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" VisibleIndex="4"
ReadOnly="false">
<EditCellStyle HorizontalAlign="Right">
</EditCellStyle>
<EditItemTemplate>
<dx:ASPxSpinEdit ID="txbnumcuota" ClientInstanceName="txbnumcuota" runat="server"
MinValue="0" MaxValue="32767" MaxLength="5" HorizontalAlign="Right" DecimalPlaces="0"
SpinButtons-ShowIncrementButtons="false" SpinButtons-ShowLargeIncrementButtons="false"
NullText="0" Width="150px" Text='<%# Bind("num_cuota")%>' ReadOnly='<%# (Eval("cod_concepto") != null && Eval("cod_concepto").ToString() == "95" )? true : false %>'>
<ClientSideEvents ValueChanged="function(s, e){ cbckPage.PerformCallback('NC,' + s.GetValue()); }" />
</dx:ASPxSpinEdit>
</EditItemTemplate>
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
<CellStyle HorizontalAlign="Right">
</CellStyle>
</dx:GridViewDataTextColumn>
<dx:GridViewDataComboBoxColumn Caption="Concepto" FieldName="cod_concepto" VisibleIndex="5"
EditCellStyle-HorizontalAlign="Left" Width="150px" CellStyle-Wrap="True" CellStyle-HorizontalAlign="Center"
HeaderStyle-Wrap="True" HeaderStyle-HorizontalAlign="Center">
<EditItemTemplate>
<dx:ASPxComboBox ID="cbxConcepto" Width="150px" DataSourceID="objConceptos" runat="server"
TextField="descripcion" ValueField="cod_concepto" ValueType="System.String" IncrementalFilteringMode="StartsWith">
<ClientSideEvents ValueChanged="function(s, e){ cbckPage.PerformCallback('CC,' + s.GetValue()); }" />
</dx:ASPxComboBox>
</EditItemTemplate>
<PropertiesComboBox Width="150px" DataSourceID="objConceptos" TextField="descripcion"
ValueField="cod_concepto" IncrementalFilteringMode="StartsWith">
<ClientSideEvents ValueChanged="function(s, e){ cbckPage.PerformCallback('CC,' + s.GetValue()); }" />
</PropertiesComboBox>
<HeaderStyle HorizontalAlign="Center" Wrap="True"></HeaderStyle>
<CellStyle HorizontalAlign="Center">
</CellStyle>
<EditFormSettings Visible="true" />
</dx:GridViewDataComboBoxColumn>
<dx:GridViewDataDateColumn Caption="Fecha Vcto." FieldName="fecha_vencimiento" VisibleIndex="6"
EditCellStyle-HorizontalAlign="Left" ReadOnly="true">
<DataItemTemplate>
<dx:ASPxLabel ID="txbFechaVcto" ClientInstanceName="txbFechaVcto" runat="server"
DisplayFormatString="{0:dd/MM/yyyy}" Text='<%# Bind("fecha_vencimiento")%>'>
</dx:ASPxLabel>
</DataItemTemplate>
<EditItemTemplate>
<dx:ASPxDateEdit ID="dFechaVcto" ClientInstanceName="dFechaVcto" runat="server" Width="150px"
Date='<%# Convert.ToDateTime(Eval("fecha_vencimiento"))%>' DisplayFormatInEditMode="True"
DisplayFormatString="{0:dd/MM/yyyy}" ClientEnabled="false">
</dx:ASPxDateEdit>
</EditItemTemplate>
<PropertiesDateEdit DisplayFormatString="{0:dd/MM/yyyy}">
</PropertiesDateEdit>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<CellStyle HorizontalAlign="Center">
</CellStyle>
</dx:GridViewDataDateColumn>
<dx:GridViewDataTextColumn Caption="Interés Mora" FieldName="interes_mora" VisibleIndex="7"
Visible="true" EditCellStyle-HorizontalAlign="Right" CellStyle-HorizontalAlign="Right"
HeaderStyle-HorizontalAlign="Right" ReadOnly="false">
<EditCellStyle HorizontalAlign="Right">
</EditCellStyle>
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
<CellStyle HorizontalAlign="Right">
</CellStyle>
<DataItemTemplate>
<dx:ASPxLabel ID="txbInteresMora" ClientInstanceName="txbInteresMora" runat="server"
Text='<%# Bind("interes_mora")%>'>
</dx:ASPxLabel>
</DataItemTemplate>
<EditItemTemplate>
<dx:ASPxTextBox ID="txtInteresMora" Text='<%# Bind("interes_mora")%>' runat="server"
MaxLength="12" DisplayFormatInEditMode="True" DisplayFormatString="N0" HorizontalAlign="Right">
<ClientSideEvents KeyDown="SoloNumeros2" GotFocus="NoCopyPaste" LostFocus="SiCopyPaste"
ValueChanged="function(s, e){ cbckPage.PerformCallback('IM,' + s.GetValue()) }" />
</dx:ASPxTextBox>
</EditItemTemplate>
<PropertiesTextEdit Style-HorizontalAlign="Right">
<Style HorizontalAlign="Right"></Style>
</PropertiesTextEdit>
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn Caption="Monto Cuota" VisibleIndex="8" FieldName="PagadoCuotaPeso"
EditCellStyle-HorizontalAlign="Left" Visible="true" CellStyle-HorizontalAlign="Right"
Width="120" HeaderStyle-HorizontalAlign="Center" ReadOnly="true" PropertiesTextEdit-DisplayFormatString="N0">
<PropertiesTextEdit DisplayFormatString="N2">
</PropertiesTextEdit>
<DataItemTemplate>
<dx:ASPxLabel ID="txbMontoCuota" ClientInstanceName="txbMontoCuota" runat="server"
Text='<%# Bind("PagadoCuotaPeso")%>'>
</dx:ASPxLabel>
</DataItemTemplate>
<EditItemTemplate>
<dx:ASPxTextBox ID="txtMontoCuota" Text='<%# Bind("PagadoCuotaPeso")%>' runat="server"
MaxLength="12" Width="150px" DisplayFormatInEditMode="True" DisplayFormatString="N0"
HorizontalAlign="Left" ClientEnabled="false">
</dx:ASPxTextBox>
</EditItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<CellStyle HorizontalAlign="Right">
</CellStyle>
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn Caption="Total Pagado" VisibleIndex="9" FieldName="total_pagado"
EditCellStyle-HorizontalAlign="Left" Visible="true" PropertiesTextEdit-DisplayFormatInEditMode="true"
PropertiesTextEdit-DisplayFormatString="N2" CellStyle-HorizontalAlign="Right"
Width="125" HeaderStyle-HorizontalAlign="Center" ReadOnly="false">
<DataItemTemplate>
<dx:ASPxLabel ID="txbTotalPagado" ClientInstanceName="txbTotalPagado" runat="server"
Text='<%# Bind("total_pagado")%>'>
</dx:ASPxLabel>
</DataItemTemplate>
<EditItemTemplate>
<dx:ASPxTextBox ID="txbTotalPag" Text='<%# Bind("total_pagado")%>' runat="server"
MaxLength="12" Width="150px" DisplayFormatInEditMode="True" DisplayFormatString="N0"
HorizontalAlign="Right">
<ClientSideEvents ValueChanged="function(s, e){ cbckPage.PerformCallback('TP,' + s.GetValue()); }" />
</dx:ASPxTextBox>
</EditItemTemplate>
<PropertiesTextEdit DisplayFormatInEditMode="True" DisplayFormatString="N0">
</PropertiesTextEdit>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<CellStyle HorizontalAlign="Left">
</CellStyle>
</dx:GridViewDataTextColumn>
<dx:GridViewDataDateColumn Caption="Fecha Pago" FieldName="fecha_pago" VisibleIndex="10"
CellStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" Visible="true"
Width="140px">
<PropertiesDateEdit DisplayFormatString="{0:dd/MM/yyyy}">
</PropertiesDateEdit>
<EditItemTemplate>
<%-- <dx:ASPxDateEdit ID="dFecha" runat="server" ClientEnabled="True" Width="150px" Text='<%# DateTime.Now.ToShortDateString() %>'>--%>
<dx:ASPxDateEdit ID="dFecha" runat="server" ClientEnabled="True" Width="150px" Date='<%# Convert.ToDateTime(Eval("fecha_pago"))%>'>
<ClientSideEvents ValueChanged="function(s, e){ cbckPage.PerformCallback('FP,' + s.GetText()); }" />
</dx:ASPxDateEdit>
</EditItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<CellStyle HorizontalAlign="Center">
</CellStyle>
</dx:GridViewDataDateColumn>
<dx:GridViewDataComboBoxColumn Caption="Moneda" FieldName="Moneda" EditCellStyle-HorizontalAlign="Left"
CellStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" VisibleIndex="11"
ReadOnly="false" Width="100">
<EditItemTemplate>
<dx:ASPxComboBox ID="cbxMonedas" runat="server" TextField="sigla" Width="100" ValueField="cod_moneda"
Value='<%# Bind("Moneda") %>' ClientEnabled="false" DataSourceID="objMonedas"
SelectedIndex="0">
</dx:ASPxComboBox>
</EditItemTemplate>
<PropertiesComboBox ValueType="System.String" TextField="sigla" ValueField="cod_moneda"
DataSourceID="objMonedas">
</PropertiesComboBox>
<EditCellStyle HorizontalAlign="Left">
</EditCellStyle>
<HeaderStyle HorizontalAlign="Left"></HeaderStyle>
<CellStyle HorizontalAlign="Left">
</CellStyle>
</dx:GridViewDataComboBoxColumn>
<dx:GridViewDataTextColumn Caption="Paridad" VisibleIndex="12" FieldName="ParidadPago"
Width="95" Visible="true" CellStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
EditCellStyle-HorizontalAlign="Left" ReadOnly="false">
<EditItemTemplate>
<dx:ASPxTextBox ID="txbParidad" runat="server" ClientEnabled="false" Width="150px"
HorizontalAlign="Right" Text='<%# Bind("ParidadPago") %>'>
</dx:ASPxTextBox>
</EditItemTemplate>
<DataItemTemplate>
<dx:ASPxLabel ID="txbParidadPago" ClientInstanceName="tbxParidadPago" runat="server"
Text='<%# Eval("ParidadPago")%>'>
</dx:ASPxLabel>
</DataItemTemplate>
<PropertiesTextEdit DisplayFormatString="N2" DisplayFormatInEditMode="true">
</PropertiesTextEdit>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<CellStyle HorizontalAlign="Center">
</CellStyle>
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="fecha_ingreso" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="14">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="cod_tipo_moneda" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="15">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="interes_mora_mc" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="16">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="total_pagado_mc" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="17">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="indice_recibo_impreso" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="18">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="num_recibo_cobranza" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="19">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="corre_pago" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="20">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="cod_error" ShowInCustomizationForm="True" Visible="False"
VisibleIndex="21">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="cod_error_facturacion" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="22">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="origen_pago" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="23">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="emisor" ShowInCustomizationForm="True" Visible="False"
VisibleIndex="24">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="num_factura" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="25">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="correlativo_deuda" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="26">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="correlativo" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="27">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="fecha_modificacion" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="28">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="modificacion" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="29">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="num_docum" ShowInCustomizationForm="True" Visible="False"
VisibleIndex="30">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="envio_contab" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="31">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="estado_cierre" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="32">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="estado" ShowInCustomizationForm="True" Visible="False"
VisibleIndex="33">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="estado_facturacion" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="34">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="rut" ShowInCustomizationForm="True" Visible="False"
VisibleIndex="35">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="ValorCuotaMo" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="36">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="IntMoraPe" ShowInCustomizationForm="True" Visible="False"
VisibleIndex="37">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="TipoPagoIni" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="38">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="tasa_pago" ShowInCustomizationForm="True" Visible="False"
VisibleIndex="39">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="monto_deuda_pe" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="40">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="monto_mo_deuda" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="41">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="cod_tipo_pago" ShowInCustomizationForm="True"
Visible="False" VisibleIndex="42">
</dx:GridViewDataTextColumn>
</Columns>
<SettingsBehavior AllowDragDrop="False" AllowFocusedRow="True" ConfirmDelete="True">
</SettingsBehavior>
<Settings ShowVerticalScrollBar="True" VerticalScrollableHeight="150"></Settings>
<Templates>
<StatusBar>
<div align="right">
<table width="260" border="0" cellpadding="0" cellspacing="0">
<tr align="right">
<td>
<dx:ASPxButton ID="btnEvaluar" runat="server" AutoPostBack="false" ToolTip="Evaluar"
CssClass="boton-full" Text="Evaluar" Image-Url="~/img/icon/report_edit.png" Image-UrlHottracked="~/img/icon/report_edit.png"
Image-UrlPressed="~/img/icon/report_edit.png" EnableTheming="false" EnableDefaultAppearance="false"
Cursor="pointer" Visible="True">
<ClientSideEvents Click="function(s, e){ gvDetPago.PerformCallback('Evaluar'); }" />
</dx:ASPxButton>
</td>
<td>
<dx:ASPxButton ID="btnAgregar" VerticalAlign="Middle" AutoPostBack="false" runat="server"
Visible="true" Cursor="pointer" EnableDefaultAppearance="False" Text="Nuevo"
CssClass="boton-full" EnableTheming="False" ToolTip="Añadir una nueva fila" Image-Url="~/img/icon/application_add.png">
<%--<ClientSideEvents Click="function(s, e){ if(1==2){alert('Acción no implementada')}else{if(confirm('¿Desea ingresar un nuevo registro?')){gvDetPago.AddNewRow();}} }" />--%>
<ClientSideEvents Click="function(s, e){ if(1==2){alert('Acción no implementada')}else{if(confirm('¿Desea ingresar un nuevo registro?')){gvDetPago.PerformCallback('ADD');;}} }" />
</dx:ASPxButton>
</td>
<td>
<dx:ASPxButton ID="btnGrabar" runat="server" AutoPostBack="false" ToolTip="Grabar"
CssClass="boton-full" Text="Grabar" Image-Url="~/img/icon/disk.png" Image-UrlHottracked="~/img/icon/disk.png"
Image-UrlPressed="~/img/icon/disk.png" EnableTheming="false" EnableDefaultAppearance="false"
Cursor="pointer">
<ClientSideEvents Click="function(s, e){ Save(s, e); }" />
</dx:ASPxButton>
<%--<dx:ASPxButton ID="btnGrabar" runat="server" AutoPostBack="false" ToolTip="Grabar"
CssClass="boton-full" Text="Grabar" Image-Url="~/img/icon/disk.png" Image-UrlHottracked="~/img/icon/disk.png"
Image-UrlPressed="~/img/icon/disk.png" EnableTheming="false" EnableDefaultAppearance="false"
Cursor="pointer">
<ClientSideEvents Click="function(s, e){ if(confirm('¿Desea Grabar?')){gvDetalle.PerformCallback('Save');} }" />
</dx:ASPxButton>--%>
</td>
</tr>
</table>
</div>
</StatusBar>
</Templates>
<TotalSummary>
</TotalSummary>
</dx:ASPxGridView>
__________________________________________
.ASPX.CS
__________________________________________
void gvDetPago_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e)
{
if (e.Parameters.Split(',')[0].ToUpper() == "FOCOVALUESGRID")
{
var getFocusedRowIndex = e.Parameters.Split(',')[1];
if (getFocusedRowIndex != "-1")
Session["FOCOVALUESGRID"] = e.Parameters.Split(',')[2];
}
if (e.Parameters.Split(',')[0].ToUpper() == "FOCO")
{
var getFocusedRowIndex = e.Parameters.Split(',')[1];
if (getFocusedRowIndex != "-1")
Session["GetFocusedRowIndex"] = getFocusedRowIndex;
}
if (e.Parameters.ToUpper() == "EVALUAR")
{
Evaluar(ref sender);
}
if (e.Parameters.ToUpper() == "ADD")
{
Session["tipo_cuota"] = null;
Session["cod_concepto"] = "1";
var fecha = gvDetPago.VisibleRowCount > 0
? Convert.ToDateTime(gvDetPago.GetRowValues(0, "fecha_pago") ?? DateTime.Now)
: DateTime.Now;
Session["fecha_pago"] = new DateTime(fecha.Year, fecha.Month, fecha.Day);
Session["oper"] = gvDetPago.VisibleRowCount > 0 ? gvDetPago.GetRowValues(0, "operacion") : "0";
Session["tipo_cuota"] = "0";
AddNewRow(ref sender);
gvDetPago.Selection.UnselectAll();
gvDetPago.Selection.SelectRow(gvDetPago.VisibleRowCount - 1);
gvDetPago.DataBind();
Session["FocusedRowIndex"] = gvDetPago.VisibleRowCount - 1; //se captura el foco en session para evitar perdida del mismo cuando el usuario cambia de control editable en el row
}
if (e.Parameters.ToUpper() == "REFRESH")
{
if (Session["PagoDetalle"] != null)
{
gvDetPago.DataSource = Session["PagoDetalle"];
gvDetPago.DataBind();
}
}
}