Grid Update Client Site

4 posts, 0 answers
  1. Krzysztof
    Krzysztof avatar
    29 posts
    Member since:
    Aug 2008

    Posted 03 Oct 2008 Link to this post

    Hi

    In RadGridTag I have :
    ...
    <ClientSettings>
     <ClientEvents OnCommand="Test"/>
     </ClientSettings>
    </telerik:RadGrid>
    ...

    and Test function look like :

    function Test(sender, args)
          {
            var grid = $find("GridName");
           
            var MasterTable = grid.get_masterTableView();
            var row = MasterTable.get_dataItems()[args.get_commandArgument()];
            var cell = MasterTable.getCellByColumnUniqueName(row, "sim");
            alert(cell.innerHTML); 
          }

    I would like get new value of "sim" field after I click 'update" button on client site editing window before update grid. Now I get old data ...
    I need this becurse I would like to send new data to server (SOAP) before update database.

    Regards
    Krzysztof
  2. Vlad
    Vlad avatar
    115 posts
    Member since:
    Dec 2007
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Krzysztof
    Krzysztof avatar
    29 posts
    Member since:
    Aug 2008

    Posted 05 Oct 2008 Link to this post

    Hi Vlad

    Very interesting sample but it do not fix my problem.

    In Your code I found :
    ....

    <telerik:GridTemplateColumn AllowFiltering="false" HeaderStyle-Width="65px" UniqueName="CommandColumn">
                            <ItemTemplate>
                                <asp:Button ID="EditButton" CssClass="Button EditButton" OnClientClick="toggleEditing(this, event); return false;"
                                    runat="server" />
                                <asp:Button ID="UpdateButton" CssClass="Button UpdateButton" Style="display: none;"
                                    OnClientClick="updateItem(this, event); return false;" runat="server" />
                                <asp:Button ID="CancelButton" CssClass="Button CancelButton" Style="display: none;"
                                    OnClientClick="toggleEditing(this, event); return false;" runat="server" />
                            </ItemTemplate>

                          <HeaderStyle Width="65px"></HeaderStyle>
                        </telerik:GridTemplateColumn>
    ....

    but I use PopUp editing style like :
    ...
    <telerik:GridEditCommandColumn UpdateText="Update"  EditText="Edit" CancelText="Cancel">
    <ItemStyle Width="30px" />                                     
    </telerik:GridEditCommandColumn>
    ...
    My question are :
    How can I use Your JavaScript function in PopUp editing style ??
    How can I call JavaScript function on Update and Cancel click in PopUp editing window (in Your code - OnClientClick="updateItem(this, event);) ??
    How can I get new value of editing field in PopUp editing window after click update button ??

    Regards
    Krzysztof

  5. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 07 Oct 2008 Link to this post

    Hello Krzysztof,

    Please find the attached project to this forum post.
    It is an example of RadGrid client side editing in pop-up(RadWindow) form using client side templates.


    All the best,
    Nikolay
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top