Telerik dll version Issue for RadGridView Control

2 posts, 0 answers
  1. Bylar
    Bylar avatar
    8 posts
    Member since:
    Jul 2012

    Posted 29 Aug 2013 Link to this post


    I am using the Telerik.Web.UI.dll and Telerik.Web.UI.Skins.dll with version number : 2012.3.1308.35 in my currently running application  but now we are updating the dll version to  2013.2.717.40 so I am getting an error at run time in RadGridView Control :

    Error : I am getting the data-type conversion issue

    Here is my code :
                  <telerik:RadGrid OnNeedDataSource="rgrd_NeedDataSource" AlternatingItemStyle-HorizontalAlign="Left"
                                ItemStyle-HorizontalAlign="Left" runat="server" ID="rgrd" OnPreRender="rgrd_OnPreRender"
                                OnItemCommand="rgrd_ItemCommand" AllowPaging="True" Skin="WebBlue" Width="99%"
                                AutoGenerateColumns="false" GridLines="None" AllowSorting="True" PageSize="10"
                                <MasterTableView DataKeyNames="UserId" AutoGenerateColumns="False" Width="100%">
                                        No Records
                                        <telerik:GridBoundColumn Visible="false" UniqueName="IsEnable" DataField="IsEnable" />
                                        <telerik:GridBoundColumn  UniqueName="Name" DataField="UserName" />
                                <HeaderStyle HorizontalAlign="Left" />
     protected void rgrd_OnPreRender(object source, EventArgs eventArgs)
                var list= (List<User>) rgrd.DataSource;
                if (list=  != null && list= .Count > 0)
                    for (int index = 0; index < rgrd.Items.Count; index++)
                        GridDataItem item = rgrd.Items[index];
                        if (item != null)
                            Boolean isEnable = Convert.ToBoolean(item["IsEnable"].Text); // Getting Error in this code

    "Boolean isEnable = Convert.ToBoolean(item["IsEnable"].Text);"
    With old dll version I am getting here item["IsEnable"].Text ="True"
    but with newer version of dll I am getting here item["IsEnable"].Text="&nbsp;"
    so I do not understand What can I do in this case ?
    Please Help.


  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 29 Aug 2013 Link to this post

    Hi Bylar,

    The error is causing because you have set the Visible="false",for the IsEnable column,Please set Display="false" ,so that you can access it in the code behind.

    <telerik:GridBoundColumn Display="false" UniqueName="IsEnable" DataField="IsEnable"  />


Back to Top