Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
114 views
Hi - I am using a scroller with the client api to stop, start, letf and right the scroller content. This all works fine as per your demo but I need the scroller to be scrolling when it loads. In your example the user has to press play to start it but I want it to be playing by default.

How do I do this?

Thanks.
John
Top achievements
Rank 1
 answered on 16 Nov 2010
1 answer
142 views
I have a radgrid on top of the page, and a radmenu below it.
when I click on the filter icon of a column in the radgrid, the filter options list expands behind the radmenu...

I tried to change radmenu z-index it didnt help. Is there a way to get around this problem?

thanks in advance
Princy
Top achievements
Rank 2
 answered on 16 Nov 2010
4 answers
158 views


Problem: we have a  FireFox problem - too much recursion in our Website, so from the post "http://bytes.com/topic/javascript/answers/152236-strange-firefox-problem-too-much-recursion"
it gives suggestion to Update "Ajax control Toolkit" to get latest version.So We are updated "Ajax control Toolkit 3.0" to "Ajax control Toolkit 3.5"
Steps to follow:

Telerik Version Used:Telerik version 2010.2.1029.35

Steps:

1.)We are Installing "Ajax control Toolkit 3.5.40412.2" in visual Studio 2008 (3.5).


2.)when toolkit install then it gives the following error:

AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.

===============\==========================================================================================




3.)From this Post:
http://www.telerik.com/community/forums/aspnet-ajax/scriptmanager-and-stylesheetmanager/known-issues-and-breaking-changes-radscriptmanager.aspx
http://www.telerik.com/community/forums/aspnet-ajax/scriptmanager-and-stylesheetmanager/fix-radscriptmanager-compatibility-issues-with-ajax-control-toolkit.aspx
http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/making-telerik-and-ajax-control-toolkit-play-nicely-together.aspx


4.)it is clear that "Ajax control Toolkit 3.5.40412.2" compatiable  with visual Studio 2008 (3.5)
when we use above code of forum it gives error



When use code:
<telerik:RadScriptManager runat="server">
    <Scripts>
        <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
            Name="MicrosoftAjax.js" Path="Scripts-40412/MicrosoftAjax.js" />
        <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
            Name="MicrosoftAjaxWebForms.js" Path="Scripts-40412/MicrosoftAjaxWebForms.js" />
    </Scripts>
</telerik:RadScriptManager>


Error:Sys.InvalidOperationException: A control is already associated with the element.
      ASP.NET Ajax client-side framework failed to load.









Kamen Bundev
Telerik team
 answered on 16 Nov 2010
4 answers
100 views
I developed and tested my RadControl Web app using ajax on my workstation and all is fine.
When I roll it out to our W2k3 server and view it from my workstation(via intranet), the pages are displayed but controls are all over the show.
If I Remote desktop onto the W2k3 server and view the site it is fine like on my workstation.
Do I have to install telerik on the server?
Any help would be appreciated.
Shane
Top achievements
Rank 1
 answered on 16 Nov 2010
1 answer
78 views
I am using Web Service binding but have not implemented a "provider". Instead, I'm simply trying to code the web service methods directly. I'm not sure if this is causing my problem or not.

Let's take a simple example:

[WebMethod(EnableSession=true)]
public IEnumerable<AppointmentData> GetAppointments(SchedulerInfo schedulerInfo)
{
    List<AppointmentData> result = new List<AppointmentData>();
    var q = from c in WebUtils.User.Merchant.Appointments
            where c.ServiceDateTime >= schedulerInfo.ViewStart
                && c.ServiceDateTime <= schedulerInfo.ViewEnd
                && c.CancelDate == null
            select c;
    foreach (WWS.BLL.Appointment a in q.ToList())
    {
        AppointmentData ad = new AppointmentData();
        ad.Description = a.Service.Category.Description + " - " + a.Service.Description;
        ad.ID = a.Id;
        ad.Start = a.ServiceDateTime.ToUniversalTime();
        ad.End = a.ServiceDateTime.AddMinutes(a.Duration).ToUniversalTime();
        ad.Subject = a.Service.Description;
        result.Add(ad);
    }
      
    return result;
}

