Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Recieving an Error after Dynamically changing the style of a cell
posted

I have a WinGrid that has two columns.  The first column contains a ValueList.  On selecting an item from the value list I would like to change that rows second column to a new style (example, DropDownCalendar). 

I am able to accomplish this, and correctly select a date from the DropDownCalendar afterwards, with the following code:

Private Sub ugMyUltragrid_CellListSelect(ByVal sender As System.Object, ByVal e As    Infragistics.Win.UltraWinGrid.CellEventArgs) Handles ugCustomFilters.CellListSelect

  Me.ugMyUltragrid.ActiveRow.Cells(1).Style = ColumnStyle.DropDownCalendar

End Sub

 

 With the following code I am able to display the DropDownCalendar, however, I get a "The given key was not present in the dictionary" if I select a date:

Private Sub ugMyUltragrid_CellListSelect(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles ugCustomFilters.CellListSelect

 Dim cs As ColumnStyle = ColumnStyle.DropDownCalendar
 Me.ugCustomFilters.ActiveRow.Cells(1).Style = cs

End Sub

Any reason why this is occuring? 

Note:  We are currently using v6.1 of the UltraWinGrid.

 

Thank you,

Mark

 

 

 

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Mark.,

    I'm not sure I am following you. You say that this works fine if you set the style to an anum value directly, but it does not work if you first store the enum in a variable? I can't see how that can possibly make any difference.

    Can you post the call stack of the exception?

Children
No Data