Finaly I decided to post this question here after many links followed with no success.
-I have a Repeater which retrieves data from a Database, showing records from it
-On each Item/record of repeater I have an asp LinkButton working as an ItemCommand. This one transports the record ID to cs side, do some stuff, and triggers a modal box with additional record information
-When Modal Box is triggered the Repeater is refreshed and I loose any filtering or sorting I made just before clicking on ItemCommand.
This should not happen, the table should keep exactly the same as before modal box popup.
Dont know if its relevant, but this sorting and ordering is made by javascript (I am using datatables.net).
I have tried to place the modal box inside an updatePanel but this one wont accept the LinkButton as a Trigger, I guess because it is inside Repeater. But I am not sure if this should be solved with an update panel or not. Any suggestions?
code from repeater item command
protected void Repeater_ItemCommand(object source, RepeaterCommandEventArgs e)
{
if (e.CommandName == "showMoreInfo")
{
// do some stuff
ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModal();", true);
}
}
code from javascript that triggers modal box
<script>function openModal() { $('#myModal').modal('show'); }</script>