Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
146 views
Dear Telerik Team,

I have the following snippet of code which is located in the postback section of Page_Load. Two checkboxes were checked but it still shows 'false'. 

'Attempt reading the SelectedItems Before the Grid Repaints
            If (Me.IsPostBack) Then
                SPID= String.Empty
                For Each gi As GridDataItem In rgp.Items
                    Dim objValueCheckbox As Object = gi.FindControl("boolValue")
                    If (Not objValueCheckbox Is Nothing) Then
                        If (objValueCheckbox.GetType().Name = "CheckBox") Then
                            Dim chkValueCheckbox As CheckBox = DirectCast(objValueCheckbox, CheckBox)
                            If Not chkValueCheckbox.Attributes("PID") Is Nothing Then
                                If (chkValueCheckbox.Checked) Then
                                    SPID= SPID& chkValueCheckbox.Attributes("PID") & ","
                                End If
                            End If
                        End If
                    End If
                Next


                SPID= SPID.TrimEnd(",")
            End If
Deepak Vasudevan
Top achievements
Rank 2
 answered on 15 Nov 2011
2 answers
178 views
Hi Telerik Team,

I am adding different tabs in existing tab of RadTabStrip dynamically, but i am unable to see the tabs in existing tab.

Can you please provide me the proper solution on above scenario.?


Thanks and Regards,
Simon.
Kate
Telerik team
 answered on 15 Nov 2011
1 answer
94 views
I'm using the WebBlue theme with a tabstrip in the current release. When I have three tabs, the third one has a single-pixel vertical line spanning the entire top/bottom height of the tab.  This occurs with the default CSS:

.RadTabStrip .rtsOut, .RadTabStripVertical .rtsOut {
  display: block;
  padding-right: 11px;
}

If I manually change the value of padding-right to anything from 7 to 11, I see the line. Outside of that range, no line.  The first two tabs don't have the line. .... weird...

This is in FireFox 3.6.13, didn't see it in IE8.
Kate
Telerik team
 answered on 15 Nov 2011
1 answer
109 views
I have a form (shown in the attachment) that has a fixed header and footer but the middle section should re-size with the browser window. How do is do this?

The form is made is using the code bwlow:
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Sitefinity"
    MinDisplayTime="200">
    <asp:Label ID="Label2" runat="server" ForeColor="Red">Loading... </asp:Label>
</telerik:RadAjaxLoadingPanel>
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Sitefinity">
</telerik:RadSkinManager>
<telerik:RadSplitter ID="rsMain" runat="server" VisibleDuringInit="false" Width="100%" Height="100%"
    Orientation="Horizontal" EnableEmbeddedSkins="False" Skin="splitter_2">
    <telerik:RadPane ID="rpTop" runat="server" CssClass="ApplyOverflow" Height="50px"
        Width="100%" Scrolling="None">
    </telerik:RadPane>
    <telerik:RadPane ID="rpMiddle" runat="server" Height="800px" Width="100%" Scrolling="None">
        <telerik:RadSplitter ID="rsMiddle" runat="server" Width="100%" Height="100%" EnableEmbeddedSkins="False"
            Skin="splitter_2">
            <telerik:RadPane ID="rpMiddleLeft" runat="server" Width="20%" Height="100%" PersistScrollPosition="true">
                <telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Horizontal">
                    <telerik:RadPane ID="rpMiddleLeftTop" runat="server">
                     </telerik:RadPane>
                    <telerik:RadSplitBar ID="RadSplitBar2" runat="server" CollapseMode="Both" Visible="true" />
                    <telerik:RadPane ID="rpMiddleLeftMiddle" runat="server" Height="45%"
                        Visible="true" PersistScrollPosition="true">
                    </telerik:RadPane>
                    <telerik:RadSplitBar ID="RadSplitBar3" runat="server" CollapseMode="Both">
                    </telerik:RadSplitBar>
                    <telerik:RadPane ID="rpMiddleLeftBottom" runat="server"  Height="10%">
                      </telerik:RadPane>
                </telerik:RadSplitter>
                </telerik:RadPane>
            <telerik:RadSplitBar ID="RadSplitBar1" runat="server"
                    CollapseMode="Forward" />
            <telerik:RadPane ID="rpMiddleRight" runat="server" Width="80%" Height="100%" PersistScrollPosition="true">
            </telerik:RadPane>
        </telerik:RadSplitter></telerik:RadPane>
    <telerik:RadPane ID="rpBottom" runat="server" Height="20px" Width="100%" Scrolling="None">
        <div style="text-align: center; background-color: #f5be19;">
            Version 4, ip3 Copyright (c) 1999-2011 Intuitive Solutions Group Inc.</div>
    </telerik:RadPane>
    <telerik:RadPane ID="rpPlatform" runat="server" Visible="false">
    </telerik:RadPane>
