Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
72 views
When i move mouse over my Grid a strange sign appears below it, like a small white square. See the attachments.
It appears in any browser and in any machine.
How can i remove it?
Eyup
Telerik team
 answered on 01 Nov 2012
1 answer
118 views
I'm still trying to wrap my head around this concept. 

For starters I have a RadGrid populated through the NeedDataSource.  I have it set up to edit individual records through a FormTemplate.  So far so good.  I can insert and update records.

What I need is to is add an attachment to each record in a varbinary(MAX) field.  The RadAsyncUpload control has to be within the FormTemplate.

Do I understand the process correctly? 

The RadAsyncUpload control will upload the object (most likely a doc) to a temp folder on the web application's server.  The OnFileUploaded event will then allow me to convert the file to a binary array which can be accessed from the RadGrid1_InsertCommand and added to the inserted record there?
Plamen
Telerik team
 answered on 01 Nov 2012
8 answers
165 views
Greetings, 

Yours PivotGrid is awesome, but would you mind to tell me eta on following functionality:
  • DrillDown (Recieve a part of datasource which fills the cell value);
  • Inline editor

Best Regards, Alex D.
Radoslav
Telerik team
 answered on 01 Nov 2012
1 answer
142 views
Hi
     In my radgrid, the commanditemtemplate consist of 'Add new record' and ;refresh' buttons. I would like to change the font size of those link buttons to large. Can anybody help me accomplish this.
Thanks in advance
RT
Shinu
Top achievements
Rank 2
 answered on 01 Nov 2012
1 answer
81 views
i am binding a dataTable. 

  1. How to re arrange views in this order DayView-WeekView-MultiDayView -MonthView- TimelineView

I want to do some work when i move my mouse over the appointment like displaying delete image on hover.

2. But there is no onmouseover event for the appointment. How can i achieve this.

3. I have multiple appoitnments on oct 1st. In my month view its not showing properly.But in Day view its showing properly.

 I have attached the Image.

Here is my RadSchedular code.
 
<telerik:RadScheduler ID="radScheduler" runat="server" Height="90%" Skin="Forest" EnableEmbeddedSkins="False"
                OnAppointmentCreated="radScheduler_AppointmentCreated" OnAppointmentDataBound="radScheduler_AppointmentDataBound"
                OnNavigationComplete="radScheduler_NavigationComplete" EnableResourceEditing="False" OnClientAppointmentDoubleClick="appointmentDoubleClick"
                AdvancedForm-Enabled="false" AllowInsert="False" RowHeight="20px" Localization-HeaderMultiDay="Work Week"
                NumberOfHoveredRows="1" EnableAdvancedForm="False" SelectedView="MonthView" EnableExactTimeRendering="True" Width="100%" >
 
                <AdvancedForm Modal="false" Enabled="false" />
 
                <DayView DayStartTime="08:00:00"  EnableExactTimeRendering="true" />
 
                <MonthView VisibleAppointmentsPerDay="4" />
 
                <WeekView DayStartTime="08:00:00" EnableExactTimeRendering="true" />
 
                <MultiDayView DayStartTime="08:00:00" UserSelectable="true" NumberOfDays="5" />
 
                <Localization HeaderMultiDay="Work Week"></Localization>
 
                <TimelineView SlotDuration="1:00:00" ColumnHeaderDateFormat="HH:mm" EnableExactTimeRendering="True" NumberOfSlots="7" />
 
                <Reminders Enabled="true" />
 
                <AppointmentTemplate>
 
                    <div style="float: left;">
                        <a id="achSubject" href="javascript:alert('Navigate to Open Appointment')">
                            <%# Eval("Subject") %>
                        </a>
                    </div>
                    <div>
                        <div class="rsAptReminder" style="display: <%# Eval("alarm_on") %>"></div>
                        <%--<img alt="" src="Images/reminder.gif" height="16px" width="16px" style="display: <%# Eval("alarm_on") %>" />--%>
                    </div>
                    <div class="rsAptAct" style="padding-left: 2px; float: left; padding-top:2px; vertical-align:bottom;"">
                        <img alt="" width="12px" height="10px"  src="<%# AppointmentTypeImage(Eval("act_type")) %>" />
                    </div>
                    <div style="float: left; padding-left: 0px;">
                        <div style="float: left; display: <%# AppointmentRecuuringImage(Eval("recurring_id"),Eval("outlook_recurrence_id_range")) %>;" class="rsAptRecurrence">
                        </div>
                        <%--<img alt="" height="16px" width="16px" src="Images/recur.gif" style="display: <%# AppointmentRecuuringImage(Eval("recurring_id"),Eval("outlook_recurrence_id_range")) %>" />--%>
                    </div>
                </AppointmentTemplate>
