Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
78 views
Greetings,

I am trying to integrate the MDI Demo and the RadSkinManager chooser. The issue I am currently facing is that when windows are open and I change the skin, the windows dissapear. The RadSkinManager mark-up for the window manager is...

<telerik:RadWindowManager ID="RadWindowManagerMain" runat="server" 
                           RestrictionZoneID="center"
                           Behaviors="Close, Maximize, Minimize, Move, Resize" 
                           KeepInScreenBounds="true"                                   
                           VisibleStatusbar="false"
                           EnableShadow="true"
                           Animation="Fade"
                           AnimationDuration="300"
                           AutoSize="false"
                           VisibleOnPageLoad="false" 
                           IconUrl="../CSS/titlegraphic.gif" 
                           ShowContentDuringLoad="true"
                           OnClientDragStart="WindowDragStart"
                           OnClientCommand="OnClientCommand"
                           OnClientActivate="OnClientActivate" 
                           OnClientClose="OnClientClose"
                           EnableViewState="true">
</telerik:RadWindowManager>

I am not sure what I am missing or if I should expect this to work at all? Any help or insight would be greatly appreciated.

Kind Regards,
Tom
Georgi Tunev
Telerik team
 answered on 27 Sep 2010
5 answers
114 views
Hi!

Can I force a RadDateInput to use the first month / the first day or the last month / the last day as auto-complete values instead of the month/day och today? E.g. I want to have two inputs where in the user can type "1980" in the first, and I always want that to auto-complete as 1980-01-01 no matter the date. In the second input the user can type "1984" and that should auto-complete as 1984-12-31.

Possible?

From this it also follows that if the user in the second input types "1984-02" the auto-complete should be 1984-02-29, and "1983-02" should be 1983-02-28.
Dimo
Telerik team
 answered on 27 Sep 2010
1 answer
134 views
Hi,
        Allow paging is not working in radgrid. Please check the code below:
<radW:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Office2007">
</radW:RadWindowManager>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<radspl:RadSplitter Width="100%" Height="100%" ID="RadSplitter1" runat="server" 
Orientation="Horizontal" Skin="Office2007" VisibleDuringInit="false">
<radspl:RadPane ID="RadPane1" runat="server" Height="167" MinHeight="79">
  
<radG:RadGrid ID="RadGrid1" runat="server" PageSize="5" AllowSorting="true"
EnableAJAXLoadingTemplate="true" AllowPaging="true" AutoGenerateColumns="False" EnableAJAX="True"
GridLines
="None" Skin="Office2007">
<AJAXLoadingTemplate>
 <asp:Panel ID="Panel1" Width="100%" Height="100%" runat="server">
   <img src="Images/Loading.gif" style="z-index: 100" />
 </asp:Panel>
</AJAXLoadingTemplate>
<ExportSettings IgnorePaging="True" OpenInNewWindow="True" />
<PagerStyle Mode="NextPrevAndNumeric" />
<MasterTableView DataKeyNames="ID" AllowPaging="true" AllowSorting="true">
 <Columns>
   <radG:GridBoundColumn DataField="ID" UniqueName="ID" Display="false">
   </radG:GridBoundColumn>
   <radG:GridBoundColumn DataField="Name" UniqueName="Name">
   </radG:GridBoundColumn>
 </Columns>                                    
</MasterTableView>
<ClientSettings ApplyStylesOnClient="True" EnableClientKeyValues="True">
  <Selecting AllowRowSelect="True" />
  <ClientEvents OnGridCreated="GridCreated" OnRequestStart="GridRequestStart" 
OnRowContextMenu="ContextMenu" />
</ClientSettings>
</radG:RadGrid>
  
</radspl:RadPane>
</radspl:RadSplitter>

Note: im using classic radgrid.

Please find me the solution as soon as possible.

Thanks in Advance.

Regards,
Asif





Shinu
Top achievements
Rank 2
 answered on 27 Sep 2010
1 answer
137 views
Hi ,

I am using latest Telerik release version 2010.2.826.35 .
I am creating RadMenu dynamically in code behind and its added to RadPanel bar.
I am creating RadMenuItem dynamically based on some logic and clear menu items on ClientClosed

Codebehind code
objRadMenu.WebServiceSettings.Path = "../Service/SNetService.asmx";
                       objRadMenu.WebServiceSettings.Method = "GetUserLinkHistory";
                       objRadMenu.OnClientItemPopulating = "ShowImage";
                       objRadMenu.OnClientItemPopulated  = "HideImage";
                       objRadMenu.OnClientItemClosed = "ChildMenuClosed";
                       objRadMenu.OnClientMouseOver = "ShowToolTip";                                           
                       RadMenuItem objRadMenuToday = new RadMenuItem(ResourceLang.GetString("Today", "MySettings.aspx"));                       
                       objRadMenuToday.ExpandMode = MenuItemExpandMode.WebService;                    

 