</telerik:RadSplitter>
Dobromir
Telerik team
 answered on 15 Nov 2011
1 answer
115 views
Hi, I hope you can help me.
I'm using a radTreeview to present the information, my problem is when the property Visible of the radtreenode became false on the server-side (because I need it in that way), in the client-side the radTreeView only have the nodes that remained visible on the server-side.

How can I correct this??

Thanks
Princy
Top achievements
Rank 2
 answered on 15 Nov 2011
2 answers
343 views
Hello,
Is it possible to center the selected value in RadComboBox ?
Also I'd like to write in it starting from center position (currently if I'm writing in RadComboBox my chars are showing starting from the left side, I'd like them to appear centered).

Any ideas ?

Regards
Darek
Dariusz
Top achievements
Rank 1
 answered on 15 Nov 2011
6 answers
151 views
I have a RadScheduler that is being populated by a DataProvider.  When there are only a few appointments being displayed, such as when in the DayView, the tooltips are displayed quickly when I pause the mouse over the appointment and the context menu displays quickly when I right-click the appointment.  By "quickly" I mean "no perceptible delay."

However, when there are many appointments displayed, such as when in MonthView, there is a three to five second delay from the time the mouse stops over the appointment to the time the tooltip is displayed.  There is a similar delay when trying to activate the context menu with a right-click.  In this case, "many" is about 30 appointments.

I've read the Telerik support documents regarding RadSheduler performance and have implemented their suggestions, for example my DataProvider only returns those appointments that are in the current view.  The rendering of the page is working as I think it should, the problem occurs on the client-side when the user tries to interact with the displayed calendar.  Thinking that maybe other javascript on the page is interferring with the RadScheduler,I have gone so far as to remove everything from the page except my RadScheduler and the problem still exists.

Thanks. Any clues on what I could try next are appreciated.
--dennis


PS Here is the markup for the RadScheduler.  The AppointmentManager javascript class handles specifics about our environment and the hidden context menu items are made visible in the codebehind based on security settings of the current user.

<telerik:RadScheduler ID="RadScheduler1" runat="server" StartInsertingInAdvancedForm="True" EnableViewState="false"
                   StartEditingInAdvancedForm="true" Localization-ConfirmDeleteTitle="Cancel appointment"
                   Localization-ConfirmDeleteText="Are you sure that you want to cancel this appointment?"
                   Localization-ConfirmCancel="No" Localization-ConfirmOK="Yes" Localization-ConfirmRecurrenceDeleteTitle="Cancel appointment"
                   Localization-ConfirmRecurrenceDeleteOccurrence="Cancel only this occurence."
                   Localization-ConfirmRecurrenceDeleteSeries="Cancel the series." ProviderName="AppointmentDataProvider"
                   SelectedView="WeekView" OnNavigationComplete="RadScheduler1_NavigationComplete"
                   OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" OnFormCreating="RadScheduler1_FormCreating"
                   OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" OnAppointmentContextMenuItemClicked="RadScheduler1_AppointmentContextMenuItemClicked"
                   OnTimeSlotContextMenuItemClicked="RadScheduler1_TimeslotContextMenuItemClicked"
                   OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnDataBound="RadScheduler1_DataBound"
                   OnClientAppointmentInserting="AppointmentManager.validateTimeslot" OnClientAppointmentMoveEnd="AppointmentManager.validateTimeslot"
                   OnClientAppointmentContextMenuItemClicking="AppointmentManager.contextMenuHandler"
                   OnClientTimeSlotContextMenuItemClicking="AppointmentManager.contextMenuHandler"
                   OnClientFormCreated="AppointmentManager.onFormCreated" AllowDelete="false" AllowEdit="false"
                   AllowInsert="false" OnFormCreated="RadScheduler1_FormCreated">
                   <TimelineView UserSelectable="false" />
                   <TimeSlotContextMenus>
                       <telerik:RadSchedulerContextMenu ID="RadSchedulerContextMenu1" runat="server">
                           <Items>
                               <telerik:RadMenuItem Text="New Appointment" Value="CommandAddAppointment" Visible="false" />
                               <telerik:RadMenuItem Text="New Recurring Appointment" Value="CommandAddRecurringAppointment"
                                   Visible="false" />
                               <telerik:RadMenuItem Text="Go to today" Value="CommandGoToToday" />
                               <telerik:RadMenuItem Text="Show 24 hours..." Value="CommandShow24Hours" />
                               <telerik:RadMenuItem Text="Export all appointments" Value="CommandExport" />
                           </Items>
                       </telerik:RadSchedulerContextMenu>
                   </TimeSlotContextMenus>
                   <AppointmentContextMenus>
                       <telerik:RadSchedulerContextMenu ID="RadSchedulerContextMenu2" runat="server">
                           <Items>
                               <telerik:RadMenuItem Text="Edit" Value="CommandEdit" Visible="false" />
                               <telerik:RadMenuItem Text="Delete" Value="CommandDelete" Visible="false" />
                               <telerik:RadMenuItem Text="Export appointment" Value="CommandExport" />
                           </Items>
                       </telerik:RadSchedulerContextMenu>
                   </AppointmentContextMenus>
               </telerik:RadScheduler>