</telerik:RadScheduler>
Bhas
Top achievements
Rank 1
 answered on 01 Nov 2012
1 answer
319 views
Hi,

I am trying to attach onkeypress eventhandler in onclientload of radeditor. I want to check a checkbox as soon as any alphabet is entered in radeditor.

<telerik:RadEditor runat="server" ID="RadEditor1" ContentAreaMode="Div" EditModes="Design" 
                                 OnClientLoad="OnClientLoad">

<script type="text/javascript">
     function OnClientLoad(editor) {
            editor.AttachEventHandler("onkeypress", function (e) {
                $('#<%=chktext.ClientID %>').attr('checked', true);
            });
        }
</script>

i get a javascript error which says UnCaught Reference Error:OnClientLoad is not defined. What should i do?
Shinu
Top achievements
Rank 2
 answered on 01 Nov 2012
1 answer
79 views
Hi,

I create some Controls (e.g. a button and a div) in CreateChildControls and add them to the RadAjaxManager in OnPreRender.
Finally, I overwrite "RenderContents" to render my own layout. But when doing this, the panel generated by the RadAjaxManager (for the LoadingPanel) isn't rendered. 

Whats the best way to use the RadAjaxManager when I overwrite RenderContents? How can I "force" the RadAjaxManager to render the panel?

Thanks!
Maria Ilieva
Telerik team
 answered on 01 Nov 2012
2 answers
114 views
I have a grid with datasource1 and then I have a gridtableview with datasource2 similar to the example "Grid / Several Tables at a Level"both data sources have a column called Price.

Can I create an aggregate that uses the values from both?

If so, can you point me in the right direction.

Thanks, Marty
moegal
Top achievements
Rank 1
 answered on 01 Nov 2012
1 answer
82 views
Hi,
i have installed the telerik reporting, i couldn't view the designer part, it does not show in the context menu as in attached file. even i have reinstalled the telerik reporting but there is no response it shows as the same. I need a quick Support.







Thanks



     
 
IvanY
Telerik team
 answered on 01 Nov 2012
5 answers
206 views
I have a RadGrid with the EditFormSettings set to WebUserControl. Within the WebUserControl I have a CustomValidator, when I run the update command from the WebUserControl page the CustomValidator is run, but does not stop the page from processing. I am checking for Page.IsValid on my RadGrid_ItemCommand.

