assembly "DevExpress.Web.v11.1 - Version=11.1.8.0"
Problem: 'grdPopLC' go to CustomCallback, return with 4 rows but ASPxGridview show nothing
this call my ASPxPopupControl and populate controls inside him
JavaScriptfunction btnLancDescritivoConceito_click(ID_A){
popLancDescritivoConceito.Show();
setTimeout(function(){cbpPopLDC_head.PerformCallback(ID_A);},300);
setTimeout(function(){cbpDsAvaliacaoDescritiva.PerformCallback(ID_A+';Carregar');},400);
setTimeout(function(){grdPopLC.PerformCallback(ID_A + ';Carregar'); }, 500);
}
this is my ASPxPopupControl
XAML<dx:ASPxPopupControl ID="popLancDescritivoConceito" runat="server" ClientInstanceName="popLancDescritivoConceito"
Width="950px" MinWidth="450px" MaxWidth="950px" Height="500px" MinHeight="500px" MaxHeight="500px"
HeaderText="Descritivo/Conceito" AllowDragging="True" ShowCloseButton="false" CloseAction="None" Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" LoadContentViaCallback="OnPageLoad">
<ContentCollection>
<dx:PopupControlContentControl ID="popLancDescritivoConceitoContent" runat="server" SupportsDisabledAttribute="false">
<div id="popLDC_head" runat="server" style="float:none;">
<dx:ASPxCallbackPanel ID="cbpPopLDC_head" runat="server" ClientInstanceName="cbpPopLDC_head">
<PanelCollection>
<dx:PanelContent>
<div style="float:left;">
<asp:Label ID="popLDC_lblNmPessoa" runat="server" Width="100%" Font-Size="Medium"></asp:Label>
</div>
<div style="float:left;">
<asp:Label ID="popLDC_lblIdAV" runat="server" Visible="false" Enabled="true"></asp:Label>
</div>
</dx:PanelContent>
</PanelCollection>
</dx:ASPxCallbackPanel>
<img alt="popLDC_div_head" src="..somewhere" width="100%" />
</div>
<div id="popLDC_body_R" runat="server" style="width:500px;margin:12px;float:left;">
<label id="lblDsAvaliacaoDescritiva" runat="server" style="width:100%;height:10px;text-align:left;">Descrição:</label>
<dx:ASPxCallbackPanel ID="cbpDsAvaliacaoDescritiva" ClientInstanceName="cbpDsAvaliacaoDescritiva" runat="server">
<PanelCollection>
<dx:PanelContent ID="cbpDsAvaliacaoDescritivaContent" runat="server">
<dx:ASPxMemo ID="memoDsAvaliacaoDescritiva" runat="server" ClientInstanceName="memoDsAvaliacaoDescritiva" AutoPostBack="false" Width="100%" Height="400px">
</dx:ASPxMemo>
</dx:PanelContent>
</PanelCollection>
</dx:ASPxCallbackPanel>
</div>
<div id="popLDC_body_L" runat="server" style="width:400px;float:left;padding-top:26px;">
<dx:ASPxGridView ID="grdPopLC" ClientInstanceName="grdPopLC" runat="server" KeyFieldName="ID_B" ViewStateMode="Disabled">
<Columns>
<dx:GridViewDataTextColumn FieldName="ID_B" Visible="false" VisibleIndex="-1" ReadOnly="true" ShowInCustomizationForm="true">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn Caption="Pergunta" FieldName="DS_B" Width="350px" ShowInCustomizationForm="True" VisibleIndex="0" ReadOnly="true" >
<Settings AllowDragDrop="False" AllowSort="False" AllowGroup="False" AllowHeaderFilter="False" />
<CellStyle HorizontalAlign="Left" Wrap="true">
</CellStyle>
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn Caption="Conceito" FieldName="ID_C" Visible="true" VisibleIndex="1">
</dx:GridViewDataTextColumn>
</Columns>
</dx:ASPxGridView>
</div>
<div runat="server" style="width:100%;float:left;">
<img alt="popLDC_div_btn" src="..somewhere" width="100%" />
<div style="margin:5px;float:right;">
<div style="float:left;margin:5px;">
<dx:ASPxButton ID="btnPopLDC_confirmar" ClientInstanceName="btnPopLDC_confirmar" runat="server" Text="Confirmar" ToolTip="Confirmar conceito/descrição" Width="100px" AutoPostBack="false">
<ClientSideEvents Click="function(s,e){cbpDsAvaliacaoDescritiva.PerformCallback('Salvar'); grdPopLC.PerformCallback('Salvar');popLancDescritivoConceito.Hide();}" />
</dx:ASPxButton>
</div>
<div style="float:left;margin:5px;">
<dx:ASPxButton ID="btnPopLDC_cancelar" ClientInstanceName="btnPopLDC_cancelar" runat="server" Text="Cancelar" ToolTip="Cancelar edição" Width="100px" AutoPostBack="false">
<ClientSideEvents Click="function(s,e){cbpDsAvaliacaoDescritiva.PerformCallback('Cancelar');grdPopLC.PerformCallback('Cancelar');popLancDescritivoConceito.Hide();}" />
</dx:ASPxButton>
</div>
</div>
</div>
</dx:PopupControlContentControl>
</ContentCollection>
</dx:ASPxPopupControl>
The ASPxGridView 'CustomCallback' final
C#var anonLst = from DataRow eRow in Tabela.Rows
where eRow["ID_A"] != DBNull.Value &&
Convert.ToInt32(eRow["ID_A"]) == idAV
select new{
idFAPV = eRow["ID_B"] != DBNull.Value
? Convert.ToInt32(eRow["ID_B"])
: 0,
dsFAP = eRow["DS_B"] != DBNull.Value
? eRow["DS_B"].ToString()
: string.Empty,
idFACV = eRow["ID_C"] != DBNull.Value
? Convert.ToInt32(eRow["ID_C"])
: 0
};
DataTable repositorio;
repositorio = new DataTable("Table_name");
repositorio.Columns.Add(new DataColumn("ID_B", typeof(int)));
repositorio.Columns.Add(new DataColumn("DS_B", typeof(string)));
repositorio.Columns.Add(new DataColumn("ID_C", typeof(int)));
foreach (var item in anonLst)
{
repositorio.Rows.Add(item.idFAPV,
item.dsFAP,
item.idFACV);
}
repositorio.AcceptChanges();
grdPopLC.DataSource = repositorio;
grdPopLC.DataBind();
At 'grdPopLC.DataSource = repositorio;', repositorio has data, 4 rows, but on client nothing appear