The above code runs without exception and returns appointments which appear on the scheduler. The only problem is that they don't appear in the right time slot on the scheduler. For example, when I inspect "ad.Start" in the debugger it says "{11/8/2010 10:27:58 PM}" but when the appointment appears on the scheduler it is on 11/9/2010 and in the 1am time slot. If I edit the appointment the editor says the start time is 1:27 AM.

Incidentally, I also get a javascript error when trying to edit the appointment:

Microsoft JScript runtime error: 'this._appointment.get_recurrenceRule()' is null or not an object

I'm guessing that I'm missing something rather obvious, but I don't know what it is.

Thanks,
Scott
Peter
Telerik team
 answered on 16 Nov 2010
1 answer
73 views
Hi all,

I have a page where I have some invoices with GridClientSelectColumn and my idea is when I select a inovice a label has to be updated with the total amount of the selected rows, I'm looking for how to capture the event, I looked into the examples in VB but I have found nothing.

Have you got a code snippet that works for that ?

Thanks in advance
Shinu
Top achievements
Rank 2
 answered on 16 Nov 2010
1 answer
120 views
I have a RadRating control in a RadGrid using an ItemTemplate. Works great. The RadRating control has several RadRatingItems with a Tootip property assigned. I also have a ToolTipManager on the page with Autotooltipfy set to true. This provides a very nice tooltip for each item in the rating. The problem is that the standard browser tootip is also showing (small yellow box) so it looks like a mess.

Any idea how to turn off the standard tooltip?
Svetlina Anati
Telerik team
 answered on 16 Nov 2010
2 answers
102 views
Hi !

I have a ResourceType combo and i woul'd like to know if it's possible to set the a default value or not save with no choice !
<telerik:RadScheduler ID="RadScheduler1" runat="server"
           DataDescriptionField="COMM_ALMANACH" DataEndField="DF_ALMANACH"
           DataKeyField="ID_ALMANACH" DataSourceID="EntityDataSource2"
           DataStartField="DD_ALMANACH" DataSubjectField="L_ALMANACH"
           EnableDescriptionField="True" Culture="fr-FR">
           <ResourceTypes>
               <telerik:ResourceType DataSourceID="EntityDataSource1"
                   ForeignKeyField="ID_DOMAINE" KeyField="ID_DOMAINE" Name="le domaine"
                   TextField="C_DOMAINE"  />
           </ResourceTypes>
       </telerik:RadScheduler>


Thanks a lot !
 
CYFL
Top achievements
Rank 1
 answered on 16 Nov 2010
15 answers
509 views
Hello,

i´m develping a small webpart, and i´m having some issues when i use the radScheduler with the asp:UpdatePanel.
The webpart has one radScheduler and a few cotrols more, but not many. 

Hte scheduler is inside an updatePanel when an event happens like when i click on the header to change the view (day, weeks, or months) a javascript error display saying b.Month.Model or b.TimeLine.Model is null or not an object. After that the control doesn´t render properly and it doesn´t work as expected.

I´ve tried different ways and small examples but i can´t fix it.

Here is the source code, is quite simple...

<

 

 

asp:UpdatePanel runat="server" UpdateMode="Conditional">

 

 

 

<ContentTemplate>

 

 

 

<telerik:RadScheduler runat="server" ID="SchedulerPrueba" ShowHeader="true"

 

 

 

DataKeyField="Id"

 

 

 

DataSubjectField="Subject"

 

 

 

DataStartField="EventDate"

 

 

 

DataEndField="EndDate"

 

 

 

>

 

 

 

</telerik:RadScheduler>

 

 

 

</ContentTemplate>

 

 

 

</asp:UpdatePanel>

 

 

 Nothing on the code-behind

Thanks

T. Tsonev
Telerik team
 answered on 16 Nov 2010
3 answers
374 views
hi,
 I am using radgrid here in my button click display blank grid with a single row after inserting data in this grid i want to create a new row on button click inside grid.
