Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
130 views

I picked skin Telerik as my radsitemap skin. But I like the sitemap fonts to be Arial to match other page's fonts on my site. I tried to use

 

RadSiteMap1.Font.Name =

"Arial"  on form load but it doesn't work. The css seems controled by WebResource.axd. 
How I can change the font name?  Is there any example to show me how to  change the css?

Thanks,
Jessie

 

JJ
Top achievements
Rank 1
 answered on 28 Jul 2010
4 answers
156 views
My web page uses the following RadGrid.  The only codebehind is the RadGrid_NeedSource function which simply assigns a datatable to the RadGrid's dataSource.  I haven't wired up any of the Update/Insert/Delete functionality, but I'm not worried about that yet.

<telerik:RadGrid ID="RadGrid" runat="server" OnNeedDataSource="RadGrid_NeedSource" AllowSorting="true"
    AllowPaging="true" PageSize="5" AutoGenerateColumns="false"
    AllowMultiRowEdit="false" AllowMultiRowSelection="false" >
    <MasterTableView TableLayout="Auto" EditMode="InPlace" CommandItemDisplay="Top" InsertItemDisplay="Top"
        InsertItemPageIndexAction="ShowItemOnCurrentPage">
        <Columns>
                <telerik:GridEditCommandColumn CancelImageUrl="../App_Themes/Default/buttons/grid_cancel.png" UniqueName="TestCommandCol"
                    UpdateImageUrl="../App_Themes/Default/buttons/grid_update.png" ButtonType="ImageButton"
                    EditImageUrl="../App_Themes/Default/buttons/grid_edit.png" InsertImageUrl="../App_Themes/Default/buttons/grid_add.png" />
 
                <telerik:GridBoundColumn DataField="Note" HeaderText="Note" ColumnEditorID="NoteEdit" UniqueName="NoteCol" />
                <telerik:GridNumericColumn DataField="Ordinal" HeaderText="Sort Order" UniqueName="SortCol" ColumnEditorID="SortEdit"
                    DefaultInsertValue="99" />
                <telerik:GridCheckBoxColumn DataField="ShowOnWebsite" HeaderText="Show On Website" UniqueName="ShowOnWebsiteCol"
                    DefaultInsertValue="true" />
                <telerik:GridClientDeleteColumn ButtonType="ImageButton" UniqueName="DeleteCol"
                    ImageUrl="../App_Themes/Default/buttons/grid_delete.png" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
<telerik:GridTextBoxColumnEditor ID="TestNoteEdit" runat="server" TextBoxMode="MultiLine" />
<telerik:GridNumericColumnEditor ID="TestSortEdit" runat="server" NumericTextBox-IncrementSettings-InterceptMouseWheel="true"
    NumericTextBox-IncrementSettings-InterceptArrowKeys="true" NumericTextBox-IncrementSettings-Step="1" NumericTextBox-MaxValue="99"
    NumericTextBox-MinValue="0" NumericTextBox-NumberFormat-DecimalDigits="0" NumericTextBox-Width="50px"
    NumericTextBox-ShowSpinButtons="true" />

The grid loads up nice and pretty and looks great for almost everything.  When I click to edit an item, the numeric "SortCol" shows a slim numeric box with up and down controls next to it, and it only allows numbers between 0 and 99.  When, without explicitly updating or canceling the current Edit Item, I click to edit another item (MultiRowEdit is false), it cancels the current edit item and sets the item I clicked on to be the new Edit Item.  So far so good, except that the new Edit Item's "SortCol" shows as a clunky oversized textbox that doesn't have the bells and whistles of the first Edit Item.  A similar display issue occurs on the "NoteCol".  This only happens when clicking from one Edit Item to another Edit Item (including the Insert Item); if you manually cancel out of an Edit Item, then everything works fine.

Tangentially: When I click to "Add New Record" while I already have another row open as an Edit Item, it creates the insert row but does not close/cancel the current Edit Item as one would expect.  Similarly, if I click "Add New Record" and then try to edit a row with the Insert Row still visible, both rows appear as ediatble.  I have tried a few sloppy hacks to fix this, but I was wondering if there was a preferred method for truly allowing only one Edit Item at a time (including Insert).

