PO
poornima
December 12, 2006 09:18 AM UTC
Hi,
In the given sample, the choicelist is refreshed in the QueryCellInfo Event which keeps on firing even if specific conditions are specified. My application seems to hang since the event fires continuously. Is there any other solution for the issue.
Regards
Poornima S
>Hi Poornima,
Here is a KB article that discuss with the simillar issue.
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=102Best Regards,
Haneef
AD
Administrator
Syncfusion Team
December 12, 2006 11:35 AM UTC
Hi Poornima,
The attached sample shows you How to change the datasource of the one combobox cell depending upon the value selected in another combobox in a grid. It uses the CurrentCellShowingDropDown event to populate the datasource of the combobox cell dynamically.It also implements the CurrentCellCloseDropDown for clearing the datasource of the cell. Please refer to the attached sample for more details.
Sample :
ComboBoxDatasource.zipBest Regards,
Haneef
PO
poornima
December 13, 2006 05:43 AM UTC
Hi,
The previous sample seems to work. But the second dropdown column is editable which allows users to type in some values, so is there any way to prevent users from keying in values.
Regards
Poornima S
AD
Administrator
Syncfusion Team
December 13, 2006 06:03 AM UTC
Hi Poornima,
Please try this code snippet and let us know if this helps.
private void Form1_Load(object sender, System.EventArgs e)
{
this.gridDataBoundGrid1.Binder.InternalColumns["Col1"].StyleInfo.ReadOnly = true;
}
Best Regards,
Jeba.
PO
poornima
December 13, 2006 06:10 AM UTC
Hi,
I tried using it but the selected value in the dropdown doesn't appear in the grid. It clears of immediately.
Regards
Poornima S
AD
Administrator
Syncfusion Team
December 13, 2006 06:46 AM UTC
Hi Poornima,
Please try this code snippet and let us know if this helps.
private void Form1_Load(object sender, System.EventArgs e)
{
this.gridDataBoundGrid1.Binder.InternalColumns["Col1"].StyleInfo.ExclusiveChoiceList=true;
}
Best Regards,
Jeba.
PO
poornima
December 13, 2006 06:58 AM UTC
Hi,
Find attached code. The problem with giving ExclusiveChoiceList to true.
Replicate the issue by:
1. Select value "One" from the second column of the grid.
2. Select a value "A" from the third column of the same row.
3. Now select other value "Two" from the second column of the grid.
4. Move focus to third column now.
The system hangs. Let me know what else can be done for the issue.
Regards
Poornima S
PO
poornima
December 13, 2006 07:04 AM UTC
Sorry couldn't attach the code. Please modify the sample that is earlier provided by u specifying ExclusiveChoicelist to true and follow the steps specified in the above reply
AD
Administrator
Syncfusion Team
December 13, 2006 07:22 AM UTC
Hi Poornima,
I tried to reproduce the hanging state. But, I was not able to reproduce the situation. Here is the tested video clip:
VideoClip.zip.
Could you please give me some more information regarding how to implement this issue in the above sample. I would really appreciate it if you could provide us a sample that exhibits this behavior. We will try analyzing it here. Also please let me know your Syncfusion version details.
Best Regards,
Jeba.
PO
poornima
December 13, 2006 09:01 AM UTC
Hi,
I tried to set the ExclusiveChoiceList to true in the QueryCellInfo event. When i commented the code i was able to work with.
In te previous sent code, in the second dropdown users should not be able to type in any value.
How do i achieve this??
Regards
Poornima S
PO
poornima
December 13, 2006 10:29 AM UTC
Hi,
In the above sample u sent me just follow the steps i have mentioned earlier [ For reference: Replicate the issue By ]
U will find that at the end, the application hangs
Regards
Poornima S
PO
poornima
December 14, 2006 04:22 AM UTC
Hi,
Can you please look into the above issue. Its quite urgent.
Regards
Poornima S
AD
Administrator
Syncfusion Team
December 14, 2006 09:51 AM UTC
Hi Newmancroos,
You can handle the CurrentCellCloseDropDown event and call Binder.EndEdit() method to save the changes to the underlying datasource. Here is a code snippet
//Cancel the SelectedIndex changes when double click on the cell.
GridComboBoxCellModel cm = this.gridDataBoundGrid1.Model.CellModels["ComboBox"] as GridComboBoxCellModel;
cm.AllowDoubleClickChangeSelectedIndex = false;
private void gridDataBoundGrid1_CurrentCellCloseDropDown(object sender, Syncfusion.Windows.Forms.PopupClosedEventArgs e)
{
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
if(cc.ColIndex == 2)
this.gridDataBoundGrid1.Binder.EndEdit();
}
Here is a modified sample.
ModifiedComboBoxDatasource.zipBest Regards,
Haneef
AD
Administrator
Syncfusion Team
December 14, 2006 09:55 AM UTC
Hi Poornima,
My apologies for addressing to the wrong person, it was meant for you.
You can handle the CurrentCellCloseDropDown event and call Binder.EndEdit() method to save the changes to the underlying datasource. Here is a code snippet
//Cancel the SelectedIndex changes when double click on the cell.
GridComboBoxCellModel cm = this.gridDataBoundGrid1.Model.CellModels["ComboBox"] as GridComboBoxCellModel;
cm.AllowDoubleClickChangeSelectedIndex = false;
private void gridDataBoundGrid1_CurrentCellCloseDropDown(object sender, Syncfusion.Windows.Forms.PopupClosedEventArgs e)
{
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
if(cc.ColIndex == 2)
this.gridDataBoundGrid1.Binder.EndEdit();
}
Here is a modified sample.
ModifiedComboBoxDatasource.zipBest Regards,
Haneef
PO
poornima
December 14, 2006 11:25 AM UTC
Thank you so much. It has been a great help.
Regards
Poornima S