Dynamic bind richselect

scheduler.config.views.push({
id: “locationView”,
rows: [
{ view: “toolbar”, type: “MainBar”, elements: [
{ view: “button”, label: ‘Back’, click: “$$(‘scheduler’).$$(‘views’).back()” },

						]
					},
					{ cols: [

					{ view: "form", width: 320, id: "myform", elements: [
                            { view: "datepicker", label: 'Application Date', labelWidth: 200, width: 80, id: 'field_f', value: new Date(2010, 7, 5) },
                            { view: "richselect", labelWidth: 200, width: 80, id: 'field_e', label: 'Leave Type', value: "1", yCount: "3", options: [
									{ value: "1", label: "One" },
									{ value: "2", label: "Two" },
									{ value: "3", label: "Three" }
							]
                            },

							{ view: "datepicker", labelWidth: 200, width: 80, label: 'From Date', id: 'field_f', value: new Date(2010, 7, 5) },
							{ view: "datepicker", labelWidth: 200, width: 80, label: 'To Date', id: 'field_f', value: new Date(2010, 7, 5) },
							{ view: "textarea", labelWidth: 200, width: 80, id: 'field_ta', label: "Comment", height: 90 },
							{ view: "button", type: "form", id: 'field_d', label: 'Apply', align: "center", inputWidth: 150 }
						]
					}

				]
					}
			]

    });

The above code apply in scheduler and its working . But how dynamically bind richselect datasource in this case.Please tell me the syntax in this scenario.

You can set onAfterRender handler for the “field_e”:

$$("scheduler").$$("field_e").attachEvent("onAfterRender",function(){ dhx.delay(function(){ var list = $$("scheduler").$$("field_e").getList(); list.parse(newDataObj); }) });

No I actually want to bind richselect from database dynamically how ?

No I actually want to bind richselect from database dynamically how ?

You can call load method instead of parse. The example with database loading - samples/01_basic/05_data_saving.html