Thanks,
--Felix
Maria Ilieva
Telerik team
 answered on 28 Jul 2010
3 answers
128 views
Is it possible to use the cascading dropdown extender inside of the edit template of the grid? How would I be able to bind the dropdowns with the current record values?

Thanks!
Iana Tsolova
Telerik team
 answered on 28 Jul 2010
2 answers
135 views
I have a RadGrid that implements a web user control for the edits.  I've attempted to follow replicate as much as I could from the demo at http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx but for some reason, my buttons aren't kicking off the update command on the RadGrid.  I had all of the data populating, but started over so now I only have a couple of the items populating on the user control.  All I'm concerned with right now is getting the btnSubmit to work.. I imagine that after I get that working, I'll be able to get the rest of them working

radgrid
<telerik:RadGrid ID="rgDocuments" runat="server" AutoGenerateColumns="False" GridLines="None"
    AllowSorting="True" ShowStatusBar="true"
    OnUpdateCommand="rgDocuments_UpdateCommand" onitemcommand="rgDocuments_ItemCommand"
    >
    <MasterTableView CommandItemDisplay="Top" DataKeyNames="DocumentId" >
        <commanditemsettings addnewrecordtext="Add new Document" />
        <Columns>
        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn"></telerik:GridEditCommandColumn>
            <telerik:GridBoundColumn DataField="DocumentId" HeaderText="ID" UniqueName="ID">
                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                    Font-Strikeout="False" Font-Underline="False" VerticalAlign="Top" Wrap="True" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Title" HeaderText="Title" UniqueName="Title">
                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                    Font-Strikeout="False" Font-Underline="False" VerticalAlign="Top" Wrap="True" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Description" HeaderText="Description" UniqueName="Description">
                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                    Font-Strikeout="False" Font-Underline="False" VerticalAlign="Top" Wrap="True" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Author" HeaderText="Author" UniqueName="Author" >
                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                    Font-Strikeout="False" Font-Underline="False" VerticalAlign="Top" Wrap="True" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Active" DataType="System.Boolean" HeaderText="Active"
                UniqueName="Active">
                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                    Font-Strikeout="False" Font-Underline="False" VerticalAlign="Top" Wrap="True" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="DocumentCategoryId" DataType="System.Int32" HeaderText="Category"
                UniqueName="DocumentCategoryId">
                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                    Font-Strikeout="False" Font-Underline="False" VerticalAlign="Top" Wrap="True" />
            </telerik:GridBoundColumn>
        </Columns>
        <EditFormSettings UserControlName="~/UserControls/AddUpdateDocument.ascx" EditFormType="WebUserControl">
            <EditColumn UniqueName="EditCommandColumn1" />
        </EditFormSettings>
    </MasterTableView>
    <ClientSettings>
        <Selecting AllowRowSelect="True" />
    </ClientSettings>
</telerik:RadGrid>

user control
<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="AddUpdateDocument.ascx.cs"
    Inherits="PortalAdmin.AddUpdateDocument" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<style type="text/css">
    .style1
    {
        text-align: right;
        width: 65px;
    }
