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
45
RowEditorTemplate- WebDropdown valuechanged need to update other webdropdowns
posted

Hello, I have a webdatagrid with a RowEditorTemplate.

In the template, I have a WebDropDown wich will be selected by the user.

While editing, I need that the valuechanged of the WebDropdown fire an event wich will update 4 other objects (label or textfield or webdoropdown disabled, same type for all)  to update specific informations about the new value selected in the webdropDown. 

I tried to use 4 webdropdown (enable = false).

I thought that this would update by coding selectedvalue=e.NewSelection but there is not effect.

They could all be binded to the same table, same id.

The event is fired, while debugging I see the values has been changed, but the description fileds are not updated in the rowEditorTemplate.

Here is the code:

Protected Sub MAJSelect(sender As Object, e As Infragistics.Web.UI.ListControls.DropDownSelectionChangedEventArgs)
On Error Resume Next
Dim ControlA
Dim ControlB
Dim ControlC
Dim ControlD

Dim CAChoisi As Integer

CAChoisi = e.NewSelection

If CAChoisi <> 0 Then

ControlA = WebDataGrid1.Behaviors.EditingCore.Behaviors.RowEditTemplate.TemplateContainer.FindControl("WDD_UniteA")
ControlB = WebDataGrid1.Behaviors.EditingCore.Behaviors.RowEditTemplate.TemplateContainer.FindControl("WDD_UniteB")
ControlC = WebDataGrid1.Behaviors.EditingCore.Behaviors.RowEditTemplate.TemplateContainer.FindControl("WDD_UniteC")
ControlD = WebDataGrid1.Behaviors.EditingCore.Behaviors.RowEditTemplate.TemplateContainer.FindControl("WDD_UniteD")


ControlA.ClearSelection
ControlB.ClearSelection
ControlC.ClearSelection
ControlD.ClearSelection


ControlA.selectedvalue = e.NewSelection
ControlB.selectedvalue = e.NewSelection
ControlC.selectedvalue = e.NewSelection
ControlD.selectedvalue = e.NewSelection


End If
End Sub

Thanks for your help!