Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
162 views

We have a web page which has a Telerik RadGrid control inside a table structure. We represent text data on the radgrid and the users have the ability to export the data to an excel.

While exporting the data if any of the cells contains a text ( <number > <letter E > < number) example as '3E7'
, the exported excel displays this as 3.00E+04 (in excels scientific representation). We tried to address this issue by capturing OnExcelExportCellFormatting method of the radgrid excel export and injecting custom style to the cell.

Example code below:

            if (e.FormattedColumn.UniqueName == "TierModel")
                e.Cell.Style["mso-number-format"] = @"00000000";


Still whenever the radgrid cell contains a data like ( <number > <letter E > < number) , it’s still represented in the scientific way. Is there any way to control the export of these specific text into excel? Any other styles which will solve this issue?

Also if you have any alternate approaches please let us know.

Thanks !!

Kostadin
Telerik team
 answered on 23 Apr 2013
3 answers
68 views
The GridButtonColumn throws a javascript error in IE 10 when the data field included in the confirmation text includes certain characters.

With this markup I get a javascript error for an unterminated string (in the VS 2012 debugger) when the confirmation text data field (sessionName in the markup) has this value:
Surface Analysis of Biological Materials Using Vibrational & Non Linear Optical Spectroscopy Techniques (8:00-10:00 am) / 3D Imaging & Nanochemical Analysis - Part 1 (10:40 am-12:00 pm)

I'm guessing it's the / character that causes the problem, or the ampersand? Is there any way for me to force html-encoding for the confirmation text data string? Doesn't the control do that by default since it allows data field usage?
<telerik:GridButtonColumn UniqueName="DeleteColumn" ButtonType="ImageButton"
CommandName="Delete" Text="Delete Session" ImageUrl="~/Images/Delete.gif"
HeaderText="Delete" HeaderStyle-Width="40"
ConfirmTitle="Delete" ConfirmDialogType="RadWindow"
ConfirmTextFields="sessionName" ConfirmTextFormatString="Delete session '{0}'?"
>


Angel Petrov
Telerik team
 answered on 23 Apr 2013
1 answer
236 views
Here is my code.  Any help would be greatly appreciated.

ASPX:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AMEC_DCR.aspx.cs" Inherits="eB.PlugIn.AMEC.AMEC_DCR"
    MaintainScrollPositionOnPostback="true" MasterPageFile="~/Framework/MasterPages/ObjectDisplay.Master"
    ResponseEncoding="utf-8" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2013.1.403.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>
