Re: How to use the Ajax Uploader in Grid

  •  08-02-2010, 8:18 PM

    Re: How to use the Ajax Uploader in Grid

    Hi,
     
    You need attach the FileUploaded event , use tag code <CuteWebUI:Uploader FileUploaded="...." /> , or in the grid Item Init event.
     
    And then , in the Uploader_FileUploaded(object sender,..) event, you can get  the uploader by this way :
     
    Uploader uploader=(Uploader)sender;
     
    And then get the grid item , and index by this way :
     
    int index=-1;
    for(Control c=uploader.Parent;c!=null;c=c.Parent)
    {
       GridViewRow item=c as GridViewRow;
       if(item!=null)
       {
          index=item.DataItemIndex;
          break;
       }
    }
    object datakey=GridView1.DataKeys[index];
     
    and then , save the files for the object which datakey means
     
    Regards,
    Terry
     
View Complete Thread