Grid: How to prevent row deselection on hit Enter? - extjs

My grid uses CheckboxModel and CellEditing plugin. When the user types something in a field and hits Enter button, then I see that checkmark disappears from the first ckeckbox column. But at the same time getSelectionModel().getSelection() shows, that one row is still selected. This behaviour is quite weird and may confuse ordinary users. So, I need some workaround.
Here is a picture of what is going on. Before:
After:
As you can see, there is no longer checkmark in the first column and no selected records, but getSelection() still shows one record being selected.

After enter you could try fetching the record you had edited and use grid.getSelectionModel().select(record, true, false)

Related

Another Checkbox gets Focus when I hover over the checkbox present in below Table Row

I am facing an issue inside a React App.
On clicking a button, a new Table row gets generated which contains a Checkbox as well. I have three such rows present on my Screen.
When I am trying to select the Checkbox present on Third or Second row, the Checkbox present on the First Row gets Focused and also gets checked.
Can anyone point me in the right direction, what does this issue mean and what can be the potential cause for this.
PS: I am New to Frontend!!

ExtJS 2.x Grid Cell Validation for Duplicate Data

I have ExtJS Grid In which I have Columns called "Mobile Number".
I have made simple thing here When I edit more than 2 rows and If I Modify the Column "Mobile Number" It will be checked whether is it Exist in Grid or Not.
If Duplicate Number found, I will give Message that the Input Mobile Number is already Exist and
reloading the whole grid so all edited data will be gone.
But, I want the non-duplicate data back was edited.
So, How can I keep my non-duplicate data as it is after reload the whole Grid.
I just want to remove duplicate row where found duplication and other edited rows keep as it is.
Can I use this RowEditor plugin for ExtJS 2.x compatible.
http://dev.sencha.com/deploy/ext-3.4.0/examples/grid/row-editor.html
My E-mail: ashwin.parmar2020#gmail.com
To find duplicate data use afteredit event of Ext.grid.EditorGridPanel on that event you will get current record, so just display message and add empty value in that field
You should use a validator for the mobile number field that detects duplicates and refuse the duplicate number. So you don't have to reload the grid.
If you want to reload the grid anyways, you could get the dirty rows before doing so and store/reapply them afterwards.
To get the dirty records you can use the getModifiedRecords() function of the grids store. Use the commitChangesfunction of the store to apply them after validation/processing.

ExtJS 3.4 :: Combobox in grid - wrongly selecting first value when opened

Using ExtJS 3.4
I have a EditorGridPanel and columns with ComboBoxs.
Just noticed that if I three options, say...
Dog
Cat
Mouse
...and Mouse is the saved value, then when I click the dropdown, my field gets populated with Dog - without me selecting it. Whatever the options, my field gets populated with the first value.
This only happens after an initial page load and the first time I click a combobox. Subsequent combo clicks do not elicit this behavior.
Anyone experienced anything like this? Any clue?
Thanks
Paul
autoSelect : false
for combobox component will solve this. Read ExtJS Documentation for more details.

displaying data in textboxes based on

I'm not quite sure where to begin with this. This is basically how I'm trying to get it to work. I will enter the ID of a Hire Record in a textbox, hit the show hire record at which point it will materialise that hire records details in their associated textbox fields.
I attached a screenshot of the form in question. I can also create a new record as you may be able to see by typing in the details and hitting create record (this is not a problem, i already understand how to do this), but I also want to be able to display an existing records details in the textboxes again. Yes I just repeated myself but I just thought I'd try clarify my intentions further :P
http://imageshack.us/photo/my-images/189/hirerecord1.png/
Anyway, how should I go about doing this? Thank you so much for your help.
I do this slightly differently on most of my forms. First off, when a form opens, I bind it to the data (data set, or whatever). I display whatever record I define as the defaults (generally the last record entered. If I want a new record, I have a button that is clicked that creates a new record in the data set and moves my form to that record. Now you can enter your data and handle your edits, saves, etc.
As far as the pulling up a record by typing in a field I believe you could do this with one text box, but I took the easy way out and used two text boxes that are exactly the same size and location. When your form is displaying data, handle the OnClick event for the field bound to the ID. Hide the bound text box and display the duplicate that is unbound. For that text box, handle the OnValidate event and set it to validate on the enter key. The user can then type in the ID and hit enter. You then get the ID they want from the unbound text box, clear it and hide it and cause your form to navigate to the appropriate record.
Jim

Telerik MVC Grid: Conditional row color

In my telerik grid i have a column that has an html.actionlink pointing to a delete function. Now, i dont delete it right away, it stays until the user explicitly says save changes. Is it possible to have the color of the row change depending on a value in the row? So that the user knows which elements are to be deleted?
Edit
I will also find it acceptable to be able to have a conditional in the column so that i can detect if the current element has a delete field set to true, set the command text to un-delete or something.
Never mind. Found the demo for what im looking for
http://demos.telerik.com/aspnet-mvc/grid/customformatting?Grid-page=3

Resources