I have a GDBG that loads a combobox list from a DataTable at startup with the following code:
oGrid.GridBoundColumns[(int)PanelGridColumn.PanelType].StyleInfo.DataSource = this.oTypeTable;
oGrid.GridBoundColumns[(int)PanelGridColumn.PanelType].StyleInfo.DisplayMember = "Panel";
oGrid.GridBoundColumns[(int)PanelGridColumn.PanelType].StyleInfo.ValueMember = "PanelId";
In the CurrentCellActivated event, the combobox list is reset from a DataView with the following code:
this.oTypeView = new DataView(this.oTypeTable, sFilter, "PanelId", DataViewRowState.CurrentRows);
oCellRend.ListBoxPart.DataSource = this.oTypeView;
oCellRend.ListBoxPart.DisplayMember = "Panel";
oCellRend.ListBoxPart.ValueMember = "PanelId";
This grid allows the user to select and then edit multiple rows with this code in the CurrentCellChanged event:
if (this.bMultiEdit)
{
for (int i=0; i
AD
Administrator
Syncfusion Team
September 22, 2005 02:09 PM UTC
Hi Ken,
Can you try CurrentCellShowingDropDown instead of CurrentCellActivated and let me know if that serves your purpose.
Best regards,
Stanley
Sample
AD
Administrator
Syncfusion Team
September 22, 2005 02:19 PM UTC
The reason for using CurrentCellActivating instead of ShowingDropdown is to give the user the capability of tabbing into the cell and selecting a value by typing. We use AutoComplete functionality extensively in our application.
AD
Administrator
Syncfusion Team
September 23, 2005 01:14 PM UTC
Any progress on this?
AD
Administrator
Syncfusion Team
September 23, 2005 10:49 PM UTC
When you step through your code, does oGrid.CurrentCell.Renderer.ControlValue have the proper value at each point in the loop?
Or does it start out OK, and then looses the proper value? If so, you could cache this value into some temporary varible, and then use this temp varibale in the loop.
Another thing to try is to use CurrentCellControlGotFocus to try to set up the ListBoxPart.DataSource to see if it will make things work.
If you can upload a sample showing this problem, we might be able to suggest a solution.
KJ
Kenneth Johnson
September 27, 2005 02:28 PM UTC
What''s up with the file upload page? I''ve been trying for ten minutes but it never loads.
KJ
Kenneth Johnson
September 30, 2005 12:29 PM UTC
I''ve finally gotten time to put a sample together. This sample creates a reference DataTable that contains the various finish/color options for two parts. After entering different part/finish/color combinations in the grid, select all the rows and revise the color. What I would like to see happen is to display the selected color for each selected row if the color is in fact valid for the row. If not, display an empty cell and display a warning to the user.
Thanks in advance for your assistance in this.
Ken
DeleteGrid_9328.zip
AD
Administrator
Syncfusion Team
October 3, 2005 12:14 PM UTC
Is someone looking into this?
AD
Administrator
Syncfusion Team
October 3, 2005 01:32 PM UTC
If you want guaranteed turn-arounds and know for sure your question will not be overlooked, you should use our Direct Trac support system to log your questions. This is a public forum without any safe guards to prevent questions from being overlooked as new posts are added to the forum.
I think you will have better luck at getting thinsg working if you use CurrentCellShowingDropDown to filter for drop lists. The trick is not to create new DataViews, but just filter your original DataTable. Creating new dataviews causes problems.
Here is you sample back with the code tweaked. As I do not entirely follow your filter logic, I am not sure that it is working exactly as you intend, but hopefully it will point you in the proper direction.
http://www.syncfusion.com/Support/user/uploads/DeleteGrid_3366f091.zip