<asp:Content runat="server" ID="titleC" ContentPlaceHolderID="headerContents">
</asp:Content>
<asp:Content ID="body" ContentPlaceHolderID="bodyContents" runat="server">
    <asp:Table ID="Table1" runat="server">
        <asp:TableRow ID="head" runat="server">
            <asp:TableCell ID="TableCell1" runat="server" Width="137px">
                <asp:Image ID="Image1" runat="server" ImageUrl="./images/amec_logo.png" />
            </asp:TableCell>
            <asp:TableCell runat="server"><asp:Image runat="server" ID="OrgLogo"/></asp:TableCell>
            <asp:TableCell ID="TableCell2" runat="server" HorizontalAlign="Left" VerticalAlign="Middle">
                <asp:Label ID="Label1" runat="server" Font-Size="16" Text="Supplier Data Collection System" />
                <br />
                <asp:Label ID="Label5" runat="server" Text="Project: " />
                <asp:Label ID="lblProjectNameValue" runat="server" Text="TO DO" />
                <br />
                <asp:Label ID="Label6" runat="server" Text="Supplier: " />
                <asp:Label ID="lblSupplierValue" runat="server" />
                <br />
                <asp:Label ID="Label2" runat="server" Text="PO Number: " />
                <asp:Label ID="lblPoNameValue" runat="server" ForeColor="red" />
                <br />
                <br />
            </asp:TableCell></asp:TableRow>
        <asp:TableRow ID="TableRow7" runat="server">
            <asp:TableCell ID="RadGridTagsCell" runat="server" ColumnSpan="3" Visible="True">
                <telerik:RadGrid ID="RadGridTags" runat="server" AllowPaging="True" PageSize="10" OnNeedDataSource="TagDataNeedsDataSource"
                AllowFilteringByColumn="True">
                    <groupingsettings casesensitive="false"></groupingsettings>
                    <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true">
                        <Selecting AllowRowSelect="true"></Selecting>
                    </ClientSettings>
                    <MasterTableView Width="100%" AutoGenerateColumns="False" DataKeyNames="Tag" HeaderStyle-HorizontalAlign="Center">
                        <Columns>
                            <%--{"Discipline", "Tag", "Tag Status", "Service Description", "Functional Type", "Physical Tag Type"}--%>
                            <telerik:GridBoundColumn DataField="Discipline" DataType="System.String" HeaderText="Discipline"
                                ReadOnly="True" SortExpression="Discipline" UniqueName="Discipline">
                                </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Tag" DataType="System.String" HeaderText="Tag"
                                ReadOnly="True" SortExpression="Tag" UniqueName="Tag" ItemStyle-HorizontalAlign="Center">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="TagStatus" DataType="System.String" HeaderText="Tag Status"
                                ReadOnly="True" SortExpression="Tag Status" UniqueName="TagStatus" ItemStyle-HorizontalAlign="Center">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Service Description" DataType="System.String"
                                HeaderText="Service Description" ReadOnly="True" SortExpression="Service Description"
                                UniqueName="ServiceDescription">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="FunctionalType" DataType="System.String" HeaderText="Functional Type"
                                ReadOnly="True" SortExpression="Functional Type" UniqueName="FunctionalType" ItemStyle-HorizontalAlign="Center">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="PhysicalType" DataType="System.String" HeaderText="Physical Type"
                                ReadOnly="True" SortExpression="Physical Type" UniqueName="PhysicalType">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Tag Maturity Level" DataType="System.String" HeaderText="Tag Maturity Level"
                                ReadOnly="True" SortExpression="Tag Maturity Level" UniqueName="TagMaturityLevel" ItemStyle-HorizontalAlign="Center">
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                </telerik:RadGrid>
                <br/>
            </asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow1" runat="server">
            <asp:TableCell ID="RadGridTagDetailCell" runat="server" ColumnSpan="3" Visible="True">
                <telerik:RadGrid ID="RadGridTagDetail" runat="server" AllowPaging="True" PageSize="20" AllowMultiRowEdit="True" OnNeedDataSource="TagDetailDataNeedsDataSource" OnItemCreated="RadGridTagDetail_ItemCreated"
                MasterTableView-DataKeyNames="Tag" AllowFilteringByColumn="True" OnItemEvent="RadGridTagDetail_ItemEvent" AllowAutomaticUpdates="False" OnItemCommand="RadGridTagDetail_ItemCommand" OnPreRender="RadGridTagDetail_PreRender"
                AllowSorting="True">
                    <GroupingSettings CaseSensitive="false"></GroupingSettings>
                    <MasterTableView Width="100%" AutoGenerateColumns="False" DataKeyNames="Tag" EditMode="InPlace"
                        HeaderStyle-HorizontalAlign="Center" AllowAutomaticUpdates="False" CommandItemDisplay="Top">
                        <CommandItemTemplate>
                            <asp:LinkButton runat="server" ID="UpdateAll" Text="Save Changes" CommandName="UpdateAll">Save Changes</asp:LinkButton>
                        </CommandItemTemplate>
                        <Columns>
                            <%--"Attribute", "Value", "Unit Of Measure","Type", "Category", "Review Status"--%>
                            <telerik:GridBoundColumn DataField="Attribute" DataType="System.String" HeaderText="Attribute"
                                ReadOnly="True" SortExpression="Attribute" UniqueName="Attribute">
                                </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn DataField="Value" DataType="System.String" HeaderText="Value"
                                SortExpression="Value" UniqueName="Value">
                                <ItemTemplate>
                                    <telerik:RadTextBox runat="server" Text='<%# Eval("Value")%>'></telerik:RadTextBox>
                                    </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Unit Of Measure"
                                SortExpression="Unit Of Measure" UniqueName="UnitOfMeasure">
                                <ItemTemplate>
                                    <telerik:RadComboBox ID="radComboUOM" runat="server">
                                    </telerik:RadComboBox>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn DataField="Type" DataType="System.String" HeaderText="Type"
                                SortExpression="Type" UniqueName="Type">
                                <ItemTemplate>
                                    <asp:Label ID="lblType" runat="server" Text='<%# Eval("Type")%>'></asp:Label></ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn DataField="Category" DataType="System.String" HeaderText="Category"
                                SortExpression="Category" UniqueName="Category">
                                <ItemTemplate>
                                    <asp:Label ID="lblCategory" runat="server" Text='<%# Eval("Category")%>'></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn DataField="Review Status" DataType="System.String" HeaderText="Review Status"
                                SortExpression="Review Status" UniqueName="ReviewStatus">
                                <ItemTemplate>
                                    <telerik:RadComboBox ID="radComboReviewStatus" runat="server">
                                        <Items>
                                            <telerik:RadComboBoxItem Text="Not Started" Value="0" Selected="true"></telerik:RadComboBoxItem>
                                            <telerik:RadComboBoxItem Text="Incomplete" Value="1"></telerik:RadComboBoxItem>
                                            <telerik:RadComboBoxItem Text="Requires Revision" Value="2"></telerik:RadComboBoxItem>
                                            <telerik:RadComboBoxItem Text="Complete" Value="3"></telerik:RadComboBoxItem>
                                        </Items>
                                    </telerik:RadComboBox>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings AllowKeyboardNavigation="true">
                        <Selecting AllowRowSelect="true"></Selecting>
                    </ClientSettings>
                    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                </telerik:RadGrid>
            </asp:TableCell>
            </asp:TableRow>
    </asp:Table>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
        <%--<img alt="Loading..." src="./images/loading.gif" style="border: 0;" />--%>
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <telerik:RadScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <telerik:RadScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <telerik:RadScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadSkinManager ID="QsfSkinManager" runat="server" Skin="MetroTouch" Visible="True" />
        <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" Skin="MetroTouch" Visible="False" />
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGridTags">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGridTags" />
                    </UpdatedControls>
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGridTagDetail" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadGridTagDetail">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGridTagDetail" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <%--<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGridTagDetail" LoadingPanelID="RadAjaxLoadingPanel1">
                        </telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>--%>
            </AjaxSettings>
        </telerik:RadAjaxManager>
