jQWidgets Forums

Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • in reply to: cascating combobox issue cascating combobox issue #52924

    bhanu.vaddavalli
    Participant

    Hi,

    Place holder is working fine with combo-box but it is in grid its not showing place holder in IE only
    Regards,
    bhanu.v

    in reply to: grid cell focus grid cell focus #51896

    bhanu.vaddavalli
    Participant

    Hi,

    i have three cells in grid EP.title, ep.No and language i selected EP.title and then i pressed tab then focus is at EP.No and mouse yarrow is at Language because i disabled EP.NO so when i click on tab from Ep.Title i need focus to language. but in our demo there is no such functionality.
    Regards,
    Bhanu.v

    in reply to: combobox with grid combobox with grid #50559

    bhanu.vaddavalli
    Participant

    Hi,
    My code is this
    $(“#IngestGrid”).jqxGrid(
    {
    width: ‘99.5%’,
    source: source,
    // pageable: true,
    height: 550,
    theme: ‘arctic’,
    sortable: true,
    altrows: true,
    enabletooltips: true,
    columnsresize: true,
    columnsreorder: true,
    ////editmode: ‘programmatic’,
    localization: getLocalization(),
    //selectionmode: ‘singlecell’,
    selectionmode: ‘multiplecellsadvanced’,
    editable: true,
    handlekeyboardnavigation: function (event) {
    var key = event.charCode ? event.charCode : event.keyCode ? event.keyCode : 0;

    if (key == 27) {
    return true;
    }
    },

    columns: [

    ///Customer
    {
    text: ‘Customer’, datafield: ‘Customer’, width: ‘12%’, columntype: ‘combobox’,
    cellbeginedit: Customer_cellbeginedit,
    createeditor: CreateEditorForCustomer1,
    initeditor: initeditorforCustomer,
    geteditorvalue: Customer_GetEditorValue

    },
    ///Title
    {
    text: ‘Title’, datafield: ‘Title’, width: ‘12%’, columntype: ‘combobox’, sortable: false,
    cellbeginedit: Title_cellbeginedit,
    createeditor: CreateEditorForTitle1,
    initeditor: initeditorforTitle1,
    geteditorvalue: Title_GetEditorValue

    }
    });
    function initeditorforCustomer(row, column, editor) {
    _editingRowIndex = row;

    if ($(“#IngestGrid”).jqxGrid(‘getrowdata’, _editingRowIndex) != undefined) {
    if ($(“#IngestGrid”).jqxGrid(‘getrowdata’, _editingRowIndex).CustomerMetaData.PKCustomerID <= 0) {
    var _editorValue = editor.val();
    console.log(_editorValue);
    if (_editorValue != undefined && _editorValue.length > 2) {
    editor.val(”);
    console.log(editor.value);
    }
    }
    }
    }

    var isChanged = false;
    var _increment = 0;

    function CreateEditorForCustomer1(row, column, editor) {
    // assign a new data source to the dropdownlist.
    //_editingRowIndex = row;

    editor.jqxComboBox({
    //autoDropDownHeight: true,
    dropDownHeight: ‘211px’,
    source: _customersDataAdapter,
    //source: [],
    displayMember: ‘XytechCustomerName’,
    valueMember: ‘PKCustomerID’,
    searchMode: ‘startswithignorecase’,
    enableSelection: true,
    enableHover: true,
    //autoDropDownHeight: true,
    showArrow: false,
    //autoComplete:true,
    remoteAutoComplete: true,
    dropDownHorizontalAlignment: ‘left’,
    openDelay: ’50’,
    renderSelectedItem: function (index, item) {

    var item = _customersDataAdapter.records[index];
    if (item != null) {

    var label = item.XytechCustomerName;
    return label;
    }
    return “”;
    },
    search: function (searchString) {
    _customersDataAdapter.dataBind();
    }
    });
    editor.on(“change”, function (event) {
    _pKCustomerID = editor.val();
    var _selectedCustomer = null;
    if ($.type(_pKCustomerID) == “number”) {

    _selectedCustomer = editor.jqxComboBox(‘getSelectedItem’);//.originalItem
    console.log(_selectedCustomer.label);
    //editor.jqxComboBox(‘focus’);
    AssignCustomerMetaData1(_selectedCustomer);
    if (_increment != 0) {
    $(“#comboboxeditorIngestGridCustomer”).jqxComboBox(‘val’, _selectedCustomer.label);

    }
    _increment++;
    //GetCustomerTitles(_pKCustomerID, null);
    //return _selectedCustomer.label;
    }

    });
    editor.on(‘open’, function (event) {
    var _selectedIndex = editor.jqxComboBox(“selectedIndex”);// $(“#” + event.currentTarget.id).jqxComboBox(‘getSelectedIndex’);
    //editor.jqxComboBox(‘dropDownHeight’,’100′);
    if (_selectedIndex != undefined && _selectedIndex >= 0) {

    //$(“#” + event.currentTarget.id).jqxComboBox(‘selectIndex’, _selectedIndex);
    //$(“#” + event.currentTarget.id).jqxComboBox(‘ensureVisible’, _selectedIndex);
    //$(“#” + event.currentTarget.id).jqxComboBox(‘focus’);

    }

    });
    }

    var Customer_cellbeginedit = function (row, datafield, columntype, value) {
    $(‘#IngestGrid’).jqxGrid(‘setcolumnproperty’, datafield, ‘width’, ‘12%’);

    if (value == undefined) {
    if (_customersDataAdapter._options.data != undefined) {

    _customersDataAdapter._options.data.query = “”;
    _customersDataAdapter.loadedData = [];

    if ($(“#comboboxeditorIngestGridCustomer”).length > 0) {
    $(“#comboboxeditorIngestGridCustomer”).jqxComboBox(‘searchString’, ”);
    //alert(‘height’);
    //$(“#comboboxeditorIngestGridCustomer”).jqxComboBox(‘dropDownHeight’, ‘100px’);
    _customersDataAdapter.dataBind();
    }
    }
    }
    else {
    if (_customersDataAdapter._options.data != undefined) {
    _customersDataAdapter._options.data.query = value;
    if ($(“#comboboxeditorIngestGridCustomer”).length > 0) {
    //$(“#comboboxeditorIngestGridCustomer”).jqxComboBox(‘searchString’, value);
    console.log(value);
    //$(“#comboboxeditorIngestGridCustomer”).jqxComboBox({ dropDownHeight: ‘100px’ });

    _customersDataAdapter.dataBind();
    }
    }
    }
    }

    function CreateEditorForTitle1(row, column, editor) {
    // assign a new data source to the dropdownlist.
    _editingRowIndex = row;

    editor.jqxComboBox({ //autoDropDownHeight: true,
    dropDownHeight: ‘250px’, displayMember: ‘FeatureSeriesTitle’, valueMember: ‘PKTitleID’, searchMode: ‘containsignorecase’, autoOpen: true,
    autoComplete: true //enableSelection: true, enableHover: true,
    });
    editor.on(“change”, function (event) {
    var titleId = editor.val();
    if ($.type(titleId) == “number”) {
    var _selectedItem = editor.jqxComboBox(‘getSelectedItem’);//.originalItem
    $(“#comboboxeditorIngestGridTitle”).jqxComboBox(‘val’, _selectedItem.label);
    AssignTitleMetaData2(_selectedItem);
    isChanged = true;
    }
    });
    editor.on(“close”, function (event) {

    //var _editingRow = $(“#IngestGrid”).jqxGrid(“getrowdata”, _editingRowIndex);
    //var bgcolor = $(“#row” + _editingRow.uid + “IngestGrid div:nth-child(9)”).css(“background-color”);
    ////var bgcolor1 = $(“#row” + _editingRow.uid + “IngestGrid div:nth-child(8)”).css(“background-color”);
    //var t = $(“#row” + _editingRow.uid + “IngestGrid div:nth-child(8)”).text();

    //if (t == “”) {
    // var titleId = editor.val();
    // var _editingRow = $(“#IngestGrid”).jqxGrid(“getrowdata”, _editingRowIndex);
    // if (_editingRow.EpisodeTitle == null) {
    // var _isEmpty = true;
    // }
    // _editingRow.EpisodeNumber = null;
    // _editingRow.EpisodeTitle = null;
    // if ($.type(titleId) == “number”) {
    // var _selectedItem = editor.jqxComboBox(‘getSelectedItem’);//.originalItem
    // $(“#comboboxeditorIngestGridTitle”).jqxComboBox(‘val’, _selectedItem.label);
    // }
    // $(“#row” + _editingRow.uid + “IngestGrid div:nth-child(9)”).text(”);
    // $(“#row” + _editingRow.uid + “IngestGrid div:nth-child(8)”).text(”);
    // if (!_isEmpty && isChanged) {
    // $(“#IngestGrid”).jqxGrid(‘updaterow’, _editingRowIndex, _editingRow);
    // isChanged = false;
    // }
    // //$(‘#IngestGrid’).jqxGrid(‘updating’);
    // //$(“#IngestGrid”).jqxGrid(“updating”);
    //}
    });
    }
    function initeditorforTitle1(row, column, editor) {
    _editingRowIndex = row;

    var editingRow = $(“#IngestGrid”).jqxGrid(“getrowdata”, _editingRowIndex);
    if (editingRow != null && editingRow.CustomerMetaData.PKCustomerID != undefined) {
    if (editingRow.CustomerMetaData.PKCustomerID != 0) {
    _pKCustomerID = editingRow.CustomerMetaData.PKCustomerID;
    //console.log(editor.val() + “,” + editingRow.Title);
    editor.val(”);
    if (editingRow.Title == undefined) {

    editor.val(”);
    setTimeout(function () {
    $(“#comboboxeditorIngestGridTitle”).jqxComboBox(‘val’, ”);
    }, 500);
    }
    if ($.type(editor.val()) != “number”) {
    editor.val(”);
    }

    //GetCustomerTitles(_pKCustomerID, null, editor);

    AssignTitlesToEditor();

    }
    else {
    editor.jqxComboBox({ source: [] });
    }
    }
    else {
    editor.jqxComboBox({ source: [] });
    }
    }
    function Customer_GetEditorValue(row, cellvalue, editor) {
    _editingRowIndex = row;

    if (editor.jqxComboBox(‘getSelectedItem’) != null) {
    return editor.jqxComboBox(‘getSelectedItem’).label;
    }
    else if (cellvalue == $(“#IngestGrid”).jqxGrid(“getrowdata”, row).CustomerMetaData.XytechCompanyName) {
    return cellvalue;
    }
    else {
    return “”;
    }
    }

    function Title_GetEditorValue(row, cellvalue, editor) {
    _editingRowIndex = row;

    var _editingRow = $(“#IngestGrid”).jqxGrid(“getrowdata”, _editingRowIndex);
    if (editor.jqxComboBox(‘getSelectedItem’) != null) {
    //return editor.jqxComboBox(‘selectedIndex’, -1);
    var _editingRow = $(“#IngestGrid”).jqxGrid(“getrowdata”, _editingRowIndex);
    //var bgcolor = $(“#row” + _editingRow.uid + “IngestGrid div:nth-child(9)”).css(“background-color”);

    //if (bgcolor == “rgb(128, 128, 128)”) {
    // if (_editingRow.EpisodeTitle == null) {
    // var _isEmpty = true;
    // _editingRow.EpisodeNumber = null;
    // _editingRow.EpisodeTitle = null;
    // }
    //}
    if (_editingRow.TitleMetaData.TitleType == “Feature”)
    {
    $(“#IngestGrid”).jqxGrid(‘setcellvalue’, row, “EpisodeTitle”, ” “);
    $(“#IngestGrid”).jqxGrid(‘setcellvalue’, row, “EpisodeNumber”, null);
    }
    console.log(_editingRow.TitleMetaData.TitleType);
    return editor.jqxComboBox(‘getSelectedItem’).label;
    }
    else {

    //if (_editingRow.TitleMetaData.TitleType == “Feature”) {
    // editor.value = ”;
    // editor.val() = ”;
    // _editingRow.EpisodeNumber = null;
    // _editingRow.EpisodeTitle = null;
    // $(“#row” + _editingRow.uid + “IngestGrid div:nth-child(9)”).text(”);
    // $(“#row” + _editingRow.uid + “IngestGrid div:nth-child(8)”).text(”);
    // // $(“#comboboxeditorIngestGridEpisodeTitle”).jqxComboBox({ source: null});
    // $(“#IngestGrid”).jqxGrid(‘setcellvalue’, row, “EpisodeTitle”, ” “);
    // $(“#IngestGrid”).jqxGrid(‘setcellvalue’, row, “EpisodeNumber”, ” “);

    // return;
    //}

    if (cellvalue == $(“#IngestGrid”).jqxGrid(“getrowdata”, row).Title)
    {
    // return editor.val();
    return cellvalue;
    }
    else {
    return “”;
    }
    }

    }
    var Title_cellbeginedit = function (row, datafield, columntype, value) {

    _editingRowIndex = row;
    $(‘#IngestGrid’).jqxGrid(‘setcolumnproperty’, datafield, ‘width’, ‘20%’);
    var _editingRow = $(“#IngestGrid”).jqxGrid(‘getrowdata’, row);

    if (_editingRow.Customer == undefined) {
    value = “”;
    ShowErrorNotifyMessage(‘Please select Customer…’);
    return false;
    }
    else if (_editingRow.Customer.trim().length == 0) {
    value = “”;
    ShowErrorNotifyMessage(‘Please select Customer…’);
    return false;
    }

    if (_editingRow.CustomerMetaData.PKCustomerID != 0) {
    value = “”;
    _pKCustomerID = _editingRow.CustomerMetaData.PKCustomerID;
    GetCustomerTitles(_pKCustomerID, null, null);

    //$(“#comboboxeditorIngestGridTitle”).jqxComboBox(‘searchString’, value);
    }
    }
    Regards,
    Bhanu.v

    in reply to: combobox with grid combobox with grid #50554

    bhanu.vaddavalli
    Participant

    Hi,
    What you said is working perfectly but combo-box showing before selected values first, after 2 seconds they are showing re-set values.

    Regards,
    Bhanu.v

    in reply to: grid with combo boxes grid with combo boxes #50461

    bhanu.vaddavalli
    Participant

    Hi,

    Great Peter Stoev its worked for me thanking you very much.

    Regards,
    Bhanu.v

    in reply to: auto open of combo box auto open of combo box #50460

    bhanu.vaddavalli
    Participant

    Hi,

    Thanks for your reply its working for normal combo-box but i have combo-box in grid(combo box is not opening for on focus in grid) please tell me.

    Regards,
    Bhanu.v

    in reply to: jqxwindow background color jqxwindow background color #50336

    bhanu.vaddavalli
    Participant

    Thanking You very much…..

    in reply to: Checkbox issue in Row Edit Checkbox issue in Row Edit #46090

    bhanu.vaddavalli
    Participant

    <img src=”https://www.google.co.in/search?hl=en&site=imghp&tbm=isch&source=hp&biw=1600&bih=799&q=bhanu.vaddavalli&oq=bhanu.vaddavalli&gs_l=img.12…1341.6365.0.7597.16.7.0.9.0.0.842.2542.1j2j0j1j1j1j1.7.0….0…1ac.1.32.img..14.2.187.EU6tYLOFqms#facrc=_&imgdii=_&imgrc=-inbXr96kUwOQM%3A%3B3EJ0GWZonilRGM%3Bhttps%253A%252F%252Flh5.googleusercontent.com%252F-uvI_nV70vO0%252FUMCovc5jH9I%252FAAAAAAAAAA4%252FDqQjXPNkUMs%252Fbhanu%2525252520photo.jpg%3Bhttps%253A%252F%252Fpicasaweb.google.com%252F106683757909927880859%252FProfilePhotos02%3B331%3B332
    ” alt=”problum with grid row editing” />

    hi this is the image for above code. here grid making two requests separately to update the data, one for check box and another for remaining columns.


    bhanu.vaddavalli
    Participant

    the above approach is also not worked for me

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