EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 16, 2024, 06:00:56 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
ADD 10 Blank Rows in edatagrid
Pages: [
1
]
« previous
next »
Print
Author
Topic: ADD 10 Blank Rows in edatagrid (Read 5549 times)
binte.hava
Newbie
Posts: 5
ADD 10 Blank Rows in edatagrid
«
on:
March 07, 2014, 06:33:10 AM »
Hi!
I have a button and i want to add 10 Blank rows in the edatagrid. right now the code that i m using add only one row.
<table id="dgsv_admin" title="WORKSHEET" style="width:950px; height:460px;"
toolbar="#toolbar" pagination="false" idField="id"
rownumbers="false" fitColumns="false" singleSelect="true">
<thead>
<tr>
<th field="code" width="62" editor="{type:'validatebox',options:{required:true}}">Code</th>
<th field="type" width="64" editor="{type:'validatebox',options:{required:true}}">Type</th>
</tr>
</thead>
</table>
Here is the code to add Rows to the above grid:
<button class="btn btn-success" onClick="javascript:$('#dgsv_admin').edatagrid('addRow')">ADD 10 ROWS</button>
Any solution regarding this....?
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: ADD 10 Blank Rows in edatagrid
«
Reply #1 on:
March 07, 2014, 08:26:28 PM »
To append a row for editing, try this:
Code:
$('#dg').edatagrid('addRow');
To append a row and save it, try this:
Code:
$('#dg').edatagrid('addRow', {row:{...}}).edatagrid('saveRow');
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...