in this grid have dropdown for item selection label for rate display and amount display and textbox for enter quantity amount.
here is my code with the help of that i want ot create row generation after first row plz find below...
i am using view state and plz tell me how can i store value in viewstate and then from view state to database whatever i did i am giving to u..
<asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="btnAdd_click" Width="70px" />
       <br />
       <telerik:RadGrid ShowFooter="true" ID="radGrid1" runat="server" OnInsertCommand="radGrid1_InsertCommand"
           OnPreRender="radgrid1_PreRender" AutoGenerateColumns="False" GridLines="None"
           AutoGenerateEditColumn="true" AllowMultiRowEdit="True" AllowAutomaticInserts="true"
           AllowAutomaticUpdates="true" OnItemDataBound="radGrid1_ItemDataBound" OnNeedDataSource="radGrid1_NeedDataSource">
           <MasterTableView EditMode="InPlace" PageSize="5" CommandItemDisplay="None">
               <Columns>
               <telerik:GridTemplateColumn DataField="rowNumber" HeaderText="S.No.">
               <ItemTemplate>
               <asp:Label ID="lblrowNumber" runat="server" Text='<%#Eval("rowNumber")%>'></asp:Label>
               </ItemTemplate>
               </telerik:GridTemplateColumn>
                   
                   <telerik:GridTemplateColumn UniqueName="Product_Name" ReadOnly="true" HeaderText="Product Name">
                       <ItemTemplate>
                           <asp:DropDownList ID="ddl1" runat="server" AutoPostBack="true" DataTextField="product_Name"
                               DataValueField="product_Name" OnSelectedIndexChanged="ddl1_SelectedIndexChanged">
                           </asp:DropDownList>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
                   <telerik:GridTemplateColumn UniqueName="Product_Rate" ReadOnly="true" HeaderText="Product Rate">
                       <ItemTemplate>
                           <asp:Label ID="lblRate" runat="server" Text='<%#Eval("Product_Rate") %>'></asp:Label>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
                   <telerik:GridTemplateColumn UniqueName="Product_Quantity" HeaderText="Product Quantity">
                       <ItemTemplate>
                           <telerik:RadNumericTextBox ID="txtQuantity" AutoPostBack="true" runat="server" OnTextChanged="txtQuantity_TextChanged">
                           </telerik:RadNumericTextBox>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
                   <telerik:GridTemplateColumn UniqueName="Product_Amount" ReadOnly="true" HeaderText="Product Amount">
                       <ItemTemplate>
                           <asp:Label ID="lblAmount" runat="server"></asp:Label>
                       </ItemTemplate>
                       <FooterStyle HorizontalAlign="Right" />
                       <FooterTemplate>
                           <asp:Button ID="btnNewRow" runat="server" Visible="true" Text="Add Item" OnClick="btnNewRow_click" /></FooterTemplate>
                   </telerik:GridTemplateColumn>
               </Columns>
           </MasterTableView>
       </telerik:RadGrid>
       <table border="0" cellpadding="0" cellspacing="0" width="100%">
           <tr>
               <td align="center">
                   <center>
                       <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="Submit" />
                       <asp:Button ID="Button1" runat="server" Text="Clear" OnClick="Clear" />
                   </center>
               </td>
           </tr>
       </table>
public partial class Test_Order : System.Web.UI.Page
    {
        DataTable dt = new DataTable();
        TableRow dr;
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                create_datatable();
            }
        }
        public void create_datatable()
        {
 
            dr = new TableRow();
            dt.Columns.Add(new DataColumn("rowNumber", typeof(string)));
            dt.Columns.Add("Product_Name");
            dt.Columns.Add("Product_Rate");
            dt.Columns.Add("Product_Quantity");
            dt.Columns.Add("Product_Amount");
            ViewState["Address"] = dt;
 
            radGrid1.DataSource = dt;
            radGrid1.DataBind();
 
        }
 
protected void radGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            SqlConnection connection = new SqlConnection();
            connection = new SqlConnection(ConfigurationManager.ConnectionStrings["chalk_hillConnectionString"].ConnectionString);
            SqlDataAdapter da = new SqlDataAdapter();
            da.SelectCommand = new SqlCommand("select product_id,product_name from product_detail", connection);
 
 
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                dt.Rows.Add(dr);
                dt.AcceptChanges();
                try
                {
                    da.Fill(dt);
                }
                finally
                {
                    connection.Close();
                }
            }
            radGrid1.DataSource = dt;
 
        }
 
