jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 91 through 105 (of 111 total)
  • Author
    Posts
  • in reply to: DropDownButton DropDownButton #28200

    simcon94
    Participant

    The problem is:
    Id = new Guid()

    When i insert Id = new Guid(“00000000-0000-0000-0000-000000000001”)
    the it works.
    But this isn’t the correct way….It also have to work, when i insert
    Id = new Guid(“00000000-0000-0000-0000-000000000000”)…

    hmmmm….

    in reply to: DropDownButton DropDownButton #28197

    simcon94
    Participant

    Thats strange.
    Thats my Source:

    var source =
    {
    datatype: “json”
    ,async: false
    ,datafields: [
    { name: ‘Id’ }
    , { name: ‘ParentId’ }
    , { name: ‘Name’ }
    ]
    , id: ‘Id’
    , url: sk.appHelper.getAppDomainAppVirtualPath() + “/Test/GetTest”
    };
    // create data adapter.
    var dataAdapter = new $.jqx.dataAdapter(source);
    dataAdapter.dataBind();
    var records = dataAdapter.getRecordsHierarchy(‘Id’, ‘ParentId’, ‘items’, [{ name: ‘Name’, map: ‘label’ }, { name: ‘Id’, map: ‘id’ }]);

    In the Controller:
    public JsonResult GetTest()
    {
    var List = MvcApplication.BusinessLogicContext.LogicContext.TopologyLogic.GetAll().List();
    var gridList = new List();

    foreach (var topology in List )
    {
    var top = new UserGridModel.TopologyGrid
    {
    Id = topology.Id
    ,Name = topology.Name
    };
    if (topology.ParentTopology != null)
    {
    top.ParentId = topology.ParentTopology.Id;
    }

    gridList.Add(top);
    }

    return Json(gridList, JsonRequestBehavior.AllowGet);
    }

    When i Insert this Line:
    gridList.Insert(0, new UserGridModel.TopologyGrid { Name = “Test”, Id = new Guid(), ParentId = new Guid() });

    befor i return the function, the records in
    var records = dataAdapter.getRecordsHierarchy(‘Id’, ‘ParentId’, ‘items’, [{ name: ‘Name’, map: ‘label’ }, { name: ‘Id’, map: ‘id’ }]);
    is empty.

    When i didn’t insert the line, the record is OK….

    So strange…..

    in reply to: DropDownButton DropDownButton #28196

    simcon94
    Participant

    Ok.
    I implemted an workaround. That works.
    Is it possible to have an empty string before the tree in dropdownButton is set?
    Because the user have the chance to select nothing….

    in reply to: Tree JSON Tree JSON #28164

    simcon94
    Participant

    I implemnted on this way..
    var source =
    {
    datatype: “json”
    ,async: false
    ,datafields: [
    { name: ‘Id’ }
    , { name: ‘ParentId’ }
    , { name: ‘Name’ }
    ]
    , id: ‘Id’
    , icon: sk.appHelper.getAppDomainAppVirtualPath() + ‘/Content/icons/factory.png’
    , url: sk.appHelper.getAppDomainAppVirtualPath() + “/Topology/GetTopologyTree”
    };

    But its still not showing the icon.

    And i have one more question.
    Is it possible, to set the source into jqxDropDownButton?
    Do you have an example?

    in reply to: Tree JSON Tree JSON #28157

    simcon94
    Participant

    Ok. Thanks.
    And how can i add icons to Tree with Json?

    in reply to: Tree JSON Tree JSON #28140

    simcon94
    Participant
    in reply to: Tree JSON Tree JSON #28139

    simcon94
    Participant

    New Problem.
    When i click in the Tree, how will i get the Id of the Node?

    in reply to: Tree JSON Tree JSON #26978

    simcon94
    Participant

    Ok. I found the error.
    We have one css file, the overrides the ul tag…..OMG…..

    Thanks for your support.

    in reply to: Tree JSON Tree JSON #26932

    simcon94
    Participant

    Sorry, but it is still not displying like in your demo.
    Could it be about the theme or css File?

    I copied your demo code into my html file. But i didn`t have an hierachical tree

    in reply to: Tree JSON Tree JSON #26924

    simcon94
    Participant

    Thats the same effect.
    I want have the effect, like in your demo:
    http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtree/index.htm#demos/jqxtree/treebindingtojson.htm

    My Tress should be display like the FRAPPUCINO entry.

    Test and Test1 not on the same level.

    in reply to: Refresh Grid Refresh Grid #26475

    simcon94
    Participant

    Thanks. It works….

    in reply to: Delete last Row in Grid Error Delete last Row in Grid Error #26331

    simcon94
    Participant

    After the commit(true) in deleteRow, i call the referesh Methode of grid. This Works….
    Thanks

    in reply to: Delete last Row in Grid Error Delete last Row in Grid Error #26327

    simcon94
    Participant

    OK. Thanks.
    When i want to delete the Row and the entry in Database, the Grid will be standing “still”.
    Nothing happens after the commit(true) in deleteRow.
    Thats only at deleting the last row also….

    in reply to: jqxTreeGrid? jqxTreeGrid? #26326

    simcon94
    Participant

    Did you have an alternative?

    in reply to: Delete last Row in Grid Error Delete last Row in Grid Error #26315

    simcon94
    Participant

    Im my Grid i have this column:

    text: ”, datafield: ‘Delete’, width: 50, columntype: ‘number’, cellsrenderer: function () {
    return ‘

    ‘;
    }

    in my cell click event:

    if (columnindex == columnDelete) {
    editrow = rowindex;
    if (editrow >= 0) {
    var rowscount = $(“#grid”).jqxGrid(‘getdatainformation’).rowscount;
    if (editrow >= 0 && editrow < rowscount) {
    var rowId = $('#grid').jqxGrid('getrowid', editrow);

    var roleId = $('#grid').jqxGrid('getcellvalue', rowId, "Id");
    var test = deleteRow(roleId, "/Role/DeleteRole");
    if (test === true) {
    var commit = $('#grid').jqxGrid('deleterow', rowId);
    }
    }
    }

    This Function is an Ajax call:
    deleteRow(roleId, "/Role/DeleteRole")
    when this Function is success, then deleteRow in Grid:
    $('#grid').jqxGrid('deleterow', rowId);

    I hope thie helps

Viewing 15 posts - 91 through 105 (of 111 total)