Following is the code in aspx : This code is taken from Telerik Site.

function ChildMenuClosed(sender, args) {
 
           try {
               var item = args.get_item();
               var varItemID = item.get_attributes().getAttribute("PKID");
               if (varItemID == "5") //Clearing Today Data only
               {
                   item.set_expandMode(Telerik.Web.UI.MenuItemExpandMode.WebService);
                   item.get_items().clear();
                   item._itemsLoaded = false;
               }
           } catch (exp) { }
       }

Issue in IE
1 . Alignment issue on second time hover on menu items, Items are generated but whole items are not visible if count is more that 15.
2. If Items are more than 200 then IE hangs and give prompt for non responsive script if i click continue then items are loaded.

Issue in Firefox
1. Items are shown only one time. Once menu is closed it is never shown again although code behind is executed all times.


Please reply for solution.

Thanks
Veenu





Kamen Bundev
Telerik team
 answered on 27 Sep 2010
1 answer
91 views
Hello,

I'm using a basic RadEditor as below:

<telerik:RadEditor ID="re1" runat="server">
</telerik:RadEditor>

From the HTML mode, I enter the following:

<html>
    <head>
        <style>
            span{ color: red !important; }
            div { color: blue !important; }
        </style>
    </head>
    <body>
        <span>should be red</span>
        <div>should be blue</div>
    </body>
</html>

When returning to Design or Preview mode, the DIV is blue, but the SPAN is not red. Do you have any idea why?

The RadEditor is in a page with NO stylesheet.

Thanks,

David
Rumen
Telerik team
 answered on 27 Sep 2010
0 answers
66 views
hello to all,

              i would like to ask on how am i going to hide the scroll bars horizontal and vertical, i'm using the Q2 version 2008, and also how am i going to set the x and y coordinate when the user click the select button on the grid..

here's my sample..i have 4 grid in my page and dynamically have select button on each on the grid. when the user click the select button it should be at the button of page and the same with the other grid..how can i do that..

please help.

thanks in advance
Jols
Top achievements
Rank 2
 asked on 27 Sep 2010
2 answers
114 views
Hi! When user clicks on Add new row in detailsTables i want a parent data key name to pass to new page... on client side
but i have CommandItemTemplate on detailsTables, therefore kindly tell how could i get parent datakeyvalue on ShowInsertForm function.
<CommandItemTemplate>
                    <div class="lnkStyle">
                        <a href="#" onclick="return ShowInsertForm();" style="text-decoration: none;">
                            <img id="imgAdd" src="../Images/icon_add.png" style="border-width: 0px;" />
                            Add new record </a>
                    </div>
                </CommandItemTemplate>                
Winston Yong
Top achievements
Rank 1
 answered on 27 Sep 2010
1 answer
142 views
Hi,

I am having a radgrid with  a radnumeric column to display amount. 
In Radnumeric column i am displaying total in footer of that column. 

The problem is i need to store that total amount to a variable as i need that amount for some calculation.

Please help me in this issue. 

Need urgent help

Regards,
Prathap Narravula   
Princy
Top achievements
Rank 2
 answered on 27 Sep 2010
2 answers
143 views
Good day!
I have got suchan html maket of site - http://aptekaural.ru/docs/fornet2.html
All the content is in the left column, the right column contains only menu. You can hide or show the right column on button click. When the right column hide, the content of the left column fills all the page.
When I put a RadGrid into the left column, it looks good in all browswes, but in GoogleChrome & Safari it looks awfull - grid has narrow footer & header, grid's width takes both left & right column's width and nothing helps. button click doesn't help too. YOu can see the printscrins attached to the theme.

I'm speaking about cush a rad grid:

<telerik:RadGrid  ID="grClients" runat="server" GridLines="None" AllowPaging="True"
          AllowAutomaticInserts="True" AllowAutomaticUpdates="True"  AllowFilteringByColumn="True"
          AllowSorting="True"  PageSize="50"   Skin="Windows7"
        OnNeedDataSource="RadGrid1_NeedDataSource" AutoGenerateColumns="False"
        ShowGroupPanel="True" Width="100%" Height="100%" GroupPanel-Width="100%"
       >
        <MasterTableView EditMode="PopUp" DataKeyNames="Id">
            <Columns>
                <telerik:GridBoundColumn ReadOnly="True" DataField="Name" HeaderText="Название" SortExpression="Name" UniqueName="Name"/>
                <telerik:GridBoundColumn ReadOnly="True" DataField="Login" HeaderText="Логин"
                    HeaderStyle-Width="100" FilterControlWidth="50" SortExpression="Login"
                    UniqueName="Login">
