So I am trying to set the ImagesFolderPath at runtime, but am having problems please help.
Let me setup the scenario first.... I have a webpage that has several different controls. One control is a dropdown list that contains numeric codes. When a code is selected it populates the rest of the page. I want to set the ImagesFolderPath, once this numeric code is selected. I have tried putting code in the Load and Databinding events the ImageGallery never reloads. The control just sits on the page and does not appear to ever reload or rebind with the new ImagesFolderPath.
Please help
Doug
Let me setup the scenario first.... I have a webpage that has several different controls. One control is a dropdown list that contains numeric codes. When a code is selected it populates the rest of the page. I want to set the ImagesFolderPath, once this numeric code is selected. I have tried putting code in the Load and Databinding events the ImageGallery never reloads. The control just sits on the page and does not appear to ever reload or rebind with the new ImagesFolderPath.
Please help
Doug
5 Answers, 1 is accepted
0
Hello Doug,
Thank you for contacting us.
I have created a sample RadGrid web site to demonstrate how you can achieve the requested functionality. Please run the attached application and let me know if it helps you.
Regards,
Eyup
Telerik
Thank you for contacting us.
I have created a sample RadGrid web site to demonstrate how you can achieve the requested functionality. Please run the attached application and let me know if it helps you.
Regards,
Eyup
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Brian
Top achievements
Rank 1
answered on 13 Dec 2014, 05:53 PM
I have a similar problem when trying to change the ImagesFolderPath from code. So does this mean that this property is design time only? It would be helpful if the documentation said so.
The sample application you provided does work but it adds quite a bit of complexity to the page code just to change a single property. It is not immediately apparent how to change that property in the sample other than by use of the combobox in the example. That is impractical for my project. I just want to pass a variable to the gallery.
Do you have a sample that shows how this can be done?
The sample application you provided does work but it adds quite a bit of complexity to the page code just to change a single property. It is not immediately apparent how to change that property in the sample other than by use of the combobox in the example. That is impractical for my project. I just want to pass a variable to the gallery.
Do you have a sample that shows how this can be done?
0
Hi Brian,
With the next release you will simply be able to use the following approach in order to achieve this requirement:
Until then, I'm afraid there is no alternative solution than the approach demonstrated in the mentioned sample.
Please free to let us know if new questions arise.
Regards,
Eyup
Telerik
With the next release you will simply be able to use the following approach in order to achieve this requirement:
protected
void
RadComboBox1_SelectedIndexChanged(
object
sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
RadImageGallery1.ImagesFolderPath =
"DifferentPath"
;
RadImageGallery1.CurrentItemIndex = 0;
RadImageGallery1.Rebind();
}
Until then, I'm afraid there is no alternative solution than the approach demonstrated in the mentioned sample.
Please free to let us know if new questions arise.
Regards,
Eyup
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
ANGEL
Top achievements
Rank 1
answered on 05 Sep 2016, 05:58 PM
RadImageGallery1.ImagesFolderPath = "images";
RadImageGallery1.DataBind();
RadImageGallery1.DataBind();
0
Hi Angel,
I'm not sure what you had in mind, but the Rebind() method should work pretty good, too.
You can also check the following code-library for customizing the RadImageGallery control:
http://www.telerik.com/support/code-library/add-print-and-save-buttons-in-radimagegallery-toolbar
http://www.telerik.com/support/code-library/access-unique-datakeyvalue-and-delete-images-from-radimagegallery-bound-to-a-data-source
Regards,
Eyup
Telerik by Progress
I'm not sure what you had in mind, but the Rebind() method should work pretty good, too.
You can also check the following code-library for customizing the RadImageGallery control:
http://www.telerik.com/support/code-library/add-print-and-save-buttons-in-radimagegallery-toolbar
http://www.telerik.com/support/code-library/access-unique-datakeyvalue-and-delete-images-from-radimagegallery-bound-to-a-data-source
Regards,
Eyup
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.