Page.aspx
<telerik:RadGrid ID="rgSiteContent" runat="server" CellSpacing="0" GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" onneeddatasource="rgSiteContent_NeedDataSource" onitemcommand="rgSiteContent_ItemCommand">
    <MasterTableView CommandItemDisplay="Top" DataKeyNames="pageid">
        <Columns>
            <telerik:GridTemplateColumn FilterControlAltText="Filter EditCommandColumn column" Groupable="False" UniqueName="EditCommandColumn" HeaderText="Actions">
                <EditItemTemplate>
                    <telerik:RadButton runat="server" CommandName="Update" Text="Update" /> 
                    <telerik:RadButton runat="server" CausesValidation="false" CommandName="Cancel" Text="Cancel" />
                </EditItemTemplate>
                <ItemTemplate>
                    <telerik:RadButton runat="server" CausesValidation="false" CommandName="Edit" Text="Edit" /> 
                    <telerik:RadButton runat="server" CausesValidation="false" CommandName="Delete" Text="Delete" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="title" FilterControlAltText="Filter title column" HeaderText="Page Title" ReadOnly="True" SortExpression="title" UniqueName="title" />
            <telerik:GridBoundColumn DataField="metadesc" FilterControlAltText="Filter metadesc column" HeaderText="Meta Description" ReadOnly="True" SortExpression="metadesc" UniqueName="metadesc" />
            <telerik:GridBoundColumn DataField="metaword" FilterControlAltText="Filter metaword column" HeaderText="Meta Keywords" ReadOnly="True" SortExpression="metaword" UniqueName="metaword" />
            <telerik:GridHyperLinkColumn FilterControlAltText="Filter pagelink column" HeaderText="Page Link" SortExpression="pagelink" UniqueName="pagelink" DataTextField="pagelink" Target="_blank" DataNavigateUrlFields="pagelink" />
            <telerik:GridBoundColumn DataField="created" DataType="System.DateTime" FilterControlAltText="Filter created column" HeaderText="Created" ReadOnly="True" SortExpression="created" UniqueName="created" />
            <telerik:GridBoundColumn DataField="lastedit" DataType="System.DateTime" FilterControlAltText="Filter lastedit column" HeaderText="Last Edit" ReadOnly="True" SortExpression="lastedit" UniqueName="lastedit" />
            <telerik:GridBoundColumn DataField="fullname" DataType="System.Int32" FilterControlAltText="Filter fullname column" HeaderText="Edited By" ReadOnly="True" SortExpression="fullname" UniqueName="fullname" />
        </Columns>
        <EditFormSettings EditFormType="WebUserControl" UserControlName="~/managers/controls/admin_sitecontent_editor.ascx">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>

Page .aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
 
}
protected void rgSiteContent_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    getSiteContent();
}
protected void getSiteContent()
{
    using (SiteDataContext DB = new SiteDataContext())
    {
        var rsSiteContent = from rs in DB.contents
                            where rs.parentid == 0
                            select new
                            {
                                pageid = rs.pageid,
                                pagelink = String.Format("http://www.mysite.com/site/{0}", rs.pagename),
                                pagename = rs.pagename,
                                title = rs.title,
                                metadesc = rs.metadesc,
                                metaword = rs.metaword,
                                created = rs.created,
                                lastedit = rs.lastedit,
                                fullname = String.Format("{0} {1}", rs.tbl_user.firstname, rs.tbl_user.lastname),
                                pagecontent = rs.pagecontent
                            };
        rgSiteContent.DataSource = rsSiteContent.ToList();
    }
}
protected void rgSiteContent_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
    if (e.CommandName == RadGrid.UpdateCommandName)
    {
        GridEditFormItem editForm = (GridEditFormItem)e.Item;
        UserControl userControl = (UserControl)editForm.FindControl(GridEditFormItem.EditFormUserControlID);
        
        if (Page.IsValid)
        {
            using (SiteDataContext DB = new SiteDataContext())
            {
                var rsSiteContent = (from rs in DB.contents where rs.pageid == Convert.ToInt32(editForm.GetDataKeyValue("pageid")) select rs).SingleOrDefault();
                rsSiteContent.pagename = ((RadTextBox)userControl.FindControl("pagelinkTextBox")).Text;
                rsSiteContent.title = ((RadTextBox)userControl.FindControl("pagetitleTextBox")).Text;
                rsSiteContent.pagecontent = (((RadEditor)userControl.FindControl("contentEditor"))).Content;
                rsSiteContent.metadesc = ((RadTextBox)userControl.FindControl("metadescTextBox")).Text;
                rsSiteContent.metaword = ((RadTextBox)userControl.FindControl("metawordTextBox")).Text;
                rsSiteContent.lastedit = DateTime.Now;
                rsSiteContent.editby = Profile.UserID;
                DB.SubmitChanges();
            }
        }
    }
}

