[CLOSED] [MVC] Set Tag proprties on button with AjaxResult

  1. #1

    [CLOSED] [MVC] Set Tag proprties on button with AjaxResult

    Hi guys,

    i have a button, i have a default value, when i change tag value in ajaxresult, tag properties in my button isn't refresh in javascript

    Button config

    Button disPlayPathButton = new Button();
                disPlayPathButton.ID = "DisPlayPathButton";
                disPlayPathButton.Icon = Icon.Comment;
                disPlayPathButton.Width = 25;
                disPlayPathButton.DirectEvents.Click.Action = "ShowCompleteBusiPath";
                disPlayPathButton.DirectEvents.Click.ExtraParams.Add(new Parameter("path", "item.initialConfig.tag", ParameterMode.Raw));
                disPlayPathButton.Tag = path != string.Empty ? path : ".";
    Ajax Result

    public AjaxResult ShowReturnBusiPath(int idNode)
            {
                TIOMembershipUser currentUser = _memberShipService.GetUser();
                string path = string.Empty;
                var buttonPath = X.GetCmp<Button>("DisPlayPathButton");
                var data = _treeNodeService.GetBusinessGeoById(currentUser.UserInfos.GroupId, 2502, idNode, 1, ref path);
                if (data.Count > 0)
                {
                    buttonPath.Tag = path;
                }
                return new AjaxResult();
            }
    Regards
    Last edited by Daniil; Sep 10, 2013 at 7:30 AM. Reason: [CLOSED]
  2. #2
    Hi @Tactem,

    I cannot reproduce with this test case.

    View
    @{
        var X = Html.X(); 
    }
    
    <!DOCTYPE html>
    <html>
    <head>
        <title>Ext.Net.MVC v2 Example</title>  
    </head>
    <body>
        @X.ResourceManager()
    
        @X.Button().ID("Button1").Text("Change my Tag").Tag("initial tag").DirectClickAction("ChangeTag")
    
        @X.Button().Text("Show Tag").Handler("alert(App.Button1.tag);")
    </body>
    </html>
    Controller Action
    public ActionResult ChangeTag()
    {
        (X.GetCmp<Ext.Net.Button>("Button1")).Tag = "new tag";
        return new AjaxResult();
    }
    Tested with the SVN trunk.
  3. #3
    it's better with
    App.Button1.tag
    than
    item.initialConfig.tag
    Thanks Daniil

Similar Threads

  1. [CLOSED] AjaxResult Compatibility issue with JQ
    By cleve in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 18, 2012, 7:43 AM
  2. [CLOSED] Update v2.0 combobox with AjaxResult
    By romeu in forum 2.x Legacy Premium Help
    Replies: 18
    Last Post: May 10, 2012, 8:31 PM
  3. [CLOSED] [1.0] MVC AjaxResult
    By alliedwallet.com in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 21, 2011, 8:07 AM
  4. AjaxResult class issue in ext.net.dll
    By vs.mukesh in forum 1.x Help
    Replies: 4
    Last Post: Jun 10, 2010, 1:38 PM
  5. [CLOSED] AjaxResult and AjaxStoreResult
    By fondant in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Nov 19, 2009, 7:45 PM

Tags for this Thread

Posting Permissions