jQWidgets Forums

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts

  • Ray Choe
    Participant

    public JsonResult GetHierarchyTimeFrame()
    {

    try
    {
    ddlregualAll = new List<ddlRegual>();
    string tablename = “tblHierarchyTimeFrameAll”;

    ds = opmFunction.GetHierarchyTimeFrame(10, tablename);
    tmpTable1 = ds.Tables[tablename];

    if (generalutility.CheckDatasetReturnData(ds, tablename))
    {
    for (int i = 0; i < tmpTable1.Rows.Count; i++)
    {
    ddlregual = new ddlRegual();
    ddlregual.Description = tmpTable1.Rows[i][“Descr”].ToString();
    //ddlregual.lable = tmpTable1.Rows[i][“id”].ToString();
    ddlregual.lable = tmpTable1.Rows[i][“Descr”].ToString();
    ddlregualAll.Add(ddlregual);
    }
    return Json(ddlregualAll, JsonRequestBehavior.AllowGet);
    }
    else
    {
    return Json(null, JsonRequestBehavior.AllowGet);
    }
    }
    catch
    {
    return Json(null, JsonRequestBehavior.AllowGet);
    }
    }

    email me if you have more question gagopa@yahoo.com


    Ray Choe
    Participant

    //$(“#TGTimeFrame”).bind(‘select’, function (event) {
    //event.stopPropagation();
    // ////if (cellactionCount == 0) {
    // //$.ajaxSetup({ cache: false });
    // ////if (event.args && !TGTimeFrame) {
    // //// var args = event.args;
    // //if (event.args) {
    // // var item = event.args.item;
    // // if (item != null) {
    // // item = null;
    // // //alert(“#TGTimeFrame”);
    // // //alert($(“#TGTimeFrame”).jqxDropDownList(‘getSelectedItem’).label + ” label”);
    // // //getHierarchyBJH($(“#TGTimeFrame”).jqxDropDownList(‘getSelectedItem’).value, 1);
    // // //getHierarchyBJHDDL($(“#TGTimeFrame”).jqxDropDownList(‘getSelectedItem’).label);
    // // getHierarchyBJHDDL(“InitialValue”);
    // // event.preventDefault();
    // // return false;
    // // }
    // //} // end of if (event.args) {
    // ////TGTimeFrame = true;
    // ////TGTimeFrame = false;
    // ////cellactionCount = 1;
    // ////} //end of if (cellactionCount == 0) {

    //});


    Ray Choe
    Participant

    function getHierarchyTimeFrameDDL(iniValue) {
    cellactionCount = 0;
    //var TGTimeFrame = false;

    var ModelTimeFrame = function () {
    this.items = ko.observableArray();
    var me = this;
    $.ajax({
    datatype: ‘json’,
    url: “Home/GetHierarchyTimeFrame”
    }).done(function (data) {
    // var jsonData = $.parseJSON(data);
    // me.items(jsonData);
    me.items(data);
    });
    };

    var modelTimeFrame = new ModelTimeFrame();

    // prepare the data
    var sourceTimeFrame =
    {
    datatype: “observablearray”,
    datafields: [
    { name: ‘Description’ },
    { name: ‘lable’ }
    ],
    id: ‘id’,
    localdata: modelTimeFrame.items
    };

    var daTimeFrame = new $.jqx.dataAdapter(sourceTimeFrame);

    ko.applyBindings(modelTimeFrame);
    // create widgets.

    $(“#TGTimeFrame”).jqxDropDownList({ source: daTimeFrame, displayMember: “Description”, promptText: “Select Year…”, autoDropDownHeight: true, valueMember: “lable”, autoOpen: “true”, width: 100, selectedIndex: 0, height: 25, theme: theme });
    //$(“#TGTimeFrame”).jqxDropDownList(‘selectedIndex’, ‘2014’); //not working

    }//end of getHierarchyTimeFrameDDL


    Ray Choe
    Participant

    Nadezhda,
    thanks for your reply. I know I didn’t explain my issue correctly.
    The question is not what I want to achieve but it seems like there’s a bug on jqwidgets any on select event.

    With above example, if I select first dropdownlist item first time, it fires on select event one time. but if I select first dropdownlist item again, it starts firing on select event multiple times instead of only one time. so, if you select same first dropdownlist item third times then it fires more multiple times instead of one time.

    so, what I am saying is that regardless how many times I select the first dropdownlist item, it should fire select event only one time but instead it is keep increasing on select event multiple times.

    thanks for your help!


    Ray Choe
    Participant

    is there way that I can see sample code to see how it works?
    I’ve been using jqxGrid all over my web site, but the issue is that content is not fit into the column size so it chopped off.

    I thought it is auto adjust the column height.

    please help!

    in reply to: Tree dropdownlist Tree dropdownlist #7717

    Ray Choe
    Participant

     

     

    // load the selected tree item when the page is reloaded.

     

     

    var selectedItem = $.jqx.cookie.cookie(“jqxTree”);

    alert(selectedItem);

     

     

    if(selectedItem) {var items = $(“#jqxTree”).jqxTree(‘getItems’);

    $.each(items,function() {

     

     

     

    //if (this.label == selectedItem) {

     

     

    if (selectedItem.indexOf(this.label) > 0) {

     

     

     

     

     

     

    $(‘#jqxTree’).jqxTree(‘selectItem’, this.element);

    $(‘#jqxTree’).jqxTree(‘checked’, true, this.element);

    alert(this.value);

     

     

     

    //return false;

     

     

    var checkbox = $(this);

    checkbox.attr(‘checked’, true);

    $(this).attr(“checked”, true);

    }

     

    });

     

    }

     

     

Viewing 6 posts - 1 through 6 (of 6 total)