I have a jqxGrid with 5 columns and dynamic rows. I need to enable/disable or read-only true/false the grid on click of a button. is there a way to apply the property of disable/enable to the entire grid?
You can use $('#GRID ID).jqxGrid({ editable: false}); to make to disabled and $('#GRID ID).jqxGrid({ editable: true}); to make it editable.
There is a property called "editable" which enables/disables the Grid's editing and makes it "read-only"
Related
I know how you can initially show or hide Sat/Sun on the calendar by setting:
weekends: true,
If I use a toggle button what do I call to change it interactively?
Thank you for the document reference #ADyson. Not sure why I didn't see the dynamic options. Didn't need to re-render.
calendar.setOption('weekends', false);
Is it possible to show or hide a comboBox based off the selection made in another comboBox. I have been looking for documentation on this to no avail.
Thanks
Yes, in a Change handler of ComboBox1 set ComboBox2's visible property to false based on the selected item.
Along with setting the combobox's visible property, if you want the form to act as if the combobox is not there, also set the includeInLayout property.
I have an editable datagrid. If sorting is applied by clicking any header of datagrid, it works fine. But after that, if data values are changed in any row of datagrid, sorting is applied automatically. How to prevent from this behaviour? i.e. sorting should only be applied if user clicks on any header of datagrid and sorting should not be applied when user modifies data in grid.
You have to set sortableColumns to false and handle the headerRelease event, where you do the sorting manually on the data source.
<mx:DataGrid sortableColumns="false" headerRelease="onHeaderRelease(event)" ...
just call Object(owner).dataProvider.disableAutoUpdate() before committing the value in your item editor.
I know that you're asking this issue in Flex 4 but I hope the solution that I found in Flex 3 will help.
I also had the same exact problem but then I realized that something in the data must be triggering the sorting to happen.
And it turned out that I was setting the data to be [Bindable]. This made sense to see sorting happened automatically because the value change dispatch propertyChange event.
If you do need to make the data to be [Bindable], use custom binding:
http://livedocs.adobe.com/flex/3/html/help.html?content=ascomponents_4.html
I need to mimic Wordpress "Widget" drag & drop behavior. jQuery UI Sortable can do it but not the same way as WP.
I can drag & drop now but the dropped element is removed from the source. That's not what I expected.
Let's say I have two <ul> A and B. I drag an item of A and drop it to B and I expect the item stay within A, not to be removed from it.
Any idea? I really appreciate your helps!
Check out the jQuery Draggable Sortable demo
If you want the draggable item to remain in the first list as well look you need to set 'helper' to 'clone'
ie.
$( "#draggable" ).draggable({
connectToSortable: "#sortable",
helper: "clone",
revert: "invalid"
});
I have a gridview that sets the AutoGenerateEditButton="true"
How can I set the width of the resulting column?
I don't know if you can set the width when the Edit button is auto-generated.
But you can set it if you add the CommandField.
Steps:
Set AutoGenerateEditButton back to false
Expand the GridView Tasks window using the funny little arrow button in the top right of the GridView
Select 'Edit Columns'
Expand the 'Command Field' node in the Available Fields list.
Select 'Edit, Update, Cancel' and then click the Add button
Make sure 'Edit, Update, Cancel' is selected in the Selected Fields list
Expand the 'ItemStyle' node in the CommandField properties list
Shazaam, there is your width property down near the bottom.
The Command buttons (edit, cancel, update) will still behave as if you had auto-generated them, you just get more control over the layout.
I believe that you don't have direct control over the column containing the edit button - because of the "AutoGenerate" in the property you are setting, it is rendered automatically.
An alternative is to set AutoGenerateEditButton="False", and define a column containing the Edit command button yourself. Then in the markup, you can set the width of that column yourself.