Template column not binding properly on client side binding for RadGrid

5 posts, 0 answers
  1. systems
    systems avatar
    70 posts
    Member since:
    Dec 2013

    Posted 04 Jul Link to this post

    Hello,

    We have a Rad grid with combination of Bound & Template columns in it.
    For the first time when page gets loaded we are binding the Rad grid through server side Need Data Source handler.

    In our case for page actions we are trying to bind the Rad grid from client side by calling Web Method via $.Ajax() function.

    Everything works well w.r.t. Bound column but it seems Template column are not supported to bind data via client side.

    We have tried many alternate ways to bind the template column at client side with no success. 

    Could someone please advise is there a workaround/better way to achieve the client side binding of Template column for Rad Grid?

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 07 Jul Link to this post

    Hi,

    If you need to bind the grid on the client and use template columns you need to define ClientItemTemplate. Check out the following online example that illustrates how the functionality works:


    With that said, I would recommend using only one approach for data-binding the RadGrid. Use either server- or client-side binding, however, mixing the different approaches can result in unexpected behavior.

    Regards,
    Viktor Tachev
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. systems
    systems avatar
    70 posts
    Member since:
    Dec 2013

    Posted 11 Jul in reply to Viktor Tachev Link to this post

    Hi Viktor, 

    Thank you for your reply.

    As per your suggestion I have used ClientItemTemplate.

    But in our case were using some server controls such as 'RadToolTip, RadListBox, RadButton' in previously added Item Template. So for above scenario, how do we use  'RadToolTip, RadListBox, RadButton' in  ClientItemTemplate ?

    Please provide any suggestion or any other way for above case?

    Thanks in advance.

  5. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 13 Jul Link to this post

    Hello,

    The ClientItemTemplate is intended to be used when the RadGrid control is bound client-side. If you are using server controls with server-side binding you need to use ItemTemplate.

    Moreover, if you would like to bind the grid on the client  you should also bind the other controls on the page client-side. In case you would like to use server-side binding you should bind all controls on the server.

    Note that mixing server- and client-side data binding can produce unexpected results. Moreover, if a control on the page triggers a postback this would defeat the purpose of using client-side binding.

    Regards,
    Viktor Tachev
    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.
  6. systems
    systems avatar
    70 posts
    Member since:
    Dec 2013

    Posted 14 Jul Link to this post

    Hi Viktor, 

    Now, we understood and will go for Client Side binding.

    Thank you for the help. 

     

     

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017