I have tree Radiobuttons. and an database field: ActionDefinitionActivityType that has three integer values: 1,2,3.
In the aspx form I get the values: 1,2,3 depending what you have selected.
But I want to have text showing for: 1 - Overig, 2-werk, 3-reizen.
I have this as code:
[code]
Sub DataToForm(ByVal dataobj As DataLayer.DataObject)
With dataobj
txtActionDefinitionDescription.Text = .GetVal("ActionDefinitionDescriptionNL")
txtActionDefinitionDescriptionDE.Text = .GetVal("ActionDefinitionDescriptionDE")
txtActionDefinitionDescriptionFR.Text = .GetVal("ActionDefinitionDescriptionFR")
txtActionDefinitionDescriptionUK.Text = .GetVal("ActionDefinitionDescriptionEN")
txtNL.Value = .GetVal("ActionDefinitionDescriptionNL")
txtDE.Value = .GetVal("ActionDefinitionDescriptionDE")
txtFR.Value = .GetVal("ActionDefinitionDescriptionFR")
txtEN.Value = .GetVal("ActionDefinitionDescriptionEN")
If .GetVal("ActionDefinitionActivityType") = 1 Then
InputRadioButton1.Checked = True
End If
If .GetVal("ActionDefinitionActivityType") = 2 Then
InputRadioButton2.Checked = True
End If
If .GetVal("ActionDefinitionActivityType") = 3 Then
InputRadioButton3.Checked = True
End If
End With
End Sub
[/code]So if you select 1 you see in the view(aspx Form) 1, but you have to see: overig
THank you
albert albertPosted Mar 10, 2014, 8:50 AM
[code]
then I get this error:
Kan de tabel 0 niet vinden.
Beschrijving: Er is een onverwerkte uitzondering opgetreden tijdens het uitvoeren van de huidige webaanvraag. Raadpleeg de stacktracering voor meer informatie over deze fout en de oorsprong ervan in de code.Details van uitzondering: System.IndexOutOfRangeException: Kan de tabel 0 niet vinden.
Fout in bron:
Regel 30: Regel 31: ds = objMeld.GetRows("ActionDefinition", , filter).Copy Regel 32: ds.Tables(0).Columns.Add("ActionDefinitionType", GetType(String)) Regel 33: Regel 34:Bronbestand: D:\inetpub\wwwroot\_RSM_V39\RSM\RSM_V39\IT\ActionDefinition.aspx.vb Regel: 32
albert albertPosted Mar 10, 2014, 7:27 AM
[code]
albert albertPosted Mar 10, 2014, 7:04 AM
[code]