Hello i am using telerik image gallery to shows the images. I am fetching images from database. I want add multiple column to the description box as to give information about the image . However it is throwing me an error. Can you please help me in this regard. Below is my code.
This is my telerik image gallery control:
<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
</telerik:RadStyleSheetManager>
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
</asp:ScriptReference>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
</asp:ScriptReference>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
</asp:ScriptReference>
</Scripts>
</telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
</telerik:RadAjaxManager>
<div>
</div>
<telerik:RadImageGallery ID="RadImageGallery1" OnNeedDataSource="RadImageGallery1_NeedDataSource" runat="server" AppendDataBoundItems="True" DataImageField="picture" DataTitleField="name" LoopItems="True">
</telerik:RadImageGallery>
Belowin my C# code:
RadImageGallery1.DataSource = GetDataTable();
DataTable table = GetDataTable(); ;
string price = table.Rows[0]["price"].ToString();
string size=table.Rows[0]["size"].ToString();
string place = table.Rows[0]["place"].ToString();
string description = "Price: " + price + " " + "Size: " + size + " " + "Place: " + place;
RadImageGallery1.DataDescriptionField = description;