Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
158 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
137 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
72 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
301 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
74 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
107 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
75 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
194 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
4 answers
142 views
Hello,

I modeled our dropdown very similar to this example:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridincombobox/defaultcs.aspx?product=combobox

I am using twitter bootstrap as well as your controls within a site.  I am having some issues with the radcombox in that when I turn EnableEmbeddedBaseStylesheet=true it will allow me to scroll and select items within the combobox like i want.  The radcombox however is taking the look of the embedded style sheet which i do not want.  if i turn it to false it now looks like i want it but when i enter an entry into the combox my information displays but I can no longer scroll through the returned items or select them.  Anyone else run into this and how did you fix it?  

Thanks,


<telerik:RadComboBox ID="rcmbSKU" Width="340px" runat="server" MarkFirstMatch="True" CssClass="SKUCombo" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false"
            AllowCustomText="True" OnClientDropDownOpening="HandleOpen" ExpandAnimation-Type="None"
            CollapseAnimation-Type="None" DropDownWidth="340px" onkeyup="HandleKeyPressed(this)">
            <ItemTemplate>
                <telerik:RadGrid ID="rgridSKU" Width="325px" runat="server" OnNeedDataSource="rgridSKU_NeedDataSource" EnableEmbeddedBaseStylesheet="true" EnableEmbeddedSkins="true">
                    <MasterTableView NoMasterRecordsText="" AutoGenerateColumns="False" DataKeyNames="ItemCode, ItemKey, Description"
                        Width="100%" ClientDataKeyNames="ItemCode, ItemKey, Description" TableLayout="Fixed">
                        <Columns>
                        <telerik:GridBoundColumn HeaderText="SKU" DataField="ItemCode" UniqueName="ItemCode">
                                <HeaderStyle Width="90px"></HeaderStyle>
                            </telerik:GridBoundColumn
                             
                            <telerik:GridBoundColumn HeaderText="Description" DataField="Description" UniqueName="Description">
                                <HeaderStyle Width="215px"></HeaderStyle>
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings>
                        <ClientEvents OnRowClick="RowClicked" OnGridCreated="GridCreated"></ClientEvents>
                        <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="300px"></Scrolling>
                    </ClientSettings>
                </telerik:RadGrid>
            </ItemTemplate>
            <Items>
                <telerik:RadComboBoxItem runat="server" Text=" "></telerik:RadComboBoxItem>
            </Items>
        </telerik:RadComboBox>
Nencho
Telerik team
 answered on 01 Nov 2012
1 answer
143 views
Hi 

I am trying to implement a org chart for my organization.  In addtion to the staffs reporting to the superior, there is also a position called 'Assistant' working to the superior specifically, in which I would like to put this position as separate level against other subordinate.   The person who is assistant have the property isAssistant flag in SQL Table.  


Please advise How can I do it in ASP.net, I am using VB.net, Linq and SQL 2012.  The attached image is for your reference.  

And also, is it possible to set the block of the chart with whilte background color?  Thanks.


Patrick

Peter Filipov
Telerik team
 answered on 01 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?