<HeaderStyle Width="100px"></HeaderStyle>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn ReadOnly="True" DataField="CityRegionName" HeaderText="Регион" SortExpression="CityRegionName" UniqueName="CityRegionName"/>
                <telerik:GridBoundColumn ReadOnly="True" DataField="CityName"
                    HeaderText="Город" SortExpression="CityName" UniqueName="CityName"
                    HeaderStyle-Width="150" FilterControlWidth="100">
<HeaderStyle Width="150px"></HeaderStyle>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn ReadOnly="True" DataField="Cell" HeaderText="Телефон" SortExpression="Cell" UniqueName="Cell"/>
                <telerik:GridDateTimeColumn DataField="CreatedOn.Date"
                    HeaderText="Дата регистрации"
                    ReadOnly="True" SortExpression="CreatedOn.Date"
                    UniqueName="CreatedOn.Date" DataFormatString="{0:d}" DataType="System.DateTime" HeaderStyle-Width="80">
<HeaderStyle Width="80px"></HeaderStyle>
                </telerik:GridDateTimeColumn>
                <telerik:GridCheckBoxColumn DataField="UserIsApproved" HeaderText="Активация"
                    UniqueName="UserIsApproved" ReadOnly="True" DataType="System.Boolean" HeaderStyle-Width="50">
<HeaderStyle Width="50px"></HeaderStyle>
                </telerik:GridCheckBoxColumn>
                <telerik:GridCheckBoxColumn DataField="HasAccount" HeaderText="Есть аккаунт"
                    UniqueName="HasAccount" ReadOnly="True" DataType="System.Boolean" HeaderStyle-Width="50" >
<HeaderStyle Width="50px"></HeaderStyle>
                </telerik:GridCheckBoxColumn>

            </Columns>
        </MasterTableView>       
         <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True"
            AllowDragToGroup="True">
            <Selecting AllowRowSelect="true" />
            <ClientEvents OnRowContextMenu="RowContextMenu"></ClientEvents>
            <Resizing EnableRealTimeResize="false" />
        </ClientSettings>
        <PagerStyle Mode="NextPrevAndNumeric" />
    </telerik:RadGrid>


Any ideas what to do?
lina fetisova
Top achievements
Rank 1
 answered on 27 Sep 2010
5 answers
181 views
Hello,

I'm using two listboxes inside of a tooltip.  The list boxes are configured for single transfer with drag and drop enabled. I am having a problem where I am unable to transfer a single item between the listboxes. Any ideas why this might be happening? I'm using VS2010 and the .NET 4 version of the latest build of Telerik.
Customer.aspx:
  
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="customers.aspx.cs" Inherits="customers" %>
<%@ Register Src="assignusers.ascx" TagName="ProductDetails" TagPrefix="uc1" %>
  
<!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>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Skin="Windows7" />
          
        <telerik:RadAjaxManager ID="AjaxManager1" runat="server" EnablePageHeadUpdate="false">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1"/>
                        <telerik:AjaxUpdatedControl ControlID="Literal1" />
                        <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
  
        <telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="ManualClose"
            Width="620" Height="230" runat="server" EnableShadow="true" OnAjaxUpdate="OnAjaxUpdate"
            RelativeTo="Element" Position="MiddleRight" Modal="true">
        </telerik:RadToolTipManager>
  
        <asp:Literal ID="Literal1" runat="server" Text="" />
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" DataSourceID="EntityDataSource1"
             AllowAutomaticInserts="true" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true" AllowPaging="true" PageSize="10"
             EnableLinqExpressions="false" OnItemCommand="RadGrid1_ItemCommand" OnItemDataBound="RadGrid1_ItemDataBound">
             <MasterTableView DataKeyNames="id" CommandItemDisplay="Top" EditMode="PopUp">
                 <EditFormSettings CaptionFormatString="Add/Edit Customers" PopUpSettings-Modal="true"
                     EditFormType="WebUserControl" UserControlName="editcustomer.ascx" PopUpSettings-Width="700px">
                 </EditFormSettings>
                 <Columns>
                    <telerik:GridButtonColumn ButtonType="LinkButton" Text="edit" CommandName="Edit" />
                    <telerik:GridButtonColumn ButtonType="LinkButton" Text="delete" CommandName="Delete" />
                    <telerik:GridBoundColumn DataField="name" HeaderText="Name" />
                    <telerik:GridTemplateColumn UniqueName="AssignUsers">
                        <ItemTemplate>
                            <asp:HyperLink ID="targetControl" runat="server" NavigateUrl="#" Text="Assign Users" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
             </MasterTableView>
        </telerik:RadGrid>
    </div>
    <asp:EntityDataSource ID="EntityDataSource1" runat="server" 
        ConnectionString="name=EntityFrameworkTestEntities" 
        DefaultContainerName="EntityFrameworkTestEntities" EnableDelete="True" 
        EnableFlattening="False" EnableInsert="True" EnableUpdate="True" 
        EntitySetName="Customers" Include="Users" OnDeleted="EntityDataSource1_Deleted"
        OnInserting="EntityDataSource1_Inserting" OnUpdating="EntityDataSource1_Updating"
        OnInserted="EntityDataSource1_Inserted" OnUpdated="EntityDataSource1_Updated"
        ViewStateMode="Enabled">
    </asp:EntityDataSource>
    </form>