</asp:Content>
Code Behind:
using System;
using System.Collections;
using System.Data;
using System.Globalization;
using System.Web.UI;
using Telerik.Web.UI;
using eB.Library.Web.UI;
 
namespace eB.PlugIn.AMEC
{
    public partial class AMEC_DCR : ObjectSpecificPage
    {
        private Utils.Data _mData;
        private string _mSPoCode;
        private DataTable _dtTagDetailData;
 
        protected void Page_Init(object sender, EventArgs e)
        {
            _mData = new Utils.Data(eBContext.eBSession);
            _mSPoCode = Request.QueryString["pocode"];
            RadGridTagDetail.ItemCommand += RadGridTagDetail_ItemCommand;
            LoadGui();
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            for (int i = 0; i < RadGridTagDetail.PageSize; i++)
            {
                RadGridTagDetail.EditIndexes.Add(i);
            }
        }
 
        protected void RadGridTagDetail_PreRender(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                foreach (GridItem item in RadGridTagDetail.MasterTableView.Items)
                {
                    if (item is GridEditableItem)
                    {
                        GridEditableItem editableItem = item as GridDataItem;
                        editableItem.Edit = true;
                    }
                }
                RadGridTagDetail.Rebind();
            }
        }
 
        protected void Page_PreRender(object sender, EventArgs e)
        {
            if (RadGridTags.SelectedIndexes.Count == 0)
                RadGridTags.SelectedIndexes.Add(0);
 
            RadGridTagDetail.Rebind();
        }
 
        private void LoadGui()
        {
            var personNameSplit = eBContext.PersonName.Split(',');
            var currentUser = personNameSplit[1].Trim(' ');
            lblSupplierValue.Text = string.Format(" {0}", currentUser);
            lblPoNameValue.Text = _mSPoCode;
            lblProjectNameValue.Text = "Mad Dog 2";
 
            OrgLogo.ImageUrl = _mData.GetOrganizationLogo(Server.MapPath(@"~\PlugIns\AMEC\images"));
            //lblProjectNameValue.Text = _mData.GetPoPrimaryPi(_mSPoCode);
        }
 
