1.I have a rad scheduler. Inside I have one ResourceType that binds a sqldatasource. I want to be able programatic(from code behind) to set the selectedvalue of the resourcetype. The desired value can change. Can someone please help me with this problem?
Example:
I have inside .aspx
<ResourceTypes>
<telerik:ResourceType KeyField="ID_OPERATIE" Name="Operatie" TextField="denumire"
ForeignKeyField="ID_OPERATIE" DataSourceID="dsOperatie" AllowMultipleValues="false">
</telerik:ResourceType>
<telerik:ResourceType KeyField="ID_SALA" Name="Sala" TextField="nume" ForeignKeyField="ID_SALA"
DataSourceID="dsSala" AllowMultipleValues="false"></telerik:ResourceType>
</ResourceTypes>
inside FormCreated in code behind
RadComboBox cbResOperatie = (RadComboBox)e.Container.FindControl("ResOperatie");
cbResOperatie.Width = cb_echipament.Width;
cbResOperatie.Height = 200;
cbResOperatie.Filter = RadComboBoxFilter.Contains;
cbResOperatie.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(cbResOperatie_SelectedIndexChanged);
cbResOperatie.AutoPostBack = true;
and inside cbResOperatie_SelectedIndexChanged (when the value of the Operatie changes) I need to be able to change the selected value of the resource field Sala. Please help.
2.Another problem I use a SelectedIndexChanged handler that was bound programaticly inside FormCreated of the RadScheduler for another ResourceType. Can some one tell me why e.Value is displaying a long string like 'cvxbvxcbxcghfsfgf' instead of an number representing ForeignKeyField value? Please help.
Example:
RadComboBox cbResOperatie = (RadComboBox)e.Container.FindControl("ResOperatie");
cbResOperatie.Width = cb_echipament.Width;
cbResOperatie.Height = 200;
cbResOperatie.Filter = RadComboBoxFilter.Contains;
cbResOperatie.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(cbResOperatie_SelectedIndexChanged);
cbResOperatie.AutoPostBack = true;
and inside cbResOperatie_SelectedIndexChanged we have as a parameter e.Value.
Example:
I have inside .aspx
<ResourceTypes>
<telerik:ResourceType KeyField="ID_OPERATIE" Name="Operatie" TextField="denumire"
ForeignKeyField="ID_OPERATIE" DataSourceID="dsOperatie" AllowMultipleValues="false">
</telerik:ResourceType>
<telerik:ResourceType KeyField="ID_SALA" Name="Sala" TextField="nume" ForeignKeyField="ID_SALA"
DataSourceID="dsSala" AllowMultipleValues="false"></telerik:ResourceType>
</ResourceTypes>
inside FormCreated in code behind
RadComboBox cbResOperatie = (RadComboBox)e.Container.FindControl("ResOperatie");
cbResOperatie.Width = cb_echipament.Width;
cbResOperatie.Height = 200;
cbResOperatie.Filter = RadComboBoxFilter.Contains;
cbResOperatie.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(cbResOperatie_SelectedIndexChanged);
cbResOperatie.AutoPostBack = true;
and inside cbResOperatie_SelectedIndexChanged (when the value of the Operatie changes) I need to be able to change the selected value of the resource field Sala. Please help.
2.Another problem I use a SelectedIndexChanged handler that was bound programaticly inside FormCreated of the RadScheduler for another ResourceType. Can some one tell me why e.Value is displaying a long string like 'cvxbvxcbxcghfsfgf' instead of an number representing ForeignKeyField value? Please help.
Example:
RadComboBox cbResOperatie = (RadComboBox)e.Container.FindControl("ResOperatie");
cbResOperatie.Width = cb_echipament.Width;
cbResOperatie.Height = 200;
cbResOperatie.Filter = RadComboBoxFilter.Contains;
cbResOperatie.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(cbResOperatie_SelectedIndexChanged);
cbResOperatie.AutoPostBack = true;
and inside cbResOperatie_SelectedIndexChanged we have as a parameter e.Value.