</body>
</html>
  
assignusers.ascx:
  
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="assignusers.ascx.cs" Inherits="assignusers" %>
<%@ Import Namespace="Telerik.Web.UI" %>
<div>
    <table>
        <tr>
            <td>Users <b>NOT</b> Assigned To This Customer</td>
            <td>Users Assigned To This Customer</td>
        </tr>
        <tr>
            <td>
                <telerik:RadListBox ID="RadListBox1" runat="server" Width="300px" Height="200px" AutoPostBack="false"
                    SelectionMode="Single" AllowTransfer="true" TransferToID="RadListBox2" AutoPostBackOnTransfer="true"
                    EnableDragAndDrop="true" AllowReorder="false">
                </telerik:RadListBox>
            </td>
            <td>
                <telerik:RadListBox ID="RadListBox2" runat="server" Width="300px" Height="200px" AutoPostBack="false"
                    SelectionMode="Single" AllowReorder="false" EnableDragAndDrop="true" AutoPostBackOnTransfer="true" 
                    AllowTransfer="true" TransferToID="RadListBox1"
                    OnDeleting="RadListBox2_Deleting" OnInserting="RadListBox2_Inserting">
                </telerik:RadListBox>
            </td>
        </tr>
    </table>
</div>
  
assignusers.ascx.cs:
  
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections.Specialized;
using Telerik.Web.UI;
  
public partial class assignusers : System.Web.UI.UserControl
{
    public int Id
    {
        get { return Convert.ToInt32(ViewState["id"]); }
        set { ViewState["id"] = value.ToString(); }
    }
  
  
    protected void Page_Load(object sender, EventArgs e)
    {
        RadListBox1.Items.Clear();
        RadListBox2.Items.Clear();
        using (var context = new EntityFrameworkTestModel.EntityFrameworkTestEntities())
        {
            if (RadListBox2.DataSource == null)
            {
  
                var customer = context.Customers.First(p => p.id == Id);
                RadListBox2.DataSource = customer.Users.ToList();
                RadListBox2.DataKeyField = "id";
                RadListBox2.DataTextField = "name";
                RadListBox2.DataValueField = "id";
                RadListBox2.DataBind();
            }
  
            if (RadListBox1.Items.Count == 0)
            {
                var users = from u in context.Users
                            orderby u.name
                            select u;
                foreach (var user in users)
                {
                    if (RadListBox2.FindItemByValue(user.id.ToString()) == null)
                    {
                        RadListBoxItem _item = new RadListBoxItem(user.name, user.id.ToString());
                        RadListBox1.Items.Add(_item);
                    }
                }
            }
        }
    }
  
    protected void RadListBox2_Deleting(object sender, RadListBoxDeletingEventArgs e)
    {
        using (var context = new EntityFrameworkTestModel.EntityFrameworkTestEntities())
        {
            var customer = context.Customers.First(p => p.id == Id);
            foreach (RadListBoxItem item in e.Items)
            {
                int _itemid = Convert.ToInt32(item.Value);
                var user = context.Users.First(u => u.id == _itemid);
                customer.Users.Remove(user);
            }
            context.SaveChanges();
        }
    }
  
    protected void RadListBox2_Inserting(object sender, RadListBoxInsertingEventArgs e)
    {
        using (var context = new EntityFrameworkTestModel.EntityFrameworkTestEntities())
        {
            var customer = context.Customers.First(p => p.id == Id);
            foreach (RadListBoxItem item in e.Items)
            {
                int _itemid = Convert.ToInt32(item.Value);
                var user = context.Users.First(u => u.id == _itemid);
                customer.Users.Add(user);
            }
            context.SaveChanges();
        }
    }
}

Thanks in advance.
Larry
Larry
Top achievements
Rank 1
 answered on 26 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?