Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
105 views
HI,

Does the new DLL for Telerik support the older version of IE like IE7 and below.

Thanks,
Raghav.
Eyup
Telerik team
 answered on 17 May 2012
9 answers
157 views
Hello,

At the moment i have my scheduler working, all from the server side. Recurrence is working fine as well, but i also want to "edit this occurence only" option working.

To do this, i wanted to use the "OnRecurrenceExceptionCreated" to get it working.

However, it seems that i cannot retrieve the updated RecurrenceRule with the Exception in it.

I tried to make it work in the RadScheduler_AppointmentUpdate(the recurrencerule with exception) however, i cant determine in this void if there is an Recurrence exception created.

Beneath the three classes i use in combination with customized advanced templates accorinding to youre example in the following link:
advancedformtemplate

I supply them all, so someone else who wants to do it all server side, can find it a bit easier then i could :)

My Code at the moment

Scheduler.
<telerik:RadScheduler runat="server" ID="RadScheduler1" Width="100%" Height="100%" Enabled="false"
    DayStartTime="08:00:00" DayEndTime="22:00:00" WorkDayStartTime="08:00:00" WorkDayEndTime="22:00:00"
    FirstDayOfWeek="Monday" LastDayOfWeek="Friday" HoursPanelTimeFormat="HH:mm" ShowViewTabs="true"
    StartInsertingInAdvancedForm="true" StartEditingInAdvancedForm="true" ShowAllDayRow="false"
    Culture="nl-NL" OnDataBinding="RadScheduler1_DataBinding" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
    OnClientFormCreated="schedulerFormCreated" CustomAttributeNames="intSelectedProspectID,intSelectedLocID,RecurrenceRule,id_prospect,strLine1, strLine2, strLine3, strCSS, strBezichtingPand, strTelefoon1, strTelefoon2"
    EnableDescriptionField="true" AppointmentStyleMode="Default" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" OnRecurrenceExceptionCreated="RadScheduler1_OnRecurrenceExceptionCreated"
    OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnAppointmentCreated="RadScheduler1_AppointmentCreated" OnFormCreated="RadScheduler1_FormCreated">
    <AdvancedForm Modal="false" />
    <Reminders Enabled="false" />
    <AdvancedEditTemplate>
        <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" Subject='<%# Bind("Subject") %>'
            Description='<%# Bind("Description") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>'
            RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' UserID='<%# Bind("intPersoneelID") %>'
            RoomID='<%# Bind("intKamerID") %>' AfspraakType='<%# Bind("intAfspraakTypeID") %>'
            ProspectID='<%# Bind("id_prospect") %>' Locatie='<%# Bind("intLocatieID") %>' />
    </AdvancedEditTemplate>
    <AdvancedInsertTemplate>
        <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert" Subject='<%# Bind("Subject") %>'
            Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' Description='<%# Bind("Description") %>'
            RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' UserID='<%# Bind("intPersoneelID") %>'
            RoomID='<%# Bind("intKamerID") %>' AfspraakType='<%# Bind("intAfspraakTypeID") %>'
            ProspectID='<%# Bind("id_prospect") %>' Locatie='<%# Bind("intLocatieID") %>' />
    </AdvancedInsertTemplate>
    <AppointmentTemplate>
        <div class="rsAptSubject">
            <%# Eval("strLine1") %></div>
        <div>
            <%# Eval("strLine2") %></div>
        <div>
            <%# Eval("strLine3") %></div>
    </AppointmentTemplate>
    <TimelineView UserSelectable="false" />
    <TimeSlotContextMenuSettings EnableDefault="true" />
    <AppointmentContextMenuSettings EnableDefault="true" />
</telerik:RadScheduler>

