Export the ability to stop InitializePostBack Action..

6 replies. Last post: August 3, 2010 11:13 PM by Glenn Layaar
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
T LusbyMember

I have a scenario that I want to check the record count before exporting the data.  If the record count is beyond what I want to allow, then I would like to stop the process.  I was hoping to do it in the

WebGrid1_InitializePostBack because this is called anyway when you click the Export button.  I would like to make one trip from the Client to the code behind.

So I have this in the InitializePostBack ..

WebGrid1_InitializePostBack because this is called anyway when you click the Export button.  I would like to make one trip from the Client to the code behind.

So I have this in the InitializePostBack ..

if (e.Action == PostBackAction.Export)
                {
                    if (((DataView)e.DataSource).Count > 6000)
                    {                        
                        ISNet.WebUI.FunctionParameter[] prms = new ISNet.WebUI.FunctionParameter[1];
                        prms[0] = new ISNet.WebUI.FunctionParameter("dummy", "string");
                        e.Grid.ClientAction.InvokeScript("ExportIssues", prms);
                        //[HERE I WANT TO STOP THE EXPORT PROCESS} 
                    }
                }
 
All times are GMT -5. The time now is 11:37 PM.
Previous Next