unable to determine the selected cell using ng grid - angular-ui

Is actually possibile to find which is the selected cell in a ng grid component, after I enabled enableCellSelection?
thanks,
Luca Morelli

Not sure if this is exactly what you need, but you could get notified upon clicking in a cell what row and column were selected using a cell template.
Plunker:
http://plnkr.co/edit/5qXXV8S8QyV4I8kOF53n?p=preview
var myCellTemplate = '<div ng-click="clicked(row.rowIndex,col.index)">{{row.getProperty(col.field)}}</div>';

Related

Show values in grid according to a combobox selected value

I have a combobox, on which I have to choose one option. That option determines which values should be shown on the comboboxes of a grid. The values to show on the grid's comboboxes are on a table. Right now, I'm showing all of them, but I need to filter it down.
The user must choose a value on combobox #1, and the comboboxes inside the grid (#2) should only show the related values. So far, I haven't been able to accomplish this.
Thanks in advance!
Refresh your drop down list as follows:
&l_field.ClearDropDownList();
/* select values required by sql */
&l_sql = CreateSql("...");
While &l_sql.Fetch(&l_key, &l_descr)
&l_field.AddDropDownItem(&l_key, &l_descr);
End-While;

How to get the selected rows in ASPxGridView?

I have a grid with ASPxCheckBox in Data Item Template. How to get KeyFieldValue of all rows whose checkbox is checked. I am trying to do this using client-side code and do it for whole grid not on visible index. Is it possible?
Note: I cannot use simple row selection command column as I am using it for some other purpose.
if you dontuse client-side code, you should use detailrow in aspxgridview. And you must use beforeperformdataselect event. if you really need checkbox, you can add checkbox a new field in asapxgridview.

Get clicked cell value in DevExpress DataGrid using WPF

I have a DevExpress DataGrid in wpf apllication and it will contain two columns my problem is that I want to get particular clicked cell value in DevExpress DataGrid.
Please anybody help me!
You can identify clicked column and row handle using the hit-information returned by the GridView.CalcHitInfo() method:
GridHitInfo hitInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y));
if(hitInfo.InRowCell){
object value = View.GetRowCellValue(hitInfo.RowHandle, hitInfo.Column);
//...
}
Related help-article: Hit Information Overview
Related How-To: Identify the Grid's Element Located Under the Mouse Cursor

How to add data to the grid from another selected record of another grid

I am using RowEditor plugin for my grid. Grid record has three buttons: choose,update,cancel. When I click on choose it will display another grid and user has to click on one record, then some values of that record have to display on the previous grid. How to do this ?
I am using extjs 3.0
Thanks in advance!
When you click on choose - show a modal window popup with grid. When you open that popup pass a callback into constructor of the popup. Then force user to select only one record in grid (using rowselectmodel). On itemclick even of the child grid - call your callback and pass selected data in the parent grid. Update parent's grid record with this data.
Hope I was clear.
To figure out which row the user selected, use the Ext.grid.GridPanel's SelectionModel. The default model is Ext.grid.RowSelectionModel (use selModel config setting to change the default). To grab the selected row, call myGridPanel.getSelectionModel().getSelected(). That will return an Ext.data.Record. Dig into that data to populate the original grid/store.
Thanks for your reply. I have done the required things.
How I have done is, just passed the editor to my function and using selection model, I got the values and have placed them into the editor.
val1 = selectedArray[0].get('val1');
var cm = grid.colModel, fields = editor.items.items, f, val;
f = fields[1];
f.setValue(val1);
editor.values[f.id] = val;
This makes my life easier.
But, I have another problem, after placing into the editor. I have to do validation in the afteredit event, if user clicks the update button. In the afteredit event,
afteredit: function(object, changes, record, rowIndex)
{
// I have to do validation on the changes; but its an object. How will I do it
???
}

Focus back to datagrid column after editing in flex

How can I get back the focus to the column after editing datagrid by Keypress.Enter, so that I can move to another column using arrow keys. Now its stuck in the edited cell and I cant move to another column.
Thanks,
Rej
Use focusManager to setup focus of cell which should be presented inside of event.currentTarget
read next articles:
http://www.vaishalimistry.com/2005/12/15/set-focus-on-a-cell-in-datagrid-in-flex-20/
http://www.axelscript.com/2008/02/20/using-the-focusmanager-in-flex/

Resources