Insert
protected void RadScheduler1_AppointmentInsert(object sender, Telerik.Web.UI.SchedulerCancelEventArgs e)
{
    try
    {
        ArrayList paramList = new ArrayList();
        paramList.Add(new SqlParameter("@afspraakdatum", Convert.ToDateTime(e.Appointment.Start.ToShortDateString() + " " + e.Appointment.Start.ToShortTimeString())));
        paramList.Add(new SqlParameter("@afspraakdatumEind", Convert.ToDateTime(e.Appointment.End.ToShortDateString() + " " + e.Appointment.End.ToShortTimeString())));
        paramList.Add(new SqlParameter("@intAfspraakTypeID", Supervisor.convInt32DBNULL(e.Appointment.Attributes["intAfspraakTypeID"])));
        paramList.Add(new SqlParameter("@strAfspraakOnderwerp", Supervisor.convStringDBNULL(e.Appointment.Subject)));
        paramList.Add(new SqlParameter("@afspraakopmerkingen", Supervisor.convStringDBNULL(e.Appointment.Description)));
        paramList.Add(new SqlParameter("@adviseur_id", Supervisor.convInt32DBNULL(e.Appointment.Attributes["intPersoneelID"])));
        paramList.Add(new SqlParameter("@fiat", fiat));
        paramList.Add(new SqlParameter("@intKamerID", Supervisor.convInt32DBNULL(e.Appointment.Attributes["intKamerID"])));
        paramList.Add(new SqlParameter("@intLocatie", Supervisor.convInt32DBNULL(e.Appointment.Attributes["intLocatieID"])));
        paramList.Add(new SqlParameter("@id_prospect", Supervisor.convInt32DBNULL(e.Appointment.Attributes["id_prospect"])));
        paramList.Add(new SqlParameter("@RecurrenceRule", Supervisor.convStringDBNULL(e.Appointment.RecurrenceRule)));
        paramList.Add(new SqlParameter("@RecurrenceParentKeyField", Supervisor.convStringDBNULL(e.Appointment.RecurrenceParentID)));
        string strSQL = "exec sp_insAfspraakFromPlan4 @afspraakdatum, @afspraakdatumEind, @intAfspraakTypeID, @strAfspraakOnderwerp, @afspraakopmerkingen, @id_prospect, @adviseur_id, @fiat, @intKamerID, @intLocatie,@RecurrenceRule,@RecurrenceParentKeyField";
        string foutmelding = MSSQL_Comm.ExecuteNonQuery(strSQL, paramList, "ConnWB");
        if (foutmelding.Length > 0)
        {
            e.Cancel = true;
            Label Label1 = new Label();
            Label1.Text = foutmelding;
            //NOT WORKING YET!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            ScriptManager.RegisterClientScriptBlock(this, GetType(), "LabelUpdated",
                "$telerik.$('.lblError').show().animate({ opacity: 0.9 }, 2000).fadeOut('slow');", true);
        }
    }
    catch (Exception ex)
    {
        e.Cancel = true;
        Label Label1 = new Label();
        Label1.Text = ex.Message;
        //NOT WORKING YET!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        ScriptManager.RegisterClientScriptBlock(this, GetType(), "LabelUpdated",
            "$telerik.$('.lblError').show().animate({ opacity: 0.9 }, 2000).fadeOut('slow');", true);
    }
}

Update
protected void RadScheduler1_AppointmentUpdate(object sender, Telerik.Web.UI.AppointmentUpdateEventArgs e)
{
    try
    {
        ArrayList paramList = new ArrayList();
        paramList.Add(new SqlParameter("@afspraakdatum", Convert.ToDateTime(e.ModifiedAppointment.Start.ToShortDateString() + " " + e.ModifiedAppointment.Start.ToShortTimeString())));
        paramList.Add(new SqlParameter("@afspraakdatumEind", Convert.ToDateTime(e.ModifiedAppointment.End.ToShortDateString() + " " + e.ModifiedAppointment.End.ToShortTimeString())));
        paramList.Add(new SqlParameter("@intAfspraakTypeID", Supervisor.convInt32DBNULL(e.ModifiedAppointment.Attributes["intAfspraakTypeID"])));
        paramList.Add(new SqlParameter("@strAfspraakOnderwerp", Supervisor.convStringDBNULL(e.ModifiedAppointment.Subject)));
        paramList.Add(new SqlParameter("@afspraakopmerkingen", Supervisor.convStringDBNULL(e.ModifiedAppointment.Description)));
        paramList.Add(new SqlParameter("@adviseur_id", Supervisor.convInt32DBNULL(e.ModifiedAppointment.Attributes["intPersoneelID"])));
        paramList.Add(new SqlParameter("@fiat", 1));
        paramList.Add(new SqlParameter("@intKamerID", Supervisor.convInt32DBNULL(e.ModifiedAppointment.Attributes["intKamerID"])));
        paramList.Add(new SqlParameter("@intLocatie", Supervisor.convInt32DBNULL(e.ModifiedAppointment.Attributes["intLocatieID"])));
        paramList.Add(new SqlParameter("@id_prospect", Supervisor.convInt32DBNULL(e.ModifiedAppointment.Attributes["id_prospect"])));
        paramList.Add(new SqlParameter("@id", e.ModifiedAppointment.ID));
        paramList.Add(new SqlParameter("@RecurrenceRule", Supervisor.convStringDBNULL(e.ModifiedAppointment.RecurrenceRule)));
        paramList.Add(new SqlParameter("@RecurrenceParentKeyField", Supervisor.convStringDBNULL(e.ModifiedAppointment.RecurrenceParentID)));
        string strSQL = "exec sp_updAfspraakFromPlan3 @afspraakdatum, @afspraakdatumEind, @intAfspraakTypeID, @strAfspraakOnderwerp, @afspraakopmerkingen, @id_prospect, @adviseur_id, @fiat, @intKamerID, @id, @RecurrenceRule, @RecurrenceParentKeyField";
        string foutmelding = MSSQL_Comm.ExecuteNonQuery(strSQL, paramList, "ConnWB");
        if (foutmelding.Length > 0)
        {
            e.Cancel = true;
            Label Label1 = new Label();
            Label1.Text = foutmelding;
            ScriptManager.RegisterClientScriptBlock(this, GetType(), "LabelUpdated",
                "$telerik.$('.lblError').show().animate({ opacity: 0.9 }, 2000).fadeOut('slow');", true);
        }
    }
    catch (Exception ex)
    {
        e.Cancel = true;
        Label Label1 = new Label();
        Label1.Text = ex.Message;
        ScriptManager.RegisterClientScriptBlock(this, GetType(), "LabelUpdated",
            "$telerik.$('.lblError').show().animate({ opacity: 0.9 }, 2000).fadeOut('slow');", true);
    }
}

