RadGrid, Timer, RadEditor

4 posts, 0 answers
  1. Sam Stange
    Sam Stange avatar
    15 posts
    Member since:
    Jul 2006

    Posted 06 May 2009 Link to this post

    Hi,

    I'm trying to develop an app where users can add, edit, delete comments. Users have requested an "auto-save" feature for the comments because they spend a lot of time on single pages. We considered using a rad window, but users wanted to see the contents of the page (no modal dialog). My current approach is to use a RAD Ajax, RAD Grid, Rad Editor, and a timer. Does anyone have an example of something similar?

    Thanks,
    Sam
  2. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 06 May 2009 Link to this post

    Hello Sam-

    That general approach should work. I'd only suggest that you use web services and JavaScript to keep your auto save as lighweight as possible. In fact, I created a video some time ago showing you exactly to implement auto-save with RadEditor and a WCF web service:


    Check it out and see if it helps.

    -Todd
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sam Stange
    Sam Stange avatar
    15 posts
    Member since:
    Jul 2006

    Posted 06 May 2009 Link to this post

    Thanks Todd. That approach seems promising! Coding it up now.

    Sam
  5. Sam Stange
    Sam Stange avatar
    15 posts
    Member since:
    Jul 2006

    Posted 06 May 2009 Link to this post

    Todd,

    After a few hours, I got it! Inside a RadGrid I've got a RadEditor that displays when a user attempts to update a comment that is set to save everytime a user doesn't type for 3 seconds. No Modal too! Using WCF worked very nicely!

    Here are my big lessons... When you edit, make sure you have ClientDataKeyNames set as well as DataKeyNames. Nothing like getting null key values! That confused me for a good hour.

    As well for updates, I used the OnCommand Client Side event:

    <ClientSettings>
              <ClientEvents OnCommand="RaiseCommand" />
    </ClientSettings>

    function RaiseCommand(sender, args) {
                        if (args.get_commandName() == "Edit")
                        {
                            var itemIndex = args.get_commandArgument();
                            var grid = sender;
                            var MasterTable = grid.get_masterTableView();
                            var item = MasterTable.get_dataItems()[itemIndex];
                            reviewCommentID = item.getDataKeyValue("Review_Comment_ID");
                        }
                    }

    Thanks a million. I'm sure I'll find some other bugs with this implementation, so I'll try to update this spot so others can use this as well.

    Sam
Back to Top