gid drag and drop

hello,

i was trying to drag and drop between 2 grids with template text field as per below code but the values in textbox kept reset when drag and drop a new row , Please advise in case any solution for that:

@Html.EJS().Grid("Listgrid").DataSource((IEnumerable<object>)ViewBag.Items).AllowFiltering().Columns(col =>

{

    col.Field("ItemCategory").HeaderText("ItemCategory").Add();

    col.Field("ItemDescription").HeaderText("ItemDescription").Add();

    col.Field("QuantityAvailable").HeaderText("QuantityAvailable").Add();

   

}).AllowRowDragAndDrop().AllowSelection().FilterSettings(filter => { filter.Type(Syncfusion.EJ2.Grids.FilterType.Excel); }).SelectionSettings(select=>select.Type( Syncfusion.EJ2.Grids.SelectionType.Multiple)).RowDropSettings(new Syncfusion.EJ2.Grids.GridRowDropSettings() { TargetID = "DestGrid" }).Render()



@Html.EJS().Grid("DestGrid").AllowSelection().AllowRowDragAndDrop(true).Columns(col =>

{

    col.Field("ItemCategory").HeaderText("ItemCategory").Add();

    col.Field("ItemDescription").HeaderText("ItemDescription").Add();

    col.Field("QuantityAvailable").HeaderText("QuantityAvailable").Add();

    col.Field("Quantityuse").HeaderText(" Quantityuse ").Template("#txttemplate").Add();

}).AllowPaging().SelectionSettings(select=>select.Type( Syncfusion.EJ2.Grids.SelectionType.Multiple)).RowDropSettings(new Syncfusion.EJ2.Grids.GridRowDropSettings() { TargetID = "Listgrid" }).Render()

<script id="txttemplate" type="text/x-template">

    <input id="txtbox${ITEMID}" type="text" onchange="notify(this)" />

</script>


thank you,

Best Regards


1 Reply

JC Joseph Christ Nithin Issack Syncfusion Team April 18, 2022 06:12 PM UTC

Hi Jack,


  Greetings from Syncfusion support.


  Before proceeding to the query, we would like you to share the following details so that we may be able to provide a better solution ASAP.


  • Please share a video representation of the issue you are facing.
  • When you try to drag a row from the `Listgrid` to `DestGrid` or the otherway you are facing the issue.
  • Please share the complete code along with the code for the change event of the text box you are using in the template.
  • Please share the Syncfusion package version you are using.


Please get back to us for further details.


Regards,

Joseph I.


Loader.
Up arrow icon