OnRecurrenceException
protected void RadScheduler1_OnRecurrenceExceptionCreated(object sender, Telerik.Web.UI.RecurrenceExceptionCreatedEventArgs e)
{
    int intMasterOccurrenceID = Convert.ToInt32(e.OccurrenceAppointment.ID);
    string RecurrenceRule = e.Appointment.RecurrenceRule;
    string newRecurrenceRule = "?????????????????????????????????????????????????????";
      
    e.Cancel = true;
}

How to make this work asap?
Mike
Top achievements
Rank 1
 answered on 17 May 2012
1 answer
242 views
Dear Sir/Madam,

Please response to my email: Kassaiefarshad@yahoo.com

I have got a RadListView and I have created a Generic List, then I have bound my ListView to Generic List.
You can see part of RadListView as follow:
<telerik:RadListView ID="RadListViewKnowledgeOwners" runat="server"
                        ItemPlaceholderID="ListViewContainer" dir="rtl" Width="600px">
                    <LayoutTemplate>
                                    <asp:PlaceHolder runat="server" id="ListViewContainer" />
                    </LayoutTemplate>
                    <ItemTemplate>
   ...............
 
<table  width="170">
  <tr style="height: 30px;">
       <td>
                <% if (DataBinder.Eval(Container.DataItem , "ScientificResume") != string.Empty)%>
                 <% {%>
                       <a
                              href='http://kms/Resume/<;;%# Eval("ScientificResume")%>'
                              target="_blank">Resume</a>
                   <% }
                        else
                          { %>
                           Resume
                    <% } %>
    </td>
 </tr>
                       </tr>
As you can see in my code :
                      <% if (DataBinder.Eval(Container.DataItem, "ScientificResume") != string.Empty)%>
 
System getting error to me and it doesn't recognize "Container.DataItem". What is "Container.DataItem" in above line of code?

If this approach is not true please guide me how can I do it inside RadListView?

Any help appreciated.
Farshad Kassaie.
Kassaiefarshad@yahoo.com
Richard
Top achievements
Rank 1
 answered on 17 May 2012
0 answers
60 views
I've placed a feature request here that asks Telerik to consider improving Input control to allow it to work as a Tagging input box, common in the Facebook platform. You can see a demo of what I'm asking for here

This control would have the following features:

- Good design
- Allows telerik Themes
- Controls tag duplicates (case sensitive also)
- Allow to add new tags directly
- Allows autocomplete
- Able to bind with data like the other controls
- Has client side methods and events
- Allows tags to have a name and value
- Ability to re-arrange tags by drag and drop
- Ability to provide initial tags on creation

If you like this idea, as I do, please vote for it in the PITS.
Hugo Augusto
Top achievements
Rank 2
Iron
Veteran
Iron
 asked on 17 May 2012
