Show Posts
|
Pages: 1 2 [3] 4 5
|
31
|
General Category / EasyUI for jQuery / Datagrid Pagination....Maintaining state....
|
on: July 29, 2013, 10:39:15 PM
|
Howdy...
We want to have the datagrid maintain state, so that when a user comes back to the grid their filters, page and sort is maintained.
The problem is I don't know how to setup the pager or datagrid to notify the server that the request is coming from a button click or filter instead of just a standard page call. When the datagrid loads, it sends all the filter and pagination information as if the user clicked a button. There's not way to identify user interaction versus a page request.
The simplest way would to have a post variable added only when a button is pushed, or filter selected.
Ideas?
|
|
|
33
|
General Category / EasyUI for jQuery / Datagrid Checkbox, turn on/off selected rows....
|
on: July 27, 2013, 03:20:38 PM
|
I have a datagrid that has the check box column, and I would like to enable/disable the checkbox depending on row data passed to the datagrid.
I'm assuming that I can't do this with the default checkbox property, and will have to write a custom editor via formatter.
Is there a better way to selectively enable / disable a checkbox on a row by row basis?
Thanks.
|
|
|
34
|
General Category / General Discussion / Best Practices: Formatting / Styling DataGrids...
|
on: June 19, 2013, 03:42:28 PM
|
We have a Data Grid that is marginally complex. Merging Cells between rows, and about 15 columns. Grouping the data visually has become an issue in order to provide the fastest way to view the data.
We are thinking that column lines might be important in these visual groupings, applying them as end-caps to the grouped columns. e.g. front of column 6, and back of column 8, etc.
First question: How are others styling the Data Grids to visual group information?
Second question: Is there an equivalent to styler for adding a class instead of inline CSS? I would prefer to have a CSS Class that I can update centrally than a bunch of inline-styles. (Granted I could use a centralized function call, but if it's a class the designers can update it themselves.
|
|
|
36
|
General Category / EasyUI for jQuery / ComboBox setValue for non-existent value
|
on: June 13, 2013, 04:58:05 PM
|
When you do a load form, with a combobox, if you have a value to "set" in the combo box and the value doesn't exist, the load method puts the unmatched value in the textbox. e.g. I'm trying to set the combobox value to "5", and since 5 doesn't exist in the drop down, "5" is put in the textbox instead. It should just not load the value at all. (Same with form submission, if the data in the text box doesn't match an option in the drop down, it shouldn't submit that unmatch value/text with the form submission.) Anyway, is there an event I can utilize to detect this "failed" setValue? Or do I have to manually check it with the validate / isValid method immediately after setting it? UPDATE: Here is a Fiddle I setup to show the action described above: http://jsfiddle.net/FrEHv/I also added the validate / isValid check - and it always returns true. How can I verify the data entered if it's always validates true? Or am I using this method incorrectly?
|
|
|
37
|
General Category / Bug Report / hcenter Dialog sometimes off screen...
|
on: June 09, 2013, 03:25:13 PM
|
We have a dialog box that is expandable, so we only hcenter it. It works most of the time very well. Once in awhile the dialog's top starts off screen (too high), otherwise it stays within it's parent as per inline = false.
I'm not sure what's causing the re-positioning, but if we close and open back up it goes back to normal.
We are not doing any other positioning like forcing an x,y position for the upper left corner.
Ideas?
P.S. If I turn inline = true the top of the dialog always appears off screen.
|
|
|
43
|
General Category / Bug Report / Re: datagrid getSelected only works every other time, with merged cells...
|
on: May 16, 2013, 06:42:41 PM
|
The "..." is just our menu anchor. Click on that get our menu and then select the action you want. Edit / Remove / Etc. Here's some code: Table Headers HTML: <thead> <tr> <th field="BankUserName" width="100" sortable="true">Bank User</th> <th field="AccountNumber" width="90" sortable="true">Acct #</th> <th field="Action" width="30" formatter="(function(value, row, index){ return rowAction(row); })"> </th> <th field="CCY" width="40" sortable="true">CCY</th> <th field="ThresholdTypeName" width="50" sortable="true">Type</th> <th field="isInitiator" width="60" sortable="true">Initiator</th> <th field="InitiatorThreshold" width="80" sortable="true" formatter="(function(value, row, index){ return rowNumber(value); })">Threshold</th> <th field="isApprover" width="60" sortable="true">Approver</th> <th field="ApproverThreshold" width="80" sortable="true" formatter="(function(value, row, index){ return rowNumber(value); })">Threshold</th> <th field="isReleaser" width="60" sortable="true">Releaser</th> <th field="ApprovalStatus" width="70" sortable="true">Status</th> <th field="Niente" width="500"> </th> </tr> </thead>
rowAction Menu function rowAction(row) { return "<a href='javascript:niente();' style='text-decoration:none;' onclick='showMenu(this)'> ...</a>"; }
Menu HTML <div id="mm" class="easyui-menu" style="width:120px;"> <div data-options="name:'edit',iconCls:'icon-edit'">Edit</div> </div>
Menu JS function showMenu(object) { var pos = $(object).offset();
$('#mm').menu("show", { left: pos.left, top: pos.top }); } $('#mm').menu({ onClick: function (item) { switch (item.name) { case "edit": editAccount(); break; } } });
Edit Code: function editAccount() { var row = $('#dgAccounts').datagrid('getSelected'); $.messager.confirm('Warning', "Changes will require approval, do you wish to proceed?", function (r) { if (r) { <snip> } }); }
So we click on ".." to active the menu, choose Edit (it's our only option), and when editAcount activates, the getSelect does not alway return an object. var row = $('#dgAccounts').datagrid('getSelected'); This only happens when we merge the cells. When we don't have any cells merged the above works perfectly. Here's how we are merging the cells: onLoadSuccess: function (data) { var rowCount = 0; var mySize = Object.size(data); mySize = (mySize != 0 ? mySize + 1 : 0); while (rowCount < mySize) { $('#dg').datagrid('mergeCells', { index: rowCount, field: 'BankUserName', rowspan: 3 }); $('#dg').datagrid('mergeCells', { index: rowCount, field: 'AccountNumber', rowspan: 3 }); $('#dg').datagrid('mergeCells', { index: rowCount, field: 'Action', rowspan: 3 }); rowCount = rowCount + 3; }
}
|
|
|
|