Peter
Telerik team
 answered on 15 Nov 2011
1 answer
252 views
Hi,

I have a RadGrid with a custom FormTemplate in the EditFormSettings and AutoGenerateEditColumn = "true".  On the RadGrid ItemDataBound, I successfully bind to the controls in my Edit Form.  This is done as follows:

protected void myRadGrid_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item is GridEditFormItem && e.Item.IsInEditMode) //bind edit form controls
            {
                int pkId = int.Parse(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["MyPkID"].ToString());
                GridEditFormItem editFormItem = e.Item as GridEditFormItem;
                TextBox tb = editFormItem.FindControl("MyTextBox");
                tb.Text = "my text";
            }
        }

The edit form shows and is correctly populated with data.  The problem is, the 'Edit' link on the RadGrid row does not change to show the 'Update' and 'Cancel' links, so the row cannot be updated.  You can see, though, that e.Item.IsInEditMode is true, so why does the RadGrid not think the row is in Edit mode?   What am I missing?

Princy
Top achievements
Rank 2
 answered on 15 Nov 2011
1 answer
128 views
Hello,

I'm using in my websites the RadGrid control alot (See the following code - only DataKeyNames, AddNewRecordText properties and the columns are different).
Can I save this template on an external file and load it in each time I want to use the control?
<telerik:RadGrid ID="MngRadGrid" runat="server" GridLines="None" AllowPaging="True" CssClass="RadGrid" OnItemDataBound="MngRadGrid_ItemDataBound"
                AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="true" OnPreRender="MngRadGrid_PreRender"
                OnNeedDataSource="MngRadGrid_NeedDataSource" OnUpdateCommand="MngRadGrid_UpdateCommand"
                OnInsertCommand="MngRadGrid_InsertCommand" OnDeleteCommand="MngRadGrid_DeleteCommand" Width="780px">
            <MasterTableView Width="780px" CommandItemDisplay="Top" Dir="LTR" DataKeyNames="UserID">
            <AlternatingItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
            <CommandItemSettings RefreshText="Refresh" AddNewRecordText="Add New Record" />
            <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" />
            <HeaderStyle HorizontalAlign="Left" />
            <Columns>
                <telerik:GridEditCommandColumn EditText="<%$ Resources:TelerikResource, RadGridEditColumnText %>" ItemStyle-Width="7%" UniqueName="EditCommandColumn1" >
                </telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn UniqueName="UserID" HeaderText="User ID" ItemStyle-Width="7%" DataField="UserID">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn UniqueName="UserName" HeaderText="<%$ Resources:MngResource, MngRLUsersMngRadGridColumnsUserName %>" ItemStyle-Width="19%" >
                  <ItemTemplate>
                      <asp:Image ID="AvatarImage" ImageUrl='<%# "~/RL/Avatars/" + Eval("Avtr") %>' Width="40px" Height="40px" runat="server" /><br />
                      <asp:Label ID="ManagerNameDataLabel" SkinID="NormalText" runat="server" Text='<%# Eval("UserName") %>'></asp:Label>
                  </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn UniqueName="RolesNam" HeaderText="<%$ Resources:MngResource, MngRLUsersMngRadGridColumnsRoles %>" ItemStyle-Width="7%" >
                  <ItemTemplate>
                      <asp:Label ID="RolesDataLabel" SkinID="NormalText" runat="server" Text="..." ToolTip='<%# Eval("RolesNam") %>'></asp:Label>
                  </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn UniqueName="Email" HeaderText="<%$ Resources:MngResource, MngRLUsersMngRadGridColumnsEmail %>" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Left" DataField="Email">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn UniqueName="LastEdit" HeaderText="Last Edit" ItemStyle-Width="26%" >
                  <ItemTemplate>
                      <table border="0" cellpadding="0" cellspacing="0" width="100%">
                         <tr valign="top">
                           <td width="25">
                              <asp:Label ID="ByLabel" runat="server" SkinID="FieldNameLabel" Text="By:"></asp:Label>
                           </td>
                           <td width="*">
                              <asp:Label ID="LastEditedByNameDataLabel" SkinID="NormalText" runat="server" Text='<%# Eval("LastEditedByName") %>'></asp:Label>
                           </td>
                         </tr>
                         <tr>
                            <td width="25">
                              <asp:Label ID="DateLabel" runat="server" SkinID="FieldNameLabel" Text="Date:"></asp:Label>
                           </td>
                           <td width="*">
                              <asp:Label ID="DateDataLabel" runat="server" Text='<%# Eval("LastEditedDate") %>'></asp:Label>
                           </td>
                         </tr>
                      </table>
                  </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridButtonColumn ConfirmText="<%$ Resources:TelerikResource, RadGridDeleteColumnConfirmText %>" ConfirmDialogType="RadWindow" ItemStyle-Width="7%"
                    ConfirmTitle="<%$ Resources:TelerikResource, RadGridDeleteColumnConfirmTitle %>" ButtonType="ImageButton" CommandName="Delete" Text="<%$ Resources:TelerikResource, RadGridDeleteColumnText %>"
                    UniqueName="DeleteColumn">
                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                </telerik:GridButtonColumn>
            </Columns>
            <EditFormSettings UserControlName="SubUserControl.ascx" EditFormType="WebUserControl">
                <EditColumn UniqueName="EditCommandColumn1">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
    </telerik:RadGrid>

