This is a migrated thread and some comments may be shown as answers.

[Solved] Accessing item inside InlineInsertTemplate

3 Answers 130 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mickey
Top achievements
Rank 1
Mickey asked on 05 Jul 2009, 06:18 PM
Hi,
I'm trying to do the following,
To have 3 RadComboBox inside InlineInsertTemplate ,
when selecting value inside the first of them, to enable/disable one/two of the others,
and also to have a validator that check once they are enable, if they have value selected,
I would like to accomplish all of that in client side code only.
I have been able to accomplish that in AdvancedInsertTemplate, but its loading time is too slow (modal on latest version, 2009 Q2)

Can this be done?
if so, could you guide me how

Thanks
Mickey

3 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 06 Jul 2009, 12:01 PM
Hi Mickey,

Unfortunately this cannot be done entirely on client side. The problem is, that on pageLoad the scheduler's insert container is not yet loaded, therefore you cannot obtain reference of the client components ( using $find ) because their ID is unknown. The scenario that you want to achieve requires you to hook on the FormCreated server event and then check in the scheduler is in inline edit mode. Example:

 
 
protected void RadScheduler1_FormCreated(object sender, Telerik.Web.UI.SchedulerFormCreatedEventArgs e) 
    { 
        if (e.Container.Mode == SchedulerFormMode.Insert) 
        { 
            RadComboBox comboBox = e.Container.FindControl("RadComboBox1"as RadComboBox; 
            // proceed with your custom logic 
        } 
    } 

Once you have the references of the ComboBoxes, you can enable/disable them in the way you want. Keep in mind that RadScheduler autopostbacks on insert/edit click, therefore your RequiredFieldValidator is going to catch on postback. Is this what you need? 

All the best,
Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Mickey
Top achievements
Rank 1
answered on 06 Jul 2009, 05:04 PM
Thanks for your replay
from your answer I understand that What I would like to do, isn't supported by the control,
Thanks anyway,
Mickey
0
Genady Sergeev
Telerik team
answered on 07 Jul 2009, 10:31 AM

Hello,

I think you have got me wrong, it is possible, it's just a little bit more tricky. I have prepared sample project for you that shows how to disable the second combo based on the selection of the first combo. I hope this will help you to get started.


Cheers
Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Scheduler
Asked by
Mickey
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Mickey
Top achievements
Rank 1
Share this question
or