WebUserControl ascx
<asp:CustomValidator ID="editcontentCustomValidator" runat="server" ControlToValidate="pagetitleTextBox" ValidationGroup="editcontentValidationGroup" onservervalidate="editcontentCustomValidator_ServerValidate" Font-Bold="true" ForeColor="Red" ValidateEmptyText="true" /> 
<table style="width:100%;">
    <tr>
        <td colspan="2"
            <telerik:RadButton runat="server" CommandName="Update" CausesValidation="true" Text="Save" ValidationGroup="editcontentValidationGroup" /> 
            <telerik:RadButton runat="server" CommandName="Cancel" CausesValidation="false" Text="Cancel" />
        </td>
    </tr>
    <tr>
        <td style="width:110px;">Page Link:</td>
        <td><telerik:RadTextBox ID="pagelinkTextBox" Runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.pagename") %>' Width="800px" /></td>
    </tr>
    <tr>
        <td style="width:110px;">Page Title:</td>
        <td><telerik:RadTextBox ID="pagetitleTextBox" Runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.title") %>' Width="800px" /></td>
    </tr>
    <tr>
        <td style="width:110px;">Meta Description:</td>
        <td><telerik:RadTextBox ID="metadescTextBox" Runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.metadesc") %>' Width="800px" /></td>
    </tr>
    <tr>
        <td style="width:110px;">Meta Keywords:</td>
        <td><telerik:RadTextBox ID="metawordTextBox" Runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.metaword") %>' Width="800px" /></td>
    </tr>
    <tr>
        <td colspan="2">Page Content:</td>
    </tr>
    <tr>
        <td colspan="2">
            <telerik:RadEditor ID="contentEditor" Runat="server" Width="940px"  Content='<%# DataBinder.Eval(Container, "DataItem.pagecontent") %>' ContentAreaCssFile="~/Styles/RadEditor.css" ContentAreaMode="Div" Height="800px"  NewLineMode="Br" />
        </td>
    </tr>
</table>

WebUserControl ascx.cs
protected void Page_Load(object sender, EventArgs e)
{
 
}
protected void editcontentCustomValidator_ServerValidate(object source, ServerValidateEventArgs args)
{
    List<string> strErrors = new List<string>();
    if (pagelinkTextBox.Text.Count() > 0)
    {
        using (SiteDataContext DB = new SiteDataContext())
        {
            var rsCheckDupPageName = from rs in DB.contents where rs.pagename == pagelinkTextBox.Text select rs;
            if (rsCheckDupPageName.Count() > 1)
            {
                strErrors.Add("Duplicate Page Links are not allowed.");
            }
        }
    }
    else
    {
        strErrors.Add("Page Link is required.");
    }
    if (pagetitleTextBox.Text.Count() <= 0)
    {
        strErrors.Add("Page Title is required.");
    }
    if (metadescTextBox.Text.Count() <= 0)
    {
        strErrors.Add("Meta Description is required.");
    }
    if (metawordTextBox.Text.Count() <= 0)
    {
        strErrors.Add("Meta Keywords are required.");
    }
    if (contentEditor.Text.Count() <= 0)
    {
        strErrors.Add("Page Content is required.");
    }
    if (strErrors.Count() > 0)
    {
        string strErrorMessage = String.Empty;
        foreach (string errors in strErrors)
        {
            strErrorMessage = String.Format("{0}<br />", errors);
        }
        editcontentCustomValidator.IsValid = false;
        editcontentCustomValidator.ErrorMessage = strErrorMessage;
    }
}


Maria Ilieva
Telerik team
 answered on 01 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?