Can someone help me with this:
I have a screen that show a office 2007 toolbar at the top, I have a "Home" -Tab that contains 3 Options "Add", "Modify", "Delete". The screen shows a tabbedmdi that shows the grids in tabs.
The grid has a cellproxy screen attached to it.
1. How can I open the cellproxy screen of the selected row in the grid by clicking the option "Modify" in the toolbar (Currently this is done through the buildin function of the grid)
2. How can I open the blank cellproxy screen to create a new row with the "Add" option in the toolbar (currently done by the new-button of the grid
3. How can I delete the selected row from the grid by the option "Delete" in the toolbar (currently done by the delete button on the keyboard )
Keep in mind that the grid is displayed in a tabbedmdi an so multiple grids can be open.
related question the cellproxy to create rows stay open after the creation of a new row and be reset to blank to create a new row?
Hi,
Ronny Gilisen said:The grid has a cellproxy screen attached to it.
I'm not sure what a "cellproxy screen" is, but I assume you are referring to a RowEditTemplate?
Ronny Gilisen said:1. How can I open the cellproxy screen of the selected row in the grid by clicking the option "Modify" in the toolbar (Currently this is done through the buildin function of the grid)
this.ultraGrid1.ActiveRow.RowEditTemplateResolved.Show();
You probably should check for ActiveRow != null and RowEditTemplateResolved != null.
Ronny Gilisen said:2. How can I open the blank cellproxy screen to create a new row with the "Add" option in the toolbar (currently done by the new-button of the grid
this.ultraGrid1.ActiveRow.Band.AddNew();
Then see #1 and show the RET on the new row.
Ronny Gilisen said:3. How can I delete the selected row from the grid by the option "Delete" in the toolbar (currently done by the delete button on the keyboard )
this.ultraGrid1.DeleteSelectedRows();
Ronny Gilisen said:Keep in mind that the grid is displayed in a tabbedmdi an so multiple grids can be open.
So you will need to get the ActiveMdiChild form and get the grid from that form.
Ronny Gilisen said:related question the cellproxy to create rows stay open after the creation of a new row and be reset to blank to create a new row?
I don't understand the question.
You are correct I was speaking of the RowEditTemplate.
thanks for the commands to use, but I still have a problem as the "Add", "Modify", "Delete" are in an toobar in the header of the screen and I enter the code at _Toolclick subroutine where I check which of the these options is clicked. How can I know in tab of the tabbedmdi and related grid the user selected a row.
the last bit needed some more explenation:
how can I keep the rowedittemplate screen open every time a row is created until cancel is clicked.
best regards
Ronny
Hi Ronny,
Ronny Gilisen said:thanks for the commands to use, but I still have a problem as the "Add", "Modify", "Delete" are in an toobar in the header of the screen and I enter the code at _Toolclick subroutine where I check which of the these options is clicked. How can I know in tab of the tabbedmdi and related grid the user selected a row.
Whether you are using the Infragistics controls like TabbedMdi makes no different here. You still do this in the same way. You can get the active form from your MdiParent form using the ActiveMdiChild property.
Ronny Gilisen said:how can I keep the rowedittemplate screen open every time a row is created until cancel is clicked.
I guess you could try changing the code in the Ok button click event of the RowEditTemplate so it doesn't close the template. I'm not sure if this will work, though.