-
Jun 18th, 2014, 03:32 AM
#1
Thread Starter
Frenzied Member
Refresh Grid
Hi,
I have an accordion with two panes. The first pane has a grid which is being used to search key columns of a table. The second pane has entry fields allowing the user to add, edit, delete etc rows. My problem is when the user goes back to the search grid all changes etc are not being shown. They have to reload the whole form.
Is there any way I can to a part post back and re-get the data?
Many Thanks,
Jiggy
-
Jun 18th, 2014, 04:24 PM
#2
Re: Refresh Grid
Is this a gridview or an Jquery Grid? Because you posted on Jquery.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 3rd, 2014, 12:08 AM
#3
New Member
Re: Refresh Grid
I believe you should use jQuery.data together with jQuery.attr .
-
Jul 4th, 2014, 02:08 PM
#4
Re: Refresh Grid
Since you are not very specific about the setup ( what grid do you use, which server technologie do you use, asp.net, aspmvc, php, node.js) I can't be very helpful. You could trigger a "reload-grid" function on the change of the active accordeon item
-
Nov 24th, 2020, 11:13 PM
#5
Member
Re: Refresh Grid
Hello,@JigaByte
Please try this code,To Refresh Grid
Code:
<button id="Add">Add</button>
<button id="Remove">Remove</button><br />
<div id="Grid"></div>
<script type="text/javascript">
$("#Add").ejButton({
type: "button",
click: function (args) {
var gridObj = $("#Grid").ejGrid("instance");
var data = { OrderID: 10247, CustomerID: "ASDFG", EmployeeID: 4 };
gridObj.model.dataSource.push(data);
gridObj.refreshContent();
}
});
$("#Remove").ejButton({
type: "button",
click: function (args) {
var gridObj = $("#Grid").ejGrid("instance");
var selectedRow = gridObj.selectedRowsIndexes[0];
if (selectedRow != undefined)
gridObj.model.dataSource.splice(selectedRow, 1);
else
alert("No records selected for delete operation");
gridObj.refreshContent();
}
});
</script>
I hope this code will be useful for you.
Thank you.
< advertising removed by moderator >
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|