jQWidgets Forums
Forum Replies Created
-
Author
-
March 13, 2020 at 10:53 pm in reply to: Stop text selection after double click Stop text selection after double click #108380
Yes I will try to clarify this to you more.
Yes I have a row selected and I want to keep it selected. When I double click on a row I am running code that opens another browser tab.
The problem is when I return back to this browser tab the mouse is dragging round the elastic band selection box like it is half way through trying to select an area of screen.
So it looks like the double click has started some kind of drag and select process, maybe because I opened a new tab?
I looked at that other article but I’m not sure it helps.
March 5, 2020 at 4:27 pm in reply to: How to put jqxDropDownButton on jqxToolBar How to put jqxDropDownButton on jqxToolBar #108320I fixed it I changed:
ColChooser = tool.children().children();
to:
let ColChooser = tool.children().children();I already had the following higher up in the code so I don’t know why it fixed it
let ColChooser;Maybe some sort of a scope issue but it makes no sense because when I debugged it the id was there
$(“#” + ColChooser[0].id).jqxListBox(‘source’, MySource);March 5, 2020 at 2:48 pm in reply to: How to put jqxDropDownButton on jqxToolBar How to put jqxDropDownButton on jqxToolBar #108317Thank you very much for your help so far but I have a problem to reference the control in the drop down. I can’t change anything on the control.
Here is part of my toolbar init code:
How do I set properties of ColChooser jqxListBox?
case 7:
tool.append(“<div style=’padding: 3px;’><div></div></div>”);
ColChooser = tool.children().children();
ColChooser.jqxListBox({
filterable: true,
filterPlaceHolder: “Search”,
searchMode: “containsignorecase”,
width: 200,
height: 200,
checkboxes: true
});tool.jqxDropDownButton({
width: 100
});
tool.jqxDropDownButton(‘setContent’, “Columns”);tool.on(‘open’, function () {
// This event does fire I can debug into here
// This does nothing
$(“#” + ColChooser[0].id).jqxListBox(‘source’, MyDataSource);
// This does nothing
$(“#” + ColChooser[0].id).jqxListBox(‘filterPlaceHolder’, “test”);
// This does nothing
ColChooser.filterPlaceHolder = “test2”;
// How do I set properties of ColChooser jqxListBox?
});March 3, 2020 at 9:30 am in reply to: Problem setting source in typescript Problem setting source in typescript #108280Also similar to above:
// This does not seem to work
grid.selectedrowindex = Index;// This does work
$(Selector).jqxGrid({ selectedrowindex: Index });February 20, 2020 at 4:07 pm in reply to: Problem with virtual loading Problem with virtual loading #108172I have fixed the main problem with the page draw. I did not understand to start the returned array indexing at the startindex
FixedBut I would still like to know the answer to the questions above – thanks.
February 18, 2020 at 5:19 pm in reply to: How does the filter decide to show string options? How does the filter decide to show string options? #108139Sorry I have found the problem. It seems property getters are working. I was not defining the data types correctly on the data source.
February 18, 2020 at 4:29 pm in reply to: How does the filter decide to show string options? How does the filter decide to show string options? #108138More info – the above getter is in typescript so the compiled JS looks like the following:
Object.defineProperty(AttributeMaster.prototype, “Description”, {
get: function () {
return this.GetValue(“Description”);
},
set: function (Value) {
this.SetValue(“Description”, Value);
},
enumerable: true,
configurable: true
});So my question is can the grid work with properties as data fields or can it only work with simple fields?
February 18, 2020 at 4:16 pm in reply to: How does the filter decide to show string options? How does the filter decide to show string options? #108137Following on from this it seems you have a problem if the dataField refers to a property with a getter rather than a simple field because the filters do not then work.
e.g. On my data entity per row:
// Simple field – this will work fine for filtering on either as a string filter or checkedlist filter
Test = “Testing”;// Getter – this will not work properly – it displays the data in the grid ok – but the normal filter treats it as numeric (as mentioned above) and the checkedlist will just not work and throws an exception
get Description(): string {
return this.GetValue(“Description”);
}February 17, 2020 at 6:50 pm in reply to: Need custom filter type – numeric with contains option Need custom filter type – numeric with contains option #108130Deleted and posted to new thread
February 17, 2020 at 6:06 pm in reply to: Mouse wheel not scrolling grid in IE but works in Chrome Mouse wheel not scrolling grid in IE but works in Chrome #108127Has anyone else tried this?
February 10, 2020 at 3:38 pm in reply to: Cell edit not finished if you move to another row/cell that is read only Cell edit not finished if you move to another row/cell that is read only #108057I am getting round this by getting the cellclick event and calling endcelledit but it would be useful to have this built into the grid.
February 10, 2020 at 11:26 am in reply to: Format a new row received like the data adapter does Format a new row received like the data adapter does #108051Yes I already looked at that example before I wrote that code. It seemed to me (correct me if I am wrong) that it has the following drawbacks:
1. When updatebounddata gets called and it sends the data to the server if you fail validation on the server there is no way to handle that and stay in edit mode. You either have to commit and accept wrong data or do not commit and loose data edits. UI will always be simple validation but the server will have more validation that could fail so the user needs to make more edits.
2. If you want to allow the user to edit multiple rows before saving the data then the save will have to be manually controlled.
3. When you have cell edits which have dependencies to other fields they need to make changes to other data in the row then you need to use updatebounddata to find if the cell has really changed since geteditorvalue and cellendedit do not tell you if the user pressed escape so you don’t know to update the other fields or not. So that means using editmode: ‘selectedcell’ so you could not use updatebounddata to save the data because the row is not ready to be sent yet because that is called for every cell.
February 10, 2020 at 10:37 am in reply to: Grid geteditorvalue is still called if you press escape Grid geteditorvalue is still called if you press escape #108049When that cell value is changed there is other logic in the data which means other fields on that row need to change but obviously don’t want to change the other fields if the cell has not really changed because the user presses ESCAPE. So if they press ESCAPE it still calls geteditorvalue and cellendedit.
So currently I am incorrectly changing other fields in the data base on a change that will not happen.
Does it pass a parameter to either of those callbacks to say the edit has been cancelled? Or is there another event saying edit was cancelled?
February 5, 2020 at 4:52 pm in reply to: Cannot set initial selected value Cannot set initial selected value #108020You can do it right away but you have set to async: false on the data source
February 5, 2020 at 4:50 pm in reply to: Drop down list in grid calls backend 3 times to get data for every row Drop down list in grid calls backend 3 times to get data for every row #108019Well I have found a way round this and that is to load the data source first with dataBind and then put the adapter.records into a variable. Then use the variable for all drop down list data sources.
This also solved the problem in the grid that I could never set the drop down list initial value – probably because the data was never loaded.
So is this the solution that I should be using?
// Need ClassesDataSource to have async: false
ClassesDataAdapter.dataBind();
var ClassesData = ClassesDataAdapter.records;Then use ClassesData as the data source on the drop down lists – now the data is only loaded once from the back end
-
AuthorPosts