</style>
    <table style="width: 100%; border: 1px solid #828282;">
        <tr>
            <td colspan="3">
                <asp:Label ID="Label9" runat="server" Style="font-weight: bold;" Text="Add/Update Document"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 116px; text-align: right;">
                <asp:Label ID="Label7" runat="server" Style="text-align: right;" Text="Document ID:" />
            </td>
            <td style="width: 449px">
                <telerik:radtextbox id="tbDocumentId" runat="server" maxlength="255" readonly="True"
                    width="41px" Text='<%# DataBinder.Eval(Container, "DataItem.DocumentId") %>'>
                </telerik:radtextbox>
            </td>
            <td>
                  
                <asp:Label ID="Label11" runat="server" Text="Category:"></asp:Label>
                <telerik:RadComboBox ID="cbCategories" Runat="server" Width="255px" >
                </telerik:RadComboBox>
            </td>
        </tr>
        <tr>
            <td style="width: 116px; text-align: right;">
                <asp:Label ID="Label1" runat="server" Style="text-align: right;" Text="Title: " />
            </td>
            <td style="width: 449px">
                <telerik:radtextbox id="tbTitle" runat="server" maxlength="255" width="435px" Text='<%# DataBinder.Eval(DataItem, "Title") %>'>
                                    </telerik:radtextbox>
            </td>
            <td style="text-align:center;">
                <asp:CheckBox ID="cbActive" runat="server" Text="Active?" />
                <asp:CheckBox ID="cbArchive" runat="server" Text="Archived?" style="padding-left: 10px;"/>
            </td>
        </tr>
        <tr>
            <td style="width: 116px; vertical-align: top; text-align: right;">
                <asp:Label ID="Label2" runat="server" Text="Description: " Style="text-align: right;" />
            </td>
            <td style="width: 449px">
                <telerik:radtextbox id="tbDescription" runat="server" maxlength="500" rows="7" textmode="MultiLine"
                    width="435px" Text='<%# DataBinder.Eval(DataItem, "Description") %>'>
                                    </telerik:radtextbox>
            </td>
            <td style="vertical-align: top;">
                <asp:Label ID="Label10" runat="server" Text="Current File Info"
                    Font-Underline="True"></asp:Label>
                <table style="width:100%;">
                    <tr>
                        <td class="style1">
                            <asp:Label ID="Label8" runat="server" Style="text-align: right;" Text="Name:" />
                        </td>
                        <td>
                            <asp:Label ID="lnkName" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            <asp:Label ID="Label12" runat="server" Style="text-align: right;"
                                Text="Location:" />
                        </td>
                        <td>
                            <asp:Label ID="lblLocation" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            <asp:Label ID="Label15" runat="server" Style="text-align: right;"
                                Text="Type:" />
                        </td>
                        <td>
                            <asp:Label ID="lblType" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            <asp:Label ID="Label14" runat="server" Style="text-align: right;"
                                Text="Size:" />
                        </td>
                        <td>
                            <asp:Label ID="lblSize" runat="server"></asp:Label>
                        </td>
                    </tr>
                </table>
                <br />
            </td>
        </tr>
        <tr>
            <td style="width: 116px; text-align: right;">
                <asp:Label ID="Label3" runat="server" Text="Author: " Style="text-align: right;" />
            </td>
            <td style="width: 449px">
                <telerik:radtextbox id="tbAuthor" runat="server" maxlength="255" width="435px">
                                    </telerik:radtextbox>
            </td>
            <td style="text-align: right">
                <telerik:RadUpload ID="upload" Runat="server"
                    ControlObjectsVisibility="None" Height="21px" MaxFileInputsCount="1"
                    Width="255px">
                </telerik:RadUpload>
            </td>
        </tr>
        <tr>
            <td colspan="3" style="text-align: right; width: 100%;">
                <asp:Button ID="btnSubmit" runat="server" Text="Submit Document"
                    CausesValidation="True"
                    CommandName="Update"/>
                <asp:Button ID="btnCancel" runat="server" CausesValidation="False"
                    CommandName="Cancel" Text="Cancel" />
            </td>
        </tr>
    </table>
russ
Top achievements
Rank 1
 answered on 28 Jul 2010
1 answer
334 views
Hi,

I wanted to develop a resource booking system, and encountered 3 problems:

1. how can I limit only the originator can edit/delete his own booking? Otherwise, users can change other's booking.

2. how can I set the style to highlight my own bookings?

3. How can I set the time slot (for example, if a room only available for 2 hours during 8 am to 10 am)

Thanks.
Peter
Telerik team
 answered on 28 Jul 2010
1 answer
155 views

Hello Community,

I'm having an issue with the RadToolBar and Chrome 5.0.375.99. I have checkboxes in the toolbar as tb items and when you expand the toolbar on first page load with page scrolled to the top it works fine. However, if you vertically scroll down on the page and then expand the toolbar the checkboxes appear floating near the top of the page. Using chrome developer tools I was able to see the "top" property changes based on where you're vertically scrolled to on the page.

