jQWidgets Forums

Forum Replies Created

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

  • mixcoder
    Participant

    Hi thanks for helping me in the right direction :). It was a tough one to solve but I end up with at solution using DIV as you said.

    I send back the date to the server using the dateformat ‘dd-MM-yyyy 00:00:00’. This works fine and I guess that i works as long the host windowsserver stay with the same regional settings.

    New source:

    @using (Html.BeginForm())
    {
    @section scripts {
    $(document).ready(function () {
    $(“#jqbirthday”).jqxDateTimeInput({ width: ‘300px’, height: ’25px’, value: new Date(@Html.Raw(Model.birthday.Year), @Html.Raw(Model.birthday.Month – 1), @Html.Raw(Model.birthday.Day)), formatString: “dd/MM-yyyy” });
    });
    function ThisSubmit()
    {
    document.getElementById(‘birthday’).setAttribute(“value”, $.jqx.dataFormat.formatdate(new Date($(‘#jqbirthday’).jqxDateTimeInput(‘getDate’)), ‘dd-MM-yyyy 00:00:00’));
    }
    }
    }

    @Html.HiddenFor(model => model.birthday)
    <div id=”jqbirthday” ></div>

    <input type=”submit” value=”Save” class=”btn btn-default” onclick=”ThisSubmit()” />


    mixcoder
    Participant

    Hello I just tried without luck to insert the “name” attribute. Chrome debug output:

    <input style=”border: none; padding: 4px 3px; width: 256px; left: 0px; top: 0px; text-align: left;”
    class=”jqx-position-absolute jqx-reset jqx-clear jqx-input-content jqx-widget-content jqx-rc-all”
    id=”inputbirthday” name=”birthday” autocomplete=”off” type=”textarea” placeholder=””>

    I also without luck tried to insert attribute id=”birthday” but it is automatically changed to id=”inputbirthday”.

    I have no error in clientside and backend as well. Still just get the original date back in my controller.

    Perhaps it is important that both “id” and the “name” tags have the value “birthday”. That’s the way it is for bootstrap datepicker. But appearently I can’t assign the id.

    Any ideas?

    Changed file Edit.cshtml contains the following code:

    @using (Html.BeginForm())
    {
    @section scripts {
    $(document).ready(function () {
    $(“.myJqxDateTime”).jqxDateTimeInput({ formatString: “yyyy-MM-dd”, width: ‘300px’, height: ’25px’ });
    });
    }
    }

    <div class=”form-group”>
    @Html.EditorFor(model => model.birthday, “{0:yyyy-MM-dd}”, new { htmlAttributes = new { @class = “.myJqxDateTime”, @name = “birthday” } })
    </div>

    <input type=”submit” value=”Save” class=”btn btn-default” />


    mixcoder
    Participant

    Hello Hristo – you are the man of the day. It works perfect now! Thank you very much for your help.


    mixcoder
    Participant

    Hi again, I still have to mouseclick 2 times to edit the dropdown input field. I also have to mouseclick 2 times to edit the columns with a textfield.

    Is it possible somehow to change the grid in a way you only have to mouseclick one time to edit dropdown input search field and normal textfields as well?

    Then it would really be a perfect grid. It already seems pretty cool. Thanks


    mixcoder
    Participant

    Hello Hristo thanks for your help :).. Its a bit hard to explain but I want a listbox in each cell. I have posted the code and just want to know how to get the value the user enter and then i also ask whether it is possible to enable the cursor in the inputfield at the first mouseclick.


    mixcoder
    Participant

    Hi Hristo, i’m interested in a grid like excel where you can jump between the cells and edit the cells without too many mouseclicks. When leaving a row i will send row data to the server. Cells (columns) are the types “text”, “date” and “listbox”. Listbox must be with a search inputfield which mean that option “filterable” on the listbox is true.

    I’m not interested in a search/filter row.

    I have seen many grids but soo far jqwidgets seems to be the best choice. However i really need to be able to have a listbox type and also to enter the grid fields easy with just one mouseclick or keyboard arrows.


    mixcoder
    Participant

    Btw: I know that I specify a columntype: ‘dropdownlist. But if I specify a columntype ‘listbox’ it doesn’t work at all.


    mixcoder
    Participant

    Thank you very much for the reply :-). I’m sure the file is in the right folder and if I remove this single line from the code:

    editable: true,

    then it all works fine. As said there is another thread

    http://www.jqwidgets.com/community/topic/columnresizable-not-working/

    with excactly the same problem ufortunately without any solution. I have tried 2 different samples both with the same problem with the
    jqxgrid.edit.js file. The code is 100% from the sample on jqwidgets.com soo it should be working and the “$(document).ready(function () {” declaration is around all the code.

    Perhaps it is a problem with VS 2017. Is there any other users here who can confirm it works with VS2017 or another version of VS?

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