Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
102 views
Hi,
We are can click on the name of the column in the Image Manager to sort ASC and DESC.
Can we set these sorted alphabetically by default?  If yes what property we should used?
Thanks
Rumen
Telerik team
 answered on 27 Oct 2010
1 answer
59 views
If is basically to document what I found. I don't know if it is a bug or not, I believe it is just a flaw in the design. But this hopefully will save someone time by not having to troubleshoot for hours like I did.

I used the example of Excel-like RadGrid because it was exactly what I wanted. HOWEVER, it is for text only columns in a database. I found that when binding to the database without hard coding in the columns on the .aspx page the grid will imply a column type (nvarchar = textbox, float=RadNumericTextBox, etc...). This is fine, but there are different naming conventions for each.

Textboxes will have names like RadGrid1_ctl00_ctl04_ctl02, RadGrid1_ctl00_ctl04_ctl03, RadGrid1_ctl00_ctl04_ctl04, while NumericTextBox will have names like RadGrid1_ctl00_ctl04_RNTB_EmpID, RadGrid1_ctl00_ctl04_RNTB_EmpAge. This makes the navigation impossible with databases with numeric values, as in the example to move right you increment the name by one:
    Active Cell RadGrid1_ctl00_ctl04_ctl02 -> to move right increment RadGrid1_ctl00_ctl04_ctl02 becomes RadGrid1_ctl00_ctl04_ctl03.

My question is: is there a way to change the naming convention of the RadNumericTextBox without casting the column on the SQL call?

I can work around it by using Shift-tab/Tab for Left/Right and since the 3rd ctl99 subset is the row, I can move up and down. And I have not tried it yet, but I am sure you can just get the cell location (i.e. row 2, cell 3) and move it that way by getting the control id in the adjacent cell, but Just wondering if there is a way to make NumericTextBox have the same naming convention as TextBox ?  


Radoslav
Telerik team
 answered on 27 Oct 2010
1 answer
51 views
Hi,

I have a problem with the appearance of the grid.

I have two button-columns. I decide if which one is shown in OnItemBound.
When I set

dataItem["btnDeny"].Controls[0].Visible = false;

the gridlines are broken in this column after that like in the screenshot.

Nadine
Pavlina
Telerik team
 answered on 27 Oct 2010
6 answers
76 views
Not sure whether this should be posted here or the RadWindow forum.

I have a monthly Scheduler view where I add and edit entries using a RadWindow to open another page.

This all works perfectly fine, until my Monthly Scheduler grows bigger than the displayed page.  If I then scroll down and add an entry at the bottom, the RadWindow opens and is shown for a moment in the correct position as maximized, then it is shifted down so it starts half way down the browser window.

If I add an event at the top of the Calendar it all works OK.

I am using RadControls 2010.2.9.929 and IE8 (although it exhibits the behaviour in other browsers as well)

David Penny
David Penny
Top achievements
Rank 2
 answered on 27 Oct 2010
1 answer
60 views
Hi,

I have a problem in my grid (skin: Oulook).

When I select a row, some kind of half background appears in the row. I don't know if it's some kind of background color or an additional part of the header?

I attached a screenshot of unselected and selected state.

            <telerik:RadGrid ID="RadGridSourcing" Skin="Outlook"  BorderStyle="None" <br>                runat="server" OnItemCreated="RadGridSourcing_ItemCreated" <br>                OnItemCommand="RadGridSourcing_OnItemCommand" AllowMultiRowSelection="true" ClientSettings-Selecting-AllowRowSelect="true"<br>                OnNeedDataSource="RadGridSourcing_NeedDataSource"<br>                 Width="100%" OnItemDataBound="RadGridSourcing_ItemDataBound" OnPreRender="RadGridSourcing_PreRender" BorderWidth="0">                 <br>                <HeaderStyle BackColor="Blue" BorderWidth="0"/> <br>                <CommandItemStyle BackColor="White"   /><br>                <ItemStyle ForeColor="DimGray" BackColor="White"  /><br>                <ActiveItemStyle BackColor="White"  /><br>                <AlternatingItemStyle BackColor="AliceBlue" ForeColor="DimGray" /> <br>                <SelectedItemStyle BackColor="White" /> <br>                <EditItemStyle BackColor="White" />                <br><MasterTableView AutoGenerateColumns="False" ShowHeader="true" EditMode="PopUp" DataKeyNames="Guid">


Nadine
Dimo
Telerik team
 answered on 27 Oct 2010
1 answer
468 views
Hi,
i've got a problem and dont know how to make it. Ive got a master site:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Default.master.cs" Inherits="Gambu.Client.Web.Default" %>
 
<!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>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager" runat="server" />
    <link rel="stylesheet" type="text/css" href="./Styles/Table.css" />
