Edit/Add RadListView Items via RadWindow Dialog

2 posts, 0 answers
  1. James Daresta
    James Daresta avatar
    65 posts
    Member since:
    Sep 2009

    Posted 07 Oct 2013 Link to this post

    I am working on a contact list similar to the demos for the RadListView. What I want to do is have the items bind server side. This could be via labels for each data field for an item or inputs like textboxes. Then on each item bound there would be an edit button. When the edit button is clicked then via client side script the values of the item would be passed to a dialog radwindow where they can edit it. When done they would click and ok button and then the dialog would pass the values back, they would be added to the ListView as a new item. Well the dialog was easy to do, but its the sending and receiving from the ListView that is proving difficult. The only option I see is custom attributes on the fields in the item and using jquery selectors.

    So my question is whether there is a good sample code of editing the items of a list view client side and particularly in a rad window?

    Secondly is there a way to have say either via loading it via the page or a service call back to the page the data list for a list view, bind it client side and then do similar what I described previously.


  2. Marin
    Marin avatar
    1057 posts

    Posted 10 Oct 2013 Link to this post


     Thank you for contacting us.

    Generally the approach with window editing involves heavy server-side integration and processing of the data entered in the window.
    You can easily open the RadWindow from the client-side but actually showing the data for the editing record and furthermore processing the require changes into an update or insert operation has to be done on the server. For example the window can trigger an ajax request and send its values to the server where you can perform the necessary operation and refresh the ListView. Similar example of this approach can be found in this online demo. It uses grid instead of ListView but generally the idea of passing the values to and from the server is the same.
    The RadListView also supports pure client-side data binding as shown in this demo to a web service or any json object. This way all the operations and interaction with the ListView control have to performed on the client and no server-side events would be raised and no postback will be performed in this case. I suppose window editing can also be used in this case but it has to rely entirely on client-side interactions and operations, unfortunately we do not have such demo at the moment.

    Feel free to contact us again if you have any other questions.

    Kind Regards,
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top