Client-side binding on radgrid works incorrectly for field names, that contain *Name* in it

5 posts, 0 answers
  1. Alexander
    Alexander avatar
    152 posts
    Member since:
    Jun 2012

    Posted 30 Mar 2011 Link to this post

    Once again  I cannot remember how i managed to submit support ticket, it's not obvious from the interface.. :(

    So, I post a problem here.
    Please, confirm if this is already fixed in the newest version of Telerik Controls otherwise would be great, if you fixed this ASAP...

    If I use client-side binding and have two labels, responsible for displaying some entity fields within GridTemplateColumn and one of them corresponds to field "Name" - then another one, if it contains word "Name" in it, ignores field value and instead also shows "Name" field value! :(

    <telerik:GridTemplateColumn HeaderStyle-CssClass='GridHeaderGreen la' ItemStyle-CssClass='la'
        HeaderText="Model" SortExpression="SVC2.CLUSTER_STATE.NAME">
        <itemtemplate>
            <asp:Label ID="Name" runat="server" />
        </itemtemplate>
    </telerik:GridTemplateColumn>
    <telerik:GridTemplateColumn HeaderStyle-CssClass='GridHeaderGreen la' ItemStyle-CssClass='la'
        HeaderText="Group Name" SortExpression="SVC2.CLUSTER_STATE.GROUPNAME">
        <itemtemplate>
            <asp:Label ID="GroupName" runat="server" />
        </itemtemplate>
    </telerik:GridTemplateColumn>

    In the given case grid shows "Name" value in first and second columns! It ignores "GroupName" value, even though json data is correct!
  2. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 04 Apr 2011 Link to this post

    Hello Alexander,

    I tried to replicate the issue which you described, but to no avail.
    Attached to this message, you will find the code which I used for testing.

    Please, take a look at it and let me know if there are any differences at your end, which I may be leaving out.

    Best wishes,
    Mira
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Alexander
    Alexander avatar
    152 posts
    Member since:
    Jun 2012

    Posted 05 Apr 2011 Link to this post

    Hi! Sorry, i have not seen attached project, because i am ready to send the demo where bug is reproduceable.
    Demo

    So, if you have json object, where, for instance, you have some field - ContactName, that alphabetically is 'less', than Name and it stands before Name - such field is displayed incorrectly. If you have the field ZName, that stands after - it shown as expected. You can add order = [number] to DataMember attribute in GridEntity.cs to change the order of fields and then the bug goes away.
  5. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 08 Apr 2011 Link to this post

    Hello Alexander,

    Thank you for the additional information.

    The described behavior is indeed a limitation of the RadGrid with client-binding.
    It can be easily overcome with the approach demonstrated in the sample project attached to this post.

    I hope it helps.

    Best wishes,
    Mira
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Jesper Matthiesen
    Jesper Matthiesen avatar
    8 posts
    Member since:
    Oct 2008

    Posted 08 Apr 2011 Link to this post

    Hi,

    thanks, that's exactly how we solved this issue. We also can use order attribute to change the sequence of following of properties in json object.

    So it's not a big deal, but would be nice if it was resolved in some next RadControl releases!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017