Gallery Binding on paging or adding new record in gridview

Last post 11-04-2010, 4:03 AM by Kenneth. 4 replies.
Sort Posts: Previous Next
  •  10-10-2010, 11:20 AM 64377

    Gallery Binding on paging or adding new record in gridview

    Hi again
     
    As mention in my earlier post, I am using a DotNetGalley control in a gridview.  I configure/bind the gallery in the OnRowDataBound event of the gridview.  On Page load, it works great.  But on paging or if I add a row to the grid, while I rebind the entire grid (and thus the OnRowDataBound is called again), and call an update to the UpdatePanel wrapped around the gridview, the Gallery does not display.  All my other info (data from the database, and additonal Icons that I load) display, just not the gallery. The control is defined on the aspx pager.  I also tried wrapping the gallery itself in an UpdatePanel and updating that on each row bind, but that did not help, so I removed it. Below is the code for the OnRowDataBound event. What am I missing? 
     
    if (e.Row.RowType == DataControlRowType.DataRow)
    {
       if (!(e.Row.FindControl("GalleryServiceTickets") == null))
       {
          GalleryBrowser galleryServiceTickets = e.Row.FindControl("GalleryServiceTickets") as GalleryBrowser; 
          String photoPath = "PathtoFolder";
     
          if (photoPath != null)
          {
             galleryServiceTickets.Visible =
    true;
             galleryServiceTickets.Width = 150;
             galleryServiceTickets.Height = 100;
             galleryServiceTickets.AllowEdit =
    false;
             galleryServiceTickets.AllowPostComment =
    false;
             galleryServiceTickets.AllowShowComment =
    false;
             galleryServiceTickets.Layout =
    "Gridshow"
             galleryServiceTickets.GalleryFolder = photoPath;
                         galleryServiceTickets.DataBind();
          }
       else
          galleryServiceTickets.Visible = false;
          }
    }
     
    Thanks in advance for any help
  •  10-10-2010, 11:45 AM 64379 in reply to 64377

    Re: Gallery Binding on paging or adding new record in gridview

    I changed the cod to instatiate the gallery in the OnRowDataBoundevent and used a PlaceHolder in the grid.  No better...
  •  10-10-2010, 9:43 PM 64383 in reply to 64379

    Re: Gallery Binding on paging or adding new record in gridview

    Hi davenel,
     
    For now, DotNetGallery does not support ajaxUpdatePanel. Sorry for you inconvenience.
     
    Regards,
     
    ken
     
  •  11-04-2010, 3:10 AM 64870 in reply to 64383

    Re: Gallery Binding on paging or adding new record in gridview

    Hi Ken
     
    Thanks for the reply
     
    Is this in the roadmap for the control?  Also is this a consistent them across your controls.  I am aso working with your Ajaxuploader as I need to upload files beyond the images formats permitted by the Gallery, and will be looking at your Cute editor for .net as well
     
    Thansk again
  •  11-04-2010, 4:03 AM 64874 in reply to 64870

    Re: Gallery Binding on paging or adding new record in gridview

    Hi davenel.
     
     
     
    Also, if you have any questions, you can contact me directly.
     
     
    Regards,
     
    ken 
View as RSS news feed in XML