Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
670 views
Hi there,

Ok this might sounds pretty easy and shouldn't be such a pain to do but I'm struggling resizing a RadTextBox. I did something as simple as this :
<telerik:RadTextBox ID="rtbAddress" runat="server" Label="Address:" ToolTip="Search for an address" Width="300px" Columns="200">

And still, no way to change the size of the input neither to get the input next to its label... How come is this so difficult to achieve ?
All I need is a text box that match the radtextbox1.png and not the radtextbox2.png .

Plus when I remove the Width property to use the Columns property, the input simply disappears and all I see is the label ????

This is so simple that it is pissing me off. Please someone has any idea ?

Christophe
Top achievements
Rank 1
 answered on 18 May 2012
1 answer
54 views

Hello,

I have a telerik rad grid on the page and when I click on ASP.NET dropdowns, I get an issue in the Telerik resources file on the following line.

Quarter 3 2009 is the controls we are using.

if

 

 

((typeof (_97.srcElement)!="undefined")&&(_97.srcElement!=null)){

Thanks
Thomas

 

Radoslav
Telerik team
 answered on 18 May 2012
9 answers
237 views

Hi,

I wish to disable my radcombobox whilst the page loads, this is within a "usercontrol" and I am using jquery in the main page (which includes this control), and can use it here if that helps?

This returns a null reference for the combobox! I have looked at many threads to no avail, hopefully you can post an example for me.

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="buyersguidefinderUserControl.ascx.cs"
    Inherits="usercontrol_seo_buyersguidefinderUserControl" %>
<div class="fl">
    <telerik:RadComboBox ID="RadComboBox1" AllowCustomText="true" runat="server" Width="250px"
        Height="300px" Filter="Contains" LoadingMessage="Finding Buyers Guide ..." EmptyMessage="Type which guide you would like to read..."
        HighlightTemplatedItems="true" OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged"
        AutoPostBack="true">
    </telerik:RadComboBox>
</div>
<div class="guidesearchbtn fl">
    <asp:Button ID="Button1" runat="server" Text="Go" OnClick="Button1_Click" /></div>

<script language="javascript" type="text/javascript">
    // <!CDATA[
    // disable control otherwise it breaks page state
    var combo = $find("<%= RadComboBox1.ClientID %>");
    combo.Disable();

    $(document).ready(function() {
        combo.Enable();
    });
    // ]]>
</script>

Thanks again,
Matt

Princy
Top achievements
Rank 2
 answered on 18 May 2012
2 answers
63 views
Hi all,

The edit form of my grid is type template.I added a textbox and dropdownlist to the form template.I want to show only asp:textbox when I add new record and only asp:dropdownlist while editing.
Please help.
Thanks in advance.
Janaki
Top achievements
Rank 1
 answered on 18 May 2012
6 answers
155 views
I have worked with grid with several options but I am facing two issues i.e unable to display the RadAjaxLoadingPanel1 in the center of the form on grid and row selected color is displaying multiple colors when row is selected and hover on the row

My code

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default1.aspx.cs" Inherits="_Default1" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <link href="Grid.Office2010Silver.css" rel="stylesheet" type="text/css" />
    <link href="Ajax.Office2010Silver.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <div>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Visible="true"
            CssClass="RadAjax_Office2010Silver" MinDisplayTime="2000" Transparency="1">
            <asp:Image ID="img" runat="server" ImageUrl="~/loading.gif" />
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadGrid ID="RadGrid1" ShowFooter="false" CssClass="RadGrid_Office2010Silver"
             AllowMultiRowSelection="false" OnItemCommand="RadGrid1_ItemCommand"
            AllowPaging="true" AllowSorting="true" PageSize="10" runat="server" OnPageIndexChanged="RadGrid1_PageIndexChanged"
          EnableAjaxSkinRendering="false"  AllowCustomPaging="True" OnPageSizeChanged="RadGrid1_PageSizeChanged" OnNeedDataSource="RadGrid1_NeedDataSource">
            <PagerStyle Mode="NextPrevAndNumeric" />
            <ClientSettings EnableRowHoverStyle="true">
                <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="200" SaveScrollPosition="true"
                    FrozenColumnsCount="3"></Scrolling>
                <Selecting AllowRowSelect="true" />
            </ClientSettings>
            <MasterTableView DataKeyNames="EmployeeID" AutoGenerateColumns="false">
                <Columns>
                    <telerik:GridBoundColumn DataField="EmployeeID" UniqueName="EmployeeID" HeaderText="EmployeeID"
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="FirstName" HeaderStyle-HorizontalAlign="Center"
                        ItemStyle-HorizontalAlign="Center" UniqueName="FirstName" HeaderText="FirstName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="LastName" UniqueName="LastName" HeaderText="LastName"
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Address" UniqueName="Address" HeaderText="Address"
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </div>
    </form>
</body>
</html>


Pavlina
Telerik team
 answered on 17 May 2012
2 answers
248 views
the only thing I could validate the size of the option MaxFileSize. I have to validate to upload a photo that is 96x96 pixels. How do I can do?.

Thanks for your help
ALBERT
Top achievements
Rank 1
 answered on 17 May 2012
2 answers
58 views
Hi,
i am using rad window as a control container, in a sharepoint application, but i have a problem with the title of the window. While the window is loading, the title seems to be ok, but after loading completes, the title changes to the title of the page(.ascx file) the window contains. I tried to remove the title at all with no luck! In visual studio everything works fine...
Can you please help me avoid this situation?

Thanks a lot,
Angie
asilioni
Top achievements
Rank 1
 answered on 17 May 2012
1 answer
98 views
I'm having trouble with post backs on a grid where the columns are created in the code behind. Essentially the columns that go in this grid come from a table, but an administrator has another page where they select what columns from the table show in the grid. So, I have table that stores column names and I dynamically add the columns with their header text and data field id based on this table that stores the columns that need to show. I then dynamically create the select statement, set that as the select command to a sqldatasource and bind it. When you load the page initially everything works fine. However, when you click some paging or sorting, it adds a bunch of extra columns. You can see the before and after here
http://imgur.com/a/gO28G#nOVo1 


Here is my ascx
<telerik:radgrid ID="gradeGrid" runat="server" AllowPaging="True" GridLines="None"
            CellPadding="5" AutoGenerateColumns="false" Width="850px" Skin="Metro" >
        </telerik:radgrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:connection %>">
        </asp:SqlDataSource>



here is my code behind
Dim conn = System.Configuration.ConfigurationManager.ConnectionStrings("connection").ToString
 
   'this sub adds a column to the rad grid
   Protected Friend Sub addColumn(ByVal dataField As String, ByVal header As String)
 
       Dim col As New GridBoundColumn
       col.DataField = dataField
       col.HeaderText = header
       gradeGrid.MasterTableView.Columns.Add(col)
 
   End Sub 'addColumn
 
   Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
       If (Not Page.IsPostBack) Then
 
           bindGrid()
           gradeGrid.DataBind()
 
       End If 'if its not a  post back
 
   End Sub
 
   'this sub gets the data for the rad grid
   Protected Sub bindGrid()
 
       Dim reader As SqlDataReader
       'add the columns we know about
       addColumn("lgrade", "Letter Grade")
       addColumn("ngrade", "Percent Grade")
       addColumn("Course Code", "sectno")
       addColumn("Completed", "enddate")
 
       Dim itemSql = "SELECT lgrade, ngrade, sectno, enddate, "
       'now find all the other ones we need
       Dim sql = "SELECT columnName, label FROM hstuclsDefinedColumns ORDER BY position"
       Using myconn As New SqlConnection(conn)
 
           myconn.Open()
 
           reader = New SqlCommand(sql, myconn).ExecuteReader()
           If (reader.HasRows) Then
 
               While reader.Read()
                   addColumn(reader("columnName"), reader("label"))
                   itemSql &= "[" & reader("columnName") & "]" & ", "
               End While 'reader.read
               reader.Close()
           End If 'if reader.hasrows
 
           itemSql &= " 'blah' FROM hstucls WHERE stuid = " & MyFunctions.getStudentId
 
           myconn.Close()
       End Using 'using myconn
 
       SqlDataSource1.SelectCommand = itemSql
 
       gradeGrid.DataSource = SqlDataSource1
 
   End Sub 'bindGrid
 
   Protected Sub gradeGrid_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles gradeGrid.NeedDataSource
       bindGrid()
   End Sub

I'm sure it's something stupid, I just don't see what it is. Thanks!

Web Services
Top achievements
Rank 2
 answered on 17 May 2012
1 answer
100 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
149 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?