        int _totalItemCount;
        protected void RadGridTagDetail_ItemCreated(object sender, GridItemEventArgs e)
        {
            var gridPagerItem = e.Item as GridPagerItem;
            if (gridPagerItem != null)
            {
                var pagerItem = gridPagerItem;
                var pageSizeCombo = (RadComboBox)pagerItem.FindControl("PageSizeComboBox");
                var item1 = new RadComboBoxItem("All", _totalItemCount.ToString(CultureInfo.InvariantCulture));
                item1.Attributes.Add("ownerTableViewId", gridPagerItem.OwnerTableView.ClientID);
                pageSizeCombo.Items.Add(item1);
            }
 
            if (e.Item.ItemType != GridItemType.Item && e.Item.ItemType != GridItemType.AlternatingItem) return;
 
            var item = (GridDataItem)e.Item;
            item.Edit = true;
 
            var comboBoxUom = (RadComboBox)(item.FindControl("radComboUOM"));
            var comboBoxReviewStatus = (RadComboBox) (item.FindControl("radComboReviewStatus"));
            comboBoxReviewStatus.SelectedIndex = 0;
 
            if (comboBoxUom == null) return;
 
            var dataRow = item.DataItem as DataRowView;
            if (dataRow == null) return;
 
            var attName = dataRow["Attribute"].ToString();
            var currentVal = dataRow["Unit Of Measure"].ToString();
            var values = _mData.GetUomValueList(item.GetDataKeyValue("Tag").ToString(), attName);
 
            if (values.Count == 0)
                return;
 
            comboBoxUom.DataSource = values;
            comboBoxUom.SelectedValue = currentVal;
        }
 
        protected void RadGridTagDetail_ItemEvent(object sender, GridItemEventArgs e)
        {
            if (e.EventInfo is GridInitializePagerItem)
            {
                _totalItemCount = (e.EventInfo as GridInitializePagerItem).PagingManager.DataSourceCount;
            }
        }
 
        protected void TagDetailDataNeedsDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            _dtTagDetailData = (DataTable)ViewState[RadGridTags.SelectedValue.ToString()];
 
            if (_dtTagDetailData == null)
            {
                _dtTagDetailData = _mData.GetTagDetailsData(RadGridTags.SelectedValue.ToString());
                ViewState[RadGridTags.SelectedValue.ToString()] = _dtTagDetailData;
            }
 
            RadGridTagDetail.DataSource = _dtTagDetailData;
        }
 
        protected void TagDataNeedsDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            var dtTagData = (DataTable)ViewState[_mSPoCode];
 
            if (dtTagData == null)
            {
                dtTagData = _mData.GetPoTagData(_mSPoCode);
                ViewState[_mSPoCode] = dtTagData;
            }
 
            RadGridTags.DataSource = dtTagData;
            RadGridTags.SelectedIndexes.Add(0);
        }
 
        protected void RadGridTagDetail_ItemCommand(object source, GridCommandEventArgs e)
        {
            if (e.CommandName != "UpdateAll") return;
 
            if (RadGridTagDetail.EditIndexes.Count == 0)
        {
            return;
        }
 
        foreach (GridDataItem item in RadGridTagDetail.EditItems)
        {
            UpdateItem(item.EditFormItem);
        }
 
        e.Item.OwnerTableView.Rebind();
    }
 
        private void UpdateItem(GridEditableItem editedItem)
        {
            if (editedItem == null)
                return;
            //Locate the changed row in the DataSource
            var changedRows = _dtTagDetailData.Select("Tag = '" + editedItem.GetDataKeyValue("Tag") + "'");
 
            if (changedRows.Length != 1)
            {
                return;
            }
 
            //Update new values
            var newValues = new Hashtable();
            //The GridTableView will fill the values from all editable columns in the hash
            editedItem.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);
 
            var changedRow = changedRows[0];
            changedRow.BeginEdit();
            try
            {
                foreach (DictionaryEntry entry in newValues)
                {
                    changedRow[(string)entry.Key] = entry.Value;
                }
                changedRow.EndEdit();
            }
            catch (Exception)
            {
                changedRow.CancelEdit();
            }
        }
    }
}

Andrey
Telerik team
 answered on 23 Apr 2013
5 answers
1.0K+ views
I am surprised I cannot find any guidance on how to do a CLIENT-side Yes / No / Cancel dialog box using Telerik Rad controls for ASP.NET AJAX.  My best guess is the RadNotification control, but still I cannot find any guidance on how to do this, in either the online documentation or by searching the Forums,  Could you please point me to a helpful posting or documentation page on this topic, one that has some sample code?
Marin Bratanov
Telerik team
 answered on 23 Apr 2013
1 answer
136 views
I want to the RadEditor control in ascx page (to be used in SP2010 webpart). But I receive the below error.
1) I have added reference of RadEditorSharePoint.dll, Telerik.Ajax.SharePoint.dll and Telerik.Web.UI.dll
2) Have added