If it is possible, let me know how can I do that

Regards,
Bader
Mira
Telerik team
 answered on 15 Nov 2011
2 answers
421 views
Hi,
Using RadFileExplorer, I want the user to be able to create new subfolders. However, I want to limit this ability to certain existing folders.
Example: The user may create subfolders in folder "Pictures", but not in folder "Agreement".
I can use the server-side OnItemCommand event and cancel the operation if RadFileExplorerEventArgs.Command=="CreateDirectory" and RadFileExplorerEventArgs.Path is not a folder that allows subfolders, but at this point the user has already entered the name of the new folder and pressed OK.
The best solution,  I think, would be to disable the Create folder button (and context-menu choice) client-side, depending on which folder is the current folder. Something like this (for the toolbar button):

 

<telerik:RadFileExplorer OnClientFolderChange="OnClientFolderChange" EnableCreateNewFolder="True"....

Javascript:

function OnClientFolderChange(sender, args) {
    if(args.get_path() != 
"Pictures") {
        var tbitem = 
sender.get_toolbar().findItemByValue("NewFolder");
        
if(tbitem != 
null) {
            tbitem.disable();
        }
    }
}

Unfortunately, this does not work. The toolbar button gets disabled, but then enabled again, immediately after.

In addition, this would be solved very easily if the EnableCreateNewFolder property of RadFileExplorer could be set client-side, using javascript. Is that possible, or do you guys have a different solution?

Thanks,

Arnstein

Dobromir
Telerik team
 answered on 15 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?