1 answer
100 views
      <telerik:RadGrid ID="RadGrid1" runat="server"
            Width="950px" oninsertcommand="RadGrid1_InsertCommand" 
            onitemcommand="RadGrid1_ItemCommand" onitemcreated="RadGrid1_ItemCreated" 
            oniteminserted="RadGrid1_ItemInserted" 
            onneeddatasource="RadGrid1_NeedDataSource" CellSpacing="0" 
            GridLines="None">
       <MasterTableView  EditMode="InPlace"   >
<CommandItemSettings ExportToPdfText="Export to PDF" ></CommandItemSettings>


<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>


<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
       <Columns><telerik:GridTemplateColumn UniqueName="ADDCombo"><%--<ItemTemplate></ItemTemplate>--%></telerik:GridTemplateColumn></Columns>


<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
       </MasterTableView>


<FilterMenu EnableImageSprites="False"></FilterMenu>


<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
        </telerik:RadGrid>


and on code behind i am creating a dynamic row like that

    public void bindcontroltogrid(RadGrid gridtobind, RadTextBox rdtextgrid, RadComboBox rdcmbgrid)
        {
         
            int j = 0;
            string[] a = {"a" };
            gridtobind.DataSource = null;
            lstvisiblelement = (List<TransactionSetupDL.TrTypeAttrDL>)HttpContext.Current.Session["lstvisiblelementofgrid"];
            gridtobind.MasterTableView.DataSource = a;
            gridtobind.MasterTableView.TableLayout = GridTableLayout.Auto;
            gridtobind.ClientSettings.Scrolling.AllowScroll = true;
            gridtobind.ClientSettings.Scrolling.ScrollHeight = 100;
            gridtobind.MasterTableView.ShowHeadersWhenNoRecords = true;
            gridtobind.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = true;
            gridtobind.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;
            gridtobind.MasterTableView.EditMode = GridEditMode.InPlace;
            gridtobind.AllowAutomaticDeletes = true;
            gridtobind.AutoGenerateDeleteColumn = true;
            gridtobind.AutoGenerateEditColumn = true;
            
          
            Control container = new Control();
            for (int i = 0; i < lstvisiblelement.Count; i++)
            {
                GridTemplateColumn tc = new GridTemplateColumn();
                ControlType = (BaseBLDL.Global.controlType)lstvisiblelement[i].ControlType;
                switch (ControlType)
                {
                    case BaseBLDL.Global.controlType.bpTxtControl:








                        tc.ItemTemplate = new AddTemplateToGridView(ControlType, lstvisiblelement[i].DefaultVal, lstvisiblelement[i].AttrDefId, lstvisiblelement[i].Editable, rdcmbgrid, rdtextgrid);
                      






                        tc.ItemTemplate.InstantiateIn(container);
           




                        //  gridtobind.MasterTableView.Columns[j].HeaderStyle.Width = lstvisiblelement[i].ColWidth;
                        gridtobind.MasterTableView.Columns.AddAt(j, tc);
                        gridtobind.MasterTableView.Columns[j].HeaderText = lstvisiblelement[i].Label;


                        break;
                    case BaseBLDL.Global.controlType.bpCmbControl:












                        tc.ItemTemplate = new AddTemplateToGridView(ControlType, lstvisiblelement[i].DefaultVal, lstvisiblelement[i].AttrDefId, lstvisiblelement[i].Editable, rdcmbgrid, rdtextgrid);




                        Control containercmb = new Control();


                        tc.ItemTemplate.InstantiateIn(containercmb);


                        //  gridtobind.MasterTableView.Columns[j].ItemStyle.Width = lstvisiblelement[i].ColWidth;




                        gridtobind.MasterTableView.Columns.AddAt(j, tc);
                        gridtobind.MasterTableView.Columns[j].HeaderText = lstvisiblelement[i].Label;


                    
                        break;


                }
                j++;


            }
            gridtobind.Rebind();
            
        }
        public class AddTemplateToGridView : ITemplate
        {
            ListItemType _type;
            string _colName;
            string _DefaultVal;
            int _AttrDefId;
            bool _Editable;
            BaseBLDL.Global.controlType _controltype;
            RadComboBox _cmboxgrid;
            RadTextBox _rdtextbox;
            //ListItemType type, string colname,
            public AddTemplateToGridView(BaseBLDL.Global.controlType controltype, string DefaultVal, int AttrDefId, bool Editable, RadComboBox cmboxgrid, RadTextBox rdtextbox)
            {
                //_type = type;


                //_colName = colname;
                _controltype = controltype;
                _DefaultVal = DefaultVal;
                _AttrDefId = AttrDefId;
                _Editable = Editable;
                _cmboxgrid = cmboxgrid;
                _rdtextbox = rdtextbox;
            }
            void ITemplate.InstantiateIn(System.Web.UI.Control container)
            {




                switch (_controltype)
                {
                    case BaseBLDL.Global.controlType.bpTxtControl:
                        if (_AttrDefId == 13)
                        {
                            Label lb = new Label();
                            lb.Text = "1";


                            container.Controls.Add(lb);
                        }
                        else
                        {
                            _rdtextbox = new RadTextBox();


                            _rdtextbox.Text = _DefaultVal;
                            _rdtextbox.Enabled = _Editable;


                            container.Controls.Add(_rdtextbox);
                        }
                        break;


                    case BaseBLDL.Global.controlType.bpCmbControl:
                        if (_AttrDefId == 17)
                        {
                            _rdtextbox = new RadTextBox();
                            _rdtextbox.Text = _DefaultVal;
                            container.Controls.Add(_rdtextbox);
                        }
                        else
                        {
                            _cmboxgrid = new RadComboBox();


                            _cmboxgrid.Items.Add(new RadComboBoxItem("Select Item"));


                            container.Controls.Add(_cmboxgrid);
                        }
                        break;
                }


            }

now i want to create same row again on add new record button click that is previously created on the code that i above posted 
with combo box and textbox controls kindly help
Tsvetoslav
Telerik team
 answered on 17 May 2012
5 answers
128 views
Hi,

My assignment is to give edit functionality in a grid. when the user clicks on edit user will see textboxes and checkboxlists from which he can manipulate data.

In the Form template I have a CheckBoxList.

<EditFormSettings EditFormType = "Template">
<FormTemplate>
<asp:CheckBoxList  ID= "List2"  runat="server" selectedvalue = '<%# EVal("ApprovedValues")%>' datasource= "sqldatasource1"
datatextfield="value" datavaluefield= "value" tabindex="2">
</asp:heckBoxList>

my problem here is the approvedvalues that i get from the grid can look like a,b,c. I want to recognize all these values and select them from the list coming from sqldatasource1. Also if the approvedvalue has data that does not exist in the sqldatasource1 list I am getting an error.

"list2 has a selected value which is invalid because it does not exist in the list of items."

can anyone help?
Thanks
rms
Top achievements
Rank 1
 answered on 17 May 2012
1 answer
93 views
hi.
i have a scenario like http://demos.telerik.com/aspnet-ajax/tooltip/examples/loadondemand/defaultcs.aspx 
the problem is that all telerik controls like radcombox, RadListBox ecc don't wok. (in your demo radcombobox works!)
i can only see them but they are not enable.
instead, radbotton works.
i try to change z-index value but this not solve the problem.
can you helm me please?
thanks

Marin Bratanov
Telerik team
 answered on 17 May 2012
5 answers
71 views
Dear Telerik Team,

It is customary that when you see a modal dialog, you press spacebar to accept/dismiss the same. However this space bar trick does not work with RadConfirm boxes and it just moves the window up and down.

Any workarounds and/or plans to roll-out a fix for the same?
Marin Bratanov
Telerik team
 answered on 17 May 2012
1 answer
67 views
I'm running RadEditorSharepoint v4.5.6.0 in our production environment.  Does that employ the now unsupported ASP.NET radEditor?  We're updating soon, but in the meantime all the tools appear to have been disabled in the UI.  I checked the ListToolsFile and nothing seems off.  Both "EnhancedToolbar" and "BasicToolbar" are enabled. 

I saw something similar to this where the developer fixed it by replacing the default script manager with the radscriptmanager, but I'm not sure I know how to do that from a MOSS list form. 

We're going to try updating the version and hoping for the best, but if anyone has some relevant advice, I'd love to hear it. 

Something similar to this happened with the new version on an associate's machine, but in that case it was only him, so we chalked it up to some kinda javascript caching or permissions issue; however, this is happening for everyone and I've checked it in IE 8, 8 compatibility view, and 7, so I don't think it's a browser problem.
Rumen
Telerik team
 answered on 17 May 2012
5 answers
342 views
Hello

I have a project that has used a custom theme for quite a while. I recently updated from telerik 2nd 2010 to 3rd 2011 and am now showing grid lines on all of my radgrids (as shown in attached images). Ive tried to play with the css a bit but havent had any success. Any suggestions would be appreciated.

Thanks
Curt
Curt
Top achievements
Rank 1
 answered on 17 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?