Focusing the Row to be added in Inline Mode - asp.net

I am trying to add a new row to the ASPxGridView in the inline mode. What I want is, when I click the 'New' button I want the new row that I am going to add, to have the focus, that is, the row should be highlighted. How can I accomplish this?
I have tried ASPxGridView1.FocusedRowIndex = -1; inside the InitNewRow event, but it doesn't highlight the row.
Any suggestions?

This links might guide you :
http://www.devexpress.com/Support/Center/p/Q260744.aspx
http://www.devexpress.com/Support/Center/p/Q259550.aspx
http://www.devexpress.com/Support/Center/Question/Details/Q356961

Related

How to mark a row in a datatable on button click?

I have a datatable with the first column containing a delete button for each row. When I click on that button, the "deleted" row is only marked for deletion (in a bean) until changes are saved (by clicking on "save" button). Meanwhile I would like to etc. change row color or remove the delete button in "deleted" row(s)... something to remind me that the row has already been marked for deletion. Any idea how to accomplish this?
Found a solution, simpler than I thought.
I made css file
.red{
background-color:rgb(250,165,200);
}
and added
rowStyleClass="#{item.rowState eq 'DELETED' ? 'red' : null}"
attribute in dataTable.
Works perfectly!

Kendo UI Grid Using In-Cell and Inline

I have searched endlessly for the answer of this and have a feeling this is not supported. But I want to double check before I give up.
I have a Kendo Grid where I want incell editing turned on if a column downs not have a value and want inline editing for the rows that this column does have a value.
If this is possible, how do I go about implementing this.
Here is what I've tired,
Tried grid default to inline, but never got the cell edit to work.
Tried grid to default to in-cell, where on the edit event, I check to see for this column to see if there is a value, if there is, I close the cell. I added a custom commands button, and tried enable edit mode on the row from the click event. But it seems that you can't do this.
Here is what my click event did...
editClick = function(e) {
var grid = $("#grid").data("kendoGrid");
var row = grid.dataItem($(e.currentTarget).closest("tr"));
grid.editRow(row);
};
Any help will be greatly appreciated.
Thanks in advance.
This is not supported - the Grid cannot switch between the different editing modes on the fly and work-around is kinda impossible.

Flexicious DataGrid Custom Button for expanding nextLevel

I'm just learning how to use Flexicious DataGrid and I have a problem. When I'm setting up my DataGrid I do this:
var flexDataGridColumnLevel:FlexDataGridColumnLevel = new FlexDataGridColumnLevel();
flexDataGridColumnLevel.columns = columns;
flexDataGridColumnLevel.nextLevelRenderer = new ClassFactory(ExampleNextLevelRenderer);
flexDataGridColumnLevel.selectedKeyField = "entityId";
this._view.grid2.columnLevel = flexDataGridColumnLevel;
In order to have a next level on my columns. When I do this, the little "+" button cell is added as the first cell in each row. Adding a whole new column. I don't want this though.
I want to essentially hijack that "+" icon functionality, but add it into a different button. In my rows, I have one column that for each row in that column there is a button. When the user clicks that button THEN I want to expand the row; doing what clicking that "+" icon normally does. Also, I don't want the "+" icon to show at all.
I can't figure out how to do this at all and can't find any examples on the internet.
Thanks for the help!
Set enableDefaultDisclosureIcon=false on the grid, You can also use enableExpandCollapse=true on any column to control which column has the expand collapse icon. If you want to use a custom button, Use an itemRenderer and on click call
var cell:IFlexDataGridCell = parent as IFlexDataGridCell;
cell.level.grid.expandChildrenOf(cell.rowInfo.data))

Add row dynamically to AdvancedDataGrid

I would like to add new row on the fly (runtime) to my AdvancedDataGrid.
I can add it to the data model, but couldn’t find a way to make the table render and show the new row.
What i am seeking for is to create an effect of expandable item, where clicking on row will show "additional information" (like a drawer) and clicking on row expand button will reveal it's children.
I saw examples of this for dataGrid (http://livedocs.adobe.com/flex/3/html/help.html?content=advdatagrid_10.html), but not for AdavancedDataGrid.
Only way I found to do this is to add a new child and use openItem, but this cause the other children to be visible as well.
Any help is greatly appreciated
you need to revalidate the whole datagrid after you added a new item, so that all the new elements can become visible.
yourDataGrid.validateNow();
This should help:)

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