I also noticed that the div for the toolbar renders at the top of the page right below the form tag in Chrome only.

The code snippet below is my Toolbar code.

<tr>
<td>
<telerik:RadToolBar ID="radTbSubscription" runat="server" BackColor="#375681" Skin="Default"
EnableViewState="false" ExpandAnimation-Type="OutQuart" 
CollapseAnimation-Type="InQuart" EnableAjaxSkinRendering="False">
<CollapseAnimation Type="InQuart" />
<Items>
<telerik:RadToolBarDropDown runat="server" Text="Select Topics">
<Buttons>
<telerik:RadToolBarButton runat="server" Text="rtbCreditReporting">
<ItemTemplate>
<asp:CheckBox runat="server" ID="chkCreditReporting" Text="Credit Reporting" />
</ItemTemplate>
</telerik:RadToolBarButton>
<telerik:RadToolBarButton Text="rtbDebtCollection">
<ItemTemplate>
<asp:CheckBox runat="server" ID="chkDebtCollection" Text="Debt Collection" />
</ItemTemplate>
</telerik:RadToolBarButton>
<telerik:RadToolBarButton runat="server" Text="rtbConsumerIssues">
<ItemTemplate>
<asp:CheckBox runat="server" ID="chkConsumerIssues" Text="Consumer Issues" Width="125px" />
</ItemTemplate>
</telerik:RadToolBarButton>
<telerik:RadToolBarButton runat="server" Text="rtbBankruptcy">
<ItemTemplate>
<asp:CheckBox runat="server" ID="chkBankruptcy" Text="Bankruptcy" />
</ItemTemplate>
</telerik:RadToolBarButton>
</Buttons>
</telerik:RadToolBarDropDown>
</Items>
</telerik:RadToolBar>
</td>
</tr>

Any help is appreciated.
Yana
Telerik team
 answered on 28 Jul 2010
3 answers
281 views
I have a radbinaryimage in a listview and on Radlistview1.ItemDataBound I am trying to set the DataValue to another field from my sql Query based on whether the record is "Signed" How can I do this it keeps giving me errors.

Protected Sub RadListView2_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadListViewItemEventArgs) Handles RadListView2.ItemDataBound
       If TypeOf e.Item Is RadListViewDataItem Then
           Dim signed As Label = DirectCast(e.Item.FindControl("Label6"), Label)
           Dim pnl1 As Panel = DirectCast(e.Item.FindControl("TopPanel"), Panel)
           Dim lbl4 As Label = DirectCast(e.Item.FindControl("Label4"), Label)
           Dim pnl2 As Panel = DirectCast(e.Item.FindControl("BottomPanel"), Panel)
           Dim btn1 As Button = DirectCast(e.Item.FindControl("Button1"), Button)
           Dim menu2 As RadMenu = DirectCast(sender.findcontrol("RadMenu2"), RadMenu)
           Dim img As RadBinaryImage = DirectCast(e.Item.FindControl("RadBinaryImage4"), RadBinaryImage)
           'Dim fball As menu2.
             
           'signed.Text = "True" 'Then
           'DirectCast(e.Item.FindControl("Div1"))
           'Div1.backgroundcolor = "00CC99"
       End If
         
       If Session("Signed") = 1 Then
           Dim menu2 As RadMenu = DirectCast(sender.findcontrol("RadMenu2"), RadMenu)
           Dim fball As RadMenuItem = DirectCast(menu2.FindItemByText("QuickFax (Signed)"), RadMenuItem)
           Dim fbsigned As RadMenuItem = DirectCast(menu2.FindItemByText("QuickFax (ALL)"), RadMenuItem)
           Dim img As RadBinaryImage = DirectCast(e.Item.FindControl("RadBinaryImage4"), RadBinaryImage)
           img.DataValue =<%# Bind("SignedImage") %>
           fball.Visible = True
           fbsigned.Visible = True
       End If
Rosen
Telerik team
 answered on 28 Jul 2010
1 answer
96 views
Hi,

