I receive a status value that can be 20 or 90. Depending on the state, I decide whether to show the html or not.
So far I was doing it with #Eval('Estado')
and I was not giving any problem. The headaches have come when I have found the page ... the second page shows empty!
By discarding (commenting) the problem is in the eval.
Therefore, is there an alternative to call that data and condition the printing of HTML?
The goal of this is that I need to show the buttons only in case the condition described above is fulfilled.
I put a reduced version of the grid, without the piles of columns it has.
<dx:ASPxGridView ID="ClientesGridView"
DataSourceID="sqlClientes"
ClientInstanceName="ClientesGridView"
EnableRowsCache="False"
runat="server"
KeyFieldName="CodigoCliente"
OnAutoFilterCellEditorInitialize="grid_AutoFilterCellEditorInitialize"
OnHtmlDataCellPrepared="grid_HtmlDataCellPrepared">
<ClientSideEvents
RowClick="function(s, e) { SMCVisitasClientes_SeeCliente(e); }"
}" />
<Settings ShowGroupPanel="true" ShowFilterRow="true" />
<SettingsPager PageSize="20"></SettingsPager>
<SettingsBehavior ConfirmDelete="true" />
<Styles>
<AlternatingRow Enabled="true" />
</Styles>
<Columns>
<dx:GridViewDataTextColumn VisibleIndex="99">
<DataItemTemplate>
<%#Eval("Estado").ToString()!="90" ?
"<input type=\"button\" title=\"Nuevo contacto\" style=\"background: url(../../Style%20Library/Images/add_user_32x32.png); background-repeat:no-repeat; border: none; cursor: pointer;\" width=\"40\" height=\"40\" id=\"AddContacto\"/>"+
"<input type=\"button\" title=\"Nueva visita\" style=\"background: url(../../Style%20Library/Images/Add_Visit.png); background-repeat:no-repeat; border: none; cursor: pointer;\" width=\"40\" height=\"40\" id=\"AddVisit\"/>"
:"" %>
</DataItemTemplate>
</dx:GridViewDataTextColumn>
</Columns>
</dx:ASPxGridView>