</head>
<body>
    <form id="MainForm" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <telerik:RadAjaxManager  ID="RadAjaxManager" runat="server" EnableHistory="True" />
        <telerik:RadSkinManager ID="RadSkinManager" Runat="server" Skin="Windows7" />
        <telerik:RadFormDecorator ID="RadFormDecorator" runat="server" Skin="Windows7" />
        <asp:ContentPlaceHolder ID="MainContentPlaceHolder" runat="server">
        </asp:ContentPlaceHolder>
        </form>
</body>
</html>
Default.cs: OnLoad i check if user is logged in, if no than show window with login:
var rWindow = new RadWindow();
rWindow.Title = "Logowanie";
rWindow.NavigateUrl = "Users/Login.aspx";
rWindow.Skin = "Windows7";
rWindow.IconUrl = "--";
rWindow.AutoSize = true;
rWindow.Modal = true;
rWindow.EnableShadow = true;
rWindow.EnableViewState = false;
rWindow.VisibleTitlebar = true;
rWindow.VisibleStatusbar = false;
rWindow.VisibleOnPageLoad = true;
rWindow.ShowContentDuringLoad = false;
rWindow.OnClientClose = "OnClientClose";
rWindow.Behaviors = Telerik.Web.UI.WindowBehaviors.Move;
WindowManager.Windows.Add(rWindow);
After user loggs in, i close the window and an event is fired:
function OnClientClose(oWnd, args) {
        var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");
        ajaxManager.ajaxRequest("client");
    }
 it fires in Default.aspx:
<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Gambu.Client.Web.Default1" %>
 
<asp:Content ID="HeadContent" ContentPlaceHolderID="head" runat="server"></asp:Content>
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy" runat="server"></telerik:RadAjaxManagerProxy>
<script type="text/javascript">
    //<![CDATA[
    function OnClientClose(oWnd, args) {
        var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");
        ajaxManager.ajaxRequest("client");
    }
    //]]>
</script>
 
<telerik:RadWindowManager ID="WindowManager" runat="server" />
 
<telerik:RadSplitter ID="MainRadSplitter" runat="server" Width="100%" Height="100%" LiveResize="True" Orientation="Horizontal">
    <telerik:RadPane ID="MainTopRadPane" runat="server" Height="30px" Scrolling="None"></telerik:RadPane>
    <telerik:RadPane ID="MainMiddleRadPane" runat="server" Scrolling="None">
        <telerik:RadSplitter ID="MainContentRadSplitter" runat="server" Width="100%" Height="100%" LiveResize="True" Orientation="Vertical">
            <telerik:RadPane ID="MainLeftMenuRadPane" runat="server" MinWidth="200" Width="250px" Scrolling="None">               
                <asp:Panel ID="MainLeftMenuPanel" runat="server"></asp:Panel>
                <div id="test" runat="server"></div>
            </telerik:RadPane>
            <telerik:RadSplitBar ID="MainMiddleRadSplitBar" runat="server" CollapseMode="Forward"></telerik:RadSplitBar>
            <telerik:RadPane ID="MainContentRadPane" runat="server" Scrolling="None">
            </telerik:RadPane>
        </telerik:RadSplitter>
    </telerik:RadPane>
</telerik:RadSplitter>
</asp:Content>
so i got request in:
protected void AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
            manager.Alert("test");
            test.InnerHtml = "test";
        }
Alert is working fine, but i cant change any control  on the site, and id like to load into MainLeftMenuPanel a UserControl, not only this, because ill need to load 3 diffrent controls into 3 diffrent panels or divs
Dimo
Telerik team
 answered on 27 Oct 2010
1 answer
61 views
Hey guys,

i have the following scenario.

I have an RadListView with about 10 pages. Each item in the ListView is clickable and linked to a new page with detailed information.

