Has no-one else seen this? What does the grid show for other people when the dataset is empty?
Thanks.
ooh. Just saw “dataEvents” in http://www.trirand.com/jqgridw…..mmon_rules
could this be it!? ![]()
EDIT: Maybe not. Still doesn't help me to find the control that is to be disabled 🙁
Hi,
I had a quick play around but couldn't get it to work exactly – I am using row-editing. I think I need to apply the class you mentioned to a “span” inside the cell to make it work. However, since I'm going to have to do some DOM navigation to do that any way, I wondered if there were a similar method that would give me more control in the future.
i.e. I'm experimenting with this: Say I have two columns, col1 has a pair of radios (Yes/No), col 2 has a dropdown list. I want to disable the dropdown if the user clicks radio “No”, enable if “Yes”…
So I could apply a class to each radion/dropdown control (radio buttons have “classActionRadio”, dropdownlists have “classActionDDL”, etc). I use a jQuery.live call (on page startup) to ensure each radio control with “classActionRadio” has the attached event below (rough code):
Awesome. Thanks. Never thought of that!
Found a workaround by temporarily changing the page size. Hope there's a more “formal” solution.
Code is:
var pageSize = $('#myGrid').getGridParam('rowNum');
$('#myGrid').setGridParam({ rowNum: 10000 }).trigger(“reloadGrid”);
getRowData will then get up to 10000 rows (so set it higher than your max possible rows).
You can then use pageSize to set the page size back to the user's preference.
I should mention that the grid is working on clientside (local) data. i.e. data is requested from the server using jquery, added row by row to the grid, and then finally saved to the server using a customised process external to the grid.
Ideally, a solution would:
1) Set all rows to “editable” (so that the editing controls are visible)
2) Editing data is correctly stored in the underlying grid dataset (on the client)
3) Paging works correctly and editable controls remain visible and persist changes.
4) Final “save” gets all the rows from the grid and packages them up to send to the server (this will be a separate mechanism, as mentioned above, which I'll create outside the grid and send to the server using jQuery.ajax)
Works great! Thank you SO much!
Bill
Hey Tony,
I added localReader but it still didn't work. I update the cell, click another row and the changes seem to stay. However, when I page forward and back – they revert to the original 🙁
Was that the only change I had to make? I'm reading the additional page you sent but am not sure what else would help.
I should mention that this is being tested in IE6, however I used FFox 3.0 (just to be sure) too but had the same problem.
Thanks,
Bill
Hi Tony,
Thanks for getting back so quickly. Unfortunately I just tried you suggestion and it didn't work 🙁
I also tried combinations of 'clientArray' in the editRow/saveRow and as an option parameter – but no luck.
Hope you can help? I've included the whole file below.
Thanks,
Bill
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestJQGridClientArrayFromAC.aspx.cs"
Hi – was wondering if this really is a bug? I just can't get it to persist the data.
Thanks for any help you can give,
Bill
Hi,
Thanks for the info. The “Load array data at once” example works by specifying “mydata” as the data source for the grid as part of the definition but really I need to add the data is add later – after the grid has been defined.
In my case, the way I invetigated using addDataRow or addJSONData. The addJSONData seemed faster but I couldn't make it work using named columns. My method is:
var arr= {};
arr.rows = new Array();
function InitGridTestBulkLoad() {
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top