Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
185
NameValidating event for DocumentExport
posted

I have an UltraWebGrid that I am exporting.

I set the DownloadName property but it seems to "clean up" the name, which is not what I want.

I was able to solve this problem with the excel export using the NameValidating event handler.

Does the document exporter have a similar event?

Thanks

Parents
No Data
Reply
  • 4960
    Suggested Answer
    posted

    It does not, although you can suggest NameValidating be added here,

    http://devcenter.infragistics.com/Protected/RequestFeature.aspx

    To change the name used in the download, you should be able to subclass the UltraWebGridDocumentExporter class and override the protected virtual DownloadNameResolved property,

     

     

    public class YourWebGridDocumentExporter : UltraWebGridDocumentExporter
    {
         public YourWebGridDocumentExporter( )
         {
              ;
         }

     

     

         protected override string DownloadNameResolved
         {
             get
            
    {
                 return   yourDownloadName  + "." + this.DownloadExtension;
             }
         }
    }

    then call Export on this subclassed control.  The name returned by DownloadNameResolved will be used to construct the HTTP response.  Same caveats apply as if you were using the NameValidating event. 

Children
No Data