Let`s say i am currently on page 6 and click on an item. A new site with detailed information about this item appears in my browser.

Now i want to get back and click on the browser back-button. The ListView is appearing again but now i am not on page 6 where i clicked the item rather i am on page 1 of my ListView again.

Is there an possibility that the ListView can remember the page where i clicked my item and jump back automatically or do i have to store the page in the session and restore it manually to the ListView?

I am using RadDataPager and RadListView.

Thanks in advance.

Christ 
Dimo
Telerik team
 answered on 27 Oct 2010
1 answer
75 views
Hi,

I am unable to align the checkbox column of Templatecolumn to center in the Telerik grid column. Checkbox column is the first column and i am unable to make it center.
Please find the bellow code

<telerik:GridTemplateColumn UniqueName="ChkTmpColumn" HeaderText="Chk1" AllowFiltering="false" Resizable = "false" Reorderable = "false" >
                                                        <HeaderTemplate>                                                       
                                                            <asp:CheckBox ID="hdrChkTmpColumn" AutoPostBack="false" runat="server" ></asp:CheckBox>
                                                        </HeaderTemplate>
                                                        <ItemTemplate>                                                          
                                                            <asp:CheckBox ID="ChkTmpColumnSearch" AutoPostBack="false" runat="server" ></asp:CheckBox>
                                                        </ItemTemplate>
                                                        <HeaderStyle Width="50px"  HorizontalAlign="Center"  VerticalAlign="Middle" /> 
                                                        <ItemStyle  HorizontalAlign="Center" VerticalAlign="Middle" /> 

                                                    </telerik:GridTemplateColumn>


Please view the attached screen shot for further reference.
Thanks in advance.

Pavlina
Telerik team
 answered on 27 Oct 2010
1 answer
28 views
I have seen the examples but have had some trouble implementing them.  I need to know how to put a grid in edit mode similar to excel for non readonly columns in a grid with gridboundcolumns.

Thanks
Dimo
Telerik team
 answered on 27 Oct 2010
2 answers
140 views
So I have been working with RadTreeView and it's context menu with succes, to test if it could solve a problem of mine. Next problem  was that the RadTreeNodes could not contain enough information, so I created my own TreeNodes, and extended those to RadTreeNode. I could create and add the new Nodes to the RadTreeNode without any problems.

But when I tested my treeview, it's showed all nodes i added. When i rightclick the contextmenu pops up, but when clicking on any menuitem, the OnContextMenuItemClick event is not fired. I tried remove all of my nodes, and only add one original RadTreeNode. This works.

I found out that the problem also affects OnNodeDrop and OnNodeEdit events.

It sounds like using costum nodes corrupts some event system. Is this true?

Here are my code snippets:

Custom node:
public class ReportTreeNode : RadTreeNode
    {
        public ReportTreeNode(String text) : base(text)
        {
            Locked = false;
        }
 
        public ReportTreeNode(String text, String value) : base(text, value)
        {
            Locked = false;
        }
 
        public ReportTreeNode(String text, String value, String image)
            : base(text, value)
        {
            Locked = false;
            ImageUrl = image;
        }
 
        public ReportTreeNode(String text, String value, String image, String type)
            : base(text, value)
        {
            NodeType = type;
            Locked = false;
            ImageUrl = image;
        }
 
        public bool Locked { get; set;}
 
        /// <summary>
        /// The report node type. eg. Section, textarea, pagebreak etc.
        /// </summary>
        public String NodeType { get; set; }
 
        /// <summary>
        /// Returns the depth location of the node
        /// </summary>
        /// <returns></returns>
        public int getDepthOfNode()
        {
            int result = 0;
            foreach (char c in FullPath)
            {
                if (c == '/')
                    result++;
            }
            return result;
        }
    }


TreeView:
<telerik:RadScriptManager ID="scriptmanager" runat="server" />
        <telerik:RadAjaxLoadingPanel  ID="RadAjaxLoadingPanel1" runat="server" ><img src="anidog2.gif" /></telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
            <asp:Literal ID="statusMessage" runat="server"></asp:Literal><br />
            <telerik:RadTreeView ID="template" runat="server" EnableDragAndDrop="true" EnableDragAndDropBetweenNodes="true"
            OnContextMenuItemClick="dynamicMenu_ContextMenuItemClick" OnNodeDrop="dynamicMenu_OnNodeDrop" OnNodeEdit="dynamicMenu_OnNodeEdit" AllowNodeEditing="true" OnLoad="templateOnInit">
                <ContextMenus>
                    <telerik:RadTreeViewContextMenu>
                        <Items>
                            <telerik:RadMenuItem Text="Add" Value="none" ImageUrl="application_add.png">
                                <Items>
                                    <telerik:RadMenuItem Text="Section" Value="add:section" ImageUrl="section.png"/>
                                    <telerik:RadMenuItem Text="Textarea" Value="add:textarea" ImageUrl="testArea.png"/>
                                </Items>
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem Text="Add Custom Section" Value="addCustom" ImageUrl="application_add.png" runat="server" />
                            <telerik:RadMenuItem Text="Delete" Value="delete" ImageUrl="application_delete.png" runat="server" />
                        </Items>
                    </telerik:RadTreeViewContextMenu>
                </ContextMenus>
            </telerik:RadTreeView>
        </telerik:RadAjaxPanel>



And here I add a node to the treeview:
protected void templateOnInit(object sender, EventArgs e)
        {
            if(IsPostBack)
                return;
            template.Nodes.Clear();
 
            ReportTreeNode report = new ReportTreeNode("Report", "report", picturepath + "/report.png", "report");
            report.Locked = true;
            template.Nodes.Add(report);
            return;
        }

if anyone have an answer to this, I would be happy.
Kasper Lindgaard
Top achievements
Rank 1
 answered on 27 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?