I'm having an annoying issue with RadScheduler's rendering within a RadSplitter.

that's the code:
<telerik:RadSplitBar id="RadSplitbar1" EnableResize="false" runat="server" CollapseMode="Forward"></telerik:RadSplitBar>
                        <telerik:RadPane id="MiddlePane" runat="server">
                             <!-- Content -->
                              <!--<td valign="Top">-->
                         
                                <table width="100%">
                                    <tr>
                                        <td>
                                         <asp:updatepanel runat="server" ID="MasterUpdatePanel">
<table>
<tr>
        <td width="100%" colspan="2">
            <telerik:RadScheduler ID="SchedulerAttivita" runat="server"
                EnableCustomAttributeEditing="True" Width="100%" AllowDelete="False" AllowInsert="False"
                WeekView-HeaderDateFormat="dd/MM/yyyy" MonthView-UserSelectable="false"
                TimelineView-UserSelectable="false" DayView-UserSelectable="true"
                DayStartTime="<%# StartTime %>" DayEndTime="<%# EndTime %>" OverflowBehavior="Expand"
                WorkDayStartTime="<%# StartTime %>" WorkDayEndTime="<%# EndTime %>"
                ShowFooter="False" ShowAllDayRow="False" AppointmentStyleMode="Default"
                MinutesPerRow="<%# MinutesPerRow %>" FirstDayOfWeek="Monday" AdvancedForm-Enabled="false"
                LastDayOfWeek="Friday" DataKeyField="ID" DataStartField="DATA_INIZIO" DataEndField = "DATA_FINE"
                DataSubjectField="SUBJECT" SelectedView="WeekView"
                onappointmentclick="SchedulerAttivita_AppointmentClick"
                onformcreating="SchedulerAttivita_FormCreating"
                OnClientAppointmentMoving="OnClientAppointmentMoving"
                onnavigationcommand="SchedulerAttivita_NavigationCommand" Culture="it-IT"
                EnableAdvancedForm="False" HoursPanelTimeFormat="t">
                    <AdvancedForm Enabled="False" EnableCustomAttributeEditing="True"></AdvancedForm>
                    <Localization HeaderDay="<%$ Resources:SchedulerHeaderDay %>"
                    HeaderToday="<%$ Resources:HeaderToday %>" HeaderWeek="<%$ Resources:HeaderWeek %>" />
                    <TimelineView UserSelectable="False"></TimelineView>
                    <WeekView HeaderDateFormat="dd/MM/yyyy"></WeekView>
                    <MonthView UserSelectable="False"></MonthView>
            </telerik:RadScheduler>
        </td>
    </tr>
</table>
</asp:updatepanel>                                                              
                                        </td>
                                    </tr>
                                </table>
</telerik:RadPane>
                    </telerik:RadSplitter>

At the Page Load I see that the Radscheduler isn't completely rendered, as you can see in the attached screenshot.
If I make a post on the page, or simply closing and reopening the radsplitter bar, the scheduler behave as expected, filling the 100% width.

Some ideas about that?
Thanks in advance, bye

Leonardo
Peter
Telerik team
 answered on 28 Jul 2010
1 answer
114 views
Hi,

Is it possible to perform some action when a resource is clicked? i.e. can I make the resource name a link to something?

Cheers
Jon
Peter
Telerik team
 answered on 28 Jul 2010
4 answers
137 views
I'm using a radSplitter to devise the page in two part, the top and the bottom. In the bottom pane I have a radEditor with his ToolbarMode="ShowOnFocus". My problem is this : I set the contentUrl of the top pan to a PDF document and the document is located a tn front of all the control so the toolbar of my radEditor is not visible. Is there a way that I can put the toolbar in front of it. Is suspect it might not be possible because the pdf is opened with the default program and you might not have control over this, but I'm asking anyway. Another solution that would work for me, if it is possible, would be to set ToolbarMode="PageTop" but I would like to have the toolbar on top of his pane, not the top of the page.

I have attached an image showing the behavior of the radEditor when it has focus.

If anyone have a solution.

Thanks,
Sébastien
Rumen
Telerik team
 answered on 28 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?