protected void radGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;
                DropDownList list = (DropDownList)item.FindControl("ddl1");
                list.Items.Insert(0, new ListItem("select", "-1"));
                SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["chalk_hillConnectionString"].ConnectionString);
                SqlDataAdapter da = new SqlDataAdapter();
                da.SelectCommand = new SqlCommand("select product_id,product_name from product_detail", con);
                DataSet ds = new DataSet();
                da.Fill(ds);
                if (ds != null)
                {
                    list.DataSource = ds;
                    list.DataTextField = "product_name";
                    list.DataValueField = "product_id";
                    list.DataBind();
                }
                list.Items.Insert(0, new ListItem("Select Item..", "0"));
                list.SelectedIndex = 0;
            }
        }
 
 protected void radGrid1_InsertCommand(object sender, EventArgs e)
        {
            isinsert = true;
        }
        protected void ddl1_SelectedIndexChanged(object sender, EventArgs e)
        {
            DropDownList list = (DropDownList)sender;
            GridDataItem item = (GridDataItem)list.NamingContainer;
            SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["chalk_hillConnectionString"].ConnectionString);
            con.Open();
            SqlCommand cmd = new SqlCommand("select product_rate from product_detail where product_name='" + list.SelectedItem.Text + "'", con);
            SqlDataReader reader; ;
            reader = cmd.ExecuteReader();
            if (reader.Read())
            {
                (item.FindControl("lblRate") as Label).Text = reader["product_rate"].ToString();
            }
 
        }
 
 protected void txtQuantity_TextChanged(object sender, EventArgs e)
        {
            RadNumericTextBox textQuantity = sender as RadNumericTextBox;
 
            GridEditableItem item = textQuantity.NamingContainer as GridEditableItem;
            Label lbl1 = item["Product_Rate"].FindControl("lblRate") as Label;
            Label lbl3 = item["Product_Amount"].FindControl("lblAmount") as Label;
            lbl3.Text = (int.Parse(lbl1.Text) * int.Parse(textQuantity.Text)).ToString();
            create_datatable_row();
             
        }
        protected void btnNewRow_click(object sender, EventArgs e)
        {
            AddNewRowToGrid();
        }
         
        private void AddNewRowToGrid()
        {
            
            if (ViewState["Address"] != null)
            {
                DataTable dtCurrenttable = (DataTable)ViewState["Address"];
                DataRow drCurrentRow = null;
                if (dtCurrenttable.Rows.Count > 0)
                {
                    drCurrentRow = dtCurrenttable.NewRow();
                    drCurrentRow["rowNumber"] = dtCurrenttable.Rows.Count + 1;
                    dtCurrenttable.Rows.Add(drCurrentRow);
                    ViewState["Address"] = dtCurrenttable;
                           radGrid1.DataSource = dtCurrenttable;
                    radGrid1.DataBind();
                }
            }
            else
            {
                Response.Write("ViewState is null");
            }
        }
 
        //for display blank grid on button click creation....
 
        protected void btnAdd_click(object sender, EventArgs e)
        {
 
            dt = (DataTable)ViewState["Address"];
            if (dt.Rows.Count != 0)
            {
                if (dt.Columns.Count != 0)
                {
                    create_datatable();
                }
                else
                {
                    create_datatable_row();
                }
            }
            DataRow dr = dt.NewRow();
            dr["rowNumber"] = 1;
            dt.Rows.Add(dr);
            radGrid1.DataSource = dt;
            radGrid1.DataBind();
        }
        private void create_datatable_row()
        {
            DataRow dr = dt.NewRow();
            dt.Rows.Add(dr);
        }
        bool isinsert = false;
        protected void radgrid1_PreRender(object sender, EventArgs e)
        {
            if (isinsert)
            {
                isinsert = false;
                radGrid1.MasterTableView.IsItemInserted = true;
                radGrid1.MasterTableView.Rebind();
            }
 
        }
 
 
    }

it is createing new row but last row value destroy when i click on button newitwm inside radgrid plz tell me how can i save these value in viewstate and after final submit all value in database and one more thing same item selected twice from user while i want user select on item in one order.
Marin
Telerik team
 answered on 16 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?