<%@ Register Assembly="RadEditorSharePoint, Version=6.3.0.0, Culture=neutral, PublicKeyToken=1f131a624888eeed"

Namespace="Telerik.SharePoint" TagPrefix="telerik" %>
in the ascx page

3) Have deployed the RadControlsSP.wsp from Telerik.SharepointAccelerationKit_2012_1_CTP_Trial.

    But Still I receive the error as shown below.

Compiler Error Message: CS0012: The type 'Telerik.Web.UI.RadEditor' is defined in an assembly that is not referenced. You must add a reference to assembly 'Telerik.Web.UI, Version=2012.1.215.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4'.

Source Error:

 

Line 1154:       
Line 1155:        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 1156:        private global::Telerik.SharePoint.MOSSRadEditor @__BuildControlrtxtDetail() {
Line 1157:            global::Telerik.SharePoint.MOSSRadEditor @__ctrl;
Line 1158:           
 

Please help on the same.

Stanimir
Telerik team
 answered on 23 Apr 2013
3 answers
85 views
Hi,

I insert the "Telerik RadEditor for SharePoint"-Webpart into a Enterprise-Wikipage and then i try to insert a content (the editable area is visible after I open the settings of the webpart) but after I inserted some lines of text - the webpart disappear suddenly . 

Is there a solution for this problem? Does anyone have this problem too?

Greetings from Germany,
Andy
Stanimir
Telerik team
 answered on 23 Apr 2013
5 answers
161 views
Everthing was fine before new version of Telerik is added.
Previous Telerik Version : 2012. 2 912
Current  Telerik version : 2012.3.1308.40

Mainly Filter Control Width specified is not working. Also controls inside Radgrid is not rendering correctly.
Please check the attachments and give us a fast solution.

Vargis
Top achievements
Rank 2
 answered on 23 Apr 2013
5 answers
452 views
I was hoping to set the allowed file extensions based on some chosen radio buttons, but the sample code in the on-line documentation does not work. I am weak in my javascript, so I am probably missing something simple. Here's the documentation page:
http://www.telerik.com/help/aspnet-ajax/asyncupload-client-object.html

and here's the sample code it provides:
function AllowJPEGExtension() {
  var upload = $find("<%= RadAsyncUpload1.ClientID %>");
 
  if (!upload.isExtensionValid(".jpeg"))
  {
     var exts = upload.get_allowedFileExtensions();
     exts[exts.length] = ".jpeg";
  }
}
Plamen
Telerik team
 answered on 23 Apr 2013
7 answers
1.0K+ views
Hi,

I'm a newbie to Telerik controls and i am having and issue with trying to bind to a object/datasource.

Every example i am seeing is binding to a datagrid but i do want this. I have a few controls on the page and nothing seem to have any property to set a datasource or datamember for data binding.

Can anyonje tell me how i can do this or point me to a resource that can show me?

thanks,
Stephen
Shinu
Top achievements
Rank 2
 answered on 23 Apr 2013
5 answers
438 views
I have several RadGrids on a page which are reading data using a stored procedure.The autogeneratecolumns is set to true.
I am adding some controls to the rows dynamically on ItemDataBound. When I do a Sort/Filter on a RadGrid, that grid is rendering properly, but the other grids are losing the dynamically added controls.

I tried using the advanced databinding using the NeedDataSource and also doing a simple bind on every postback. It fails in both the scenarios.

   protected void myRadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
                   
     if (e.Item is GridDataItem)
                {
                    GridDataItem item = (GridDataItem)e.Item;
                    foreach (string hlc in hyperlinksColumns)
                    {
                        HyperLink link = new HyperLink();
                        Guid guid = new Guid();
                        link.ID = guid.ToString();
                        link.Text = item[hlc].Text; //accessing the GridBoundColumn to get the text
                        link.NavigateUrl = item[hlc + "_URL"].Text;
                        item[hlc].Controls.Add(link);
                    }
 
                    foreach (string ic in imageColumns)
                    {
                        Image image = new Image();
                        Guid guid = new Guid();
                        image.ID = guid.ToString();
                        image.ImageUrl = ImageLocation + item[ic + "_IMG"].Text;
                        item[ic + "_IMG"].Controls.Add(image);
                    }
 
 
                }
 
}

Jayesh Goyani
Top achievements
Rank 2
 answered on 22 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?