Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
101 views
The Rad Grid that we have has the ability to select rows using the mouse as well as keyboard arrow keys. However, doing so shows two seperate rows selected. how do we continue to use only one selected row. i.e when the mouse selection is used only that row should be selected, and when the keyboard is used only that row should be selected.

At one time only one type of row should be selected.

To Recreate:
Select a Row using the mouse click say # 3 in the Grid, it is hilighted.
Next, use the keyboard arrows, and move the arrows keys down. 

you can now see two rows selected. 1) the one that was highlighted/selected using the mouse, 2) the one that was selected using the keyboard arrows.   
Dimo
Telerik team
 answered on 06 Aug 2008
1 answer
151 views
I have a Tabstrip control on a content page which is opened through a master page in my application. I also a Rad splitter on the master page which opens a radPane. When I the RadPane expands, the tabs on the tabstrip control on the content page always displays in front. Is there any solution for this or is it fixed in the latest version of Rad controls.

Thnx
madhu
Svetlina Anati
Telerik team
 answered on 06 Aug 2008
1 answer
109 views
I am binding to a datasource on the server and everything works like a charm however "InitialItemIndex" does nothing for me at all if it is a bug thats fine if I am doing something wrong please let me know...

If not I will just adjust my stored procedure to rearrange the items dynamicly for me...
Svetlina Anati
Telerik team
 answered on 06 Aug 2008
7 answers
843 views
Does anyone know at what point the GridEditCommandColumn is rendered? I need to be able to hid the column on the page load given certain conditions and nothing that i've tried, i never can find the control. I can find other controls such as grid data item and template items, but not the GridEditCommandColumn items.

Thanks
Shinu
Top achievements
Rank 2
 answered on 06 Aug 2008
2 answers
118 views
Greetings,

I have a problem with my RadCalendar whenever I combine it with a RadWindowManager on the same site.

I want to use RadWindow as a popup whenever I click a link.
A codebehind example for this is:
ScriptManager.RegisterStartupScript(this.update1, this.update1.GetType(), "showDialog", "window.radopen('" + url + "', 'RadWindow');", true);

This works fine, but whenever I add the RadWindowManager to the site, my calendar resets the skin to another format (not just default, but a completely different one with red number and no format).

What can cause this? It doesnt matter where or how I try to set the skin manually in the codebehind, it´s like the RadWindowManager overwrites the format of my RadCalendar somehow?

Please feel free to write if you need more information.
Anders
Top achievements
Rank 1
 answered on 06 Aug 2008
5 answers
182 views
Could you please advise how to save multiple items with the Grid?

I have created a grid with 2 read-only columns and 2 writeable check box columns, enabled MultiRowEdit, put the whole grid into the Edit mode and wanted to set check boxes and save the whole grid when I click Save.

However, I am having couple of problems: 
1. Changing pages or sorting removes all changes (probably it rebinds the grid)
2. Without rebind, I can't find how to get a primary key for the row (I added an invisible column to the grid)
3. Without rebind, I can't put Grid into Edit Mode.

Also, I have a couple of side questions (not too critical):
4. If I enable grouping by column, I can't put a grid into edit mode at all (found couple of ways on the site, none of them worked, throwing exception). Or is there a way?
5. Filtering with auto suggestions - is there a way to set it up in easy way, like asking grid to traverse all rows for specific columns, find all values and then showing them in drop downs on under selected columns?

Thank you
Sebastian
Telerik team
 answered on 06 Aug 2008
3 answers
242 views
I'm trying to set a few styles on my RadTree - but keep getting odd results.  I have one static root node then I'm gettin a dataset and looping over it and adding a node to this parent node via rtMailingList.Nodes[0].Nodes.Add(siteNode);
my definition of the tree looks as such.

<

telerik:RadTreeView ID="rtMailingList" ShowLineImages="false" runat="server" CausesValidation="false">

<Nodes>

<telerik:RadTreeNode Text="Mailing Lists" Value="ML" ContextMenuID="null" PostBack="false"/>

</Nodes>

</telerik:RadTreeView>

I'm trying to override the base styles and use a min height  -but I can't get all the nodes to min size and when I hover over a node my hover style applies but I jump all over the place.. Here are my styles.

.RadTreeView,
.RadTreeView a.rtIn,
.RadTreeView .rtEdit .rtIn .rtSp .rtLI input

{

display:block;
border-width: 0 0 1px 0;
border-style:dotted;
border-color:#e6e6e6;
color: #a22f01;
min-height:20px;
padding:5px 5px 0 5px;

}

.RadTreeView .rtSelected .rtIn

{

display:block;
border-width: 0 0 1px 0;
border-style:dotted;
background-color: #a22f01;
background-color:#ffad38;
min-height:20px;
padding:5px 5px 0 5px;
color:#fff;
background:#a22f01 url(/images2/arrow.png) right no-repeat;
}

.RadTreeView .rtHover .rtIn
{
display:block;
border-width: 0 0 1px 0;
border-style:dotted;
border-color:#e6e6e6;
color: #a22f01;
background-color:#ffad38;
min-height:20px;
padding:5px 5px 0 5px;
}

Yana
Telerik team
 answered on 06 Aug 2008
2 answers
208 views
How do i programmatically specify grid colum width size as I add columns to my grid view.
thanks.
Princy
Top achievements
Rank 2
 answered on 06 Aug 2008
13 answers
267 views
Im has decided to try to integrate Editor in CommunityServer 2007, after read
thread
http://www.telerik.com/community/forums/thread/b311D-mdmhe.aspx
and having looked sources of wrapper I on tried to make this too
most for Editor from "Prometheus" project. The first with what was the
problem: it "System. InvalidOperationException: The control with ID '
Editor ' requires a ScriptManager on the page. The ScriptManager must
appear before any controls that need it. ".

For the decision of a problem it was necessary to write wrapper which
creates inside of itself instance Editor, configures it, and then creates
instance ScriptManager and adds in wrapper collection of controls all over
again a instance of ScriptManager, and then a instance of Editor, code of wrapper:
public class RadEditorWrapper : WebControl, ITextEditor, ITextControl 
    { 
        private Dictionary<stringstring> configOptions = new Dictionary<stringstring>(); 
        private bool _enableHtmlModeEditing = true
        private static bool smAdded = false
        private RadEditor editor; 
        private ScriptManager scriptManager; 
        #region ITextEditor Members 
  
        public void ApplyConfigurationOption(string name, string value) 
        { 
            //Save config options 
            if (configOptions.ContainsKey(name)) 
                configOptions[name] = value; 
            else 
                configOptions.Add(name, value); 
  
            //Try to set control properties 
            Type t = editor.GetType(); 
            System.Reflection.PropertyInfo pi = t.GetProperty(name); 
            if (pi != null
            { 
                if (pi.PropertyType == typeof(string)) 
                { 
                    pi.SetValue(editor, value, null); 
                } 
                else if (pi.PropertyType == typeof(int)) 
                { 
                    pi.SetValue(editor, int.Parse(value), null); 
                } 
            } 
        } 
  
        public int Columns 
        { 
            get 
            { 
                return 80; 
            } 
            set 
            { 
                  
            } 
        } 
  
        public bool EnableHtmlModeEditing 
        { 
            get 
            { 
                return this._enableHtmlModeEditing; 
            } 
            set 
            { 
                this._enableHtmlModeEditing = value; 
            } 
        } 
  
        public string GetBookmarkScript() 
        { 
            return ""
        } 
  
        public string GetContentInsertScript(string contentVariableName) 
        { 
            return string.Format("$find(\"<%={1}%>\").pasteHtml('{0}');", contentVariableName, this.ClientID); 
        } 
  
        public string GetContentScript() 
        { 
            return string.Format("$find(\"<%={0}%>\").get_Html(true);"this.ClientID); 
        } 
  
        public string GetContentUpdateScript(string contentVariableName) 
        { 
            return string.Format("$find(\"<%={1}%>\").set_Html('{0}');", contentVariableName, this.ClientID); 
        } 
  
        public string GetFocusScript() 
        { 
            return string.Format("$find(\"<%={0}%>\").setFocus();"this.ClientID); 
        } 
  
        public bool IsSupported(System.Web.HttpBrowserCapabilities browser) 
        { 
            return true
        } 
  
        public bool IsRichTextCapable 
        { 
            get { return true; } 
        } 
  
        public int Rows 
        { 
            get 
            { 
                return 20; 
            } 
            set 
            { 
            } 
        } 
        #endregion 
        #region ITextControl Members 
  
        public string Text 
        { 
            get 
            { 
                return editor != null ? editor.Content : string.Empty; 
            } 
            set 
            { 
                if (editor != null
                    editor.Content = value; 
            } 
        } 
        #endregion 
  
        public RadEditorWrapper() 
        { 
            editor = CreateRadEditor(); 
            editor.ID = "RadEditor"
  
            scriptManager = new ScriptManager(); 
            scriptManager.EnablePartialRendering = true
            scriptManager.ID = "RadEditorScriptManager"
        } 
  
        protected override void CreateChildControls() 
        { 
            if (!smAdded) 
            { 
                this.Controls.Add(scriptManager); 
                smAdded = true
            } 
  
            this.Controls.Add(editor); 
        } 
        protected override void OnUnload(EventArgs e) 
        { 
            smAdded = false
  
            base.OnUnload(e); 
        } 
  
        private RadEditor CreateRadEditor() 
        { 
            RadEditor editor = new RadEditor(); 
  
            editor.Modules.Clear(); 
  
            //DialogDefinition insertEmoticonDialogDefinition = new DialogDefinition("~/EmoticonsDialog.ascx", new DialogParameters()); 
            //insertEmoticonDialogDefinition.Modal = true; 
            //insertEmoticonDialogDefinition.VisibleTitlebar = true; 
            //insertEmoticonDialogDefinition.VisibleStatusbar = false; 
            //insertEmoticonDialogDefinition.Width = Unit.Pixel(250); 
            //insertEmoticonDialogDefinition.Height = Unit.Pixel(250); 
            //editor.AddDialogDefinition("Emoticons", insertEmoticonDialogDefinition); 
  
            InitToolbar(editor); 
            SetImageManagerProps(editor); 
  
            return editor; 
        } 
  
        private void SetImageManagerProps(RadEditor editor) 
        { 
            string baseVirtualPath = "~/UserImages"
            string cuurentUserName = CurrentUserName.LastIndexOf('\\') < 0 ? CurrentUserName : CurrentUserName.Substring(CurrentUserName.LastIndexOf('\\') + 1); 
  
            if (!IsMember) 
                return
  
            string basePath = HttpContext.Current.Server.MapPath(baseVirtualPath); 
            string userPath = string.Format("{0}\\{1}", basePath, cuurentUserName); 
            string userVirtualPath = string.Format("{0}/{1}", baseVirtualPath, cuurentUserName); 
  
            if (!Directory.Exists(basePath)) 
                Directory.CreateDirectory(basePath); 
            if (!Directory.Exists(userPath)) 
                Directory.CreateDirectory(userPath); 
  
            editor.ImageManager.UploadPaths = new string[] { userVirtualPath }; 
            editor.ImageManager.ViewPaths = new string[] { userVirtualPath }; 
            editor.ImageManager.MaxUploadFileSize = 5242880; // 5 Mb 
        } 
  
        private void InitToolbar(RadEditor editor) 
        { 
            EditorToolGroup group = new EditorToolGroup(); 
  
            group.Tools.Add(new EditorTool("Bold")); 
            group.Tools.Add(new EditorTool("Underline")); 
            group.Tools.Add(new EditorTool("Italic")); 
            group.Tools.Add(new EditorSeparator()); 
            group.Tools.Add(new EditorTool("JustifyLeft")); 
            group.Tools.Add(new EditorTool("JustifyCenter")); 
            group.Tools.Add(new EditorTool("JustifyRight")); 
            group.Tools.Add(new EditorTool("JustifyFull")); 
            group.Tools.Add(new EditorTool("JustifyNone")); 
            group.Tools.Add(new EditorSeparator()); 
            group.Tools.Add(new EditorTool("ForeColor")); 
            group.Tools.Add(new EditorTool("BackColor")); 
            group.Tools.Add(new EditorSeparator()); 
            if (IsMember) 
            { 
                group.Tools.Add(new EditorTool("ImageManager")); 
                group.Tools.Add(new EditorSeparator()); 
            } 
            group.Tools.Add(new EditorTool("InsertOrderedList")); 
            group.Tools.Add(new EditorTool("InsertUnorderedList")); 
            group.Tools.Add(new EditorTool("InsertSymbol")); 
            group.Tools.Add(new EditorTool("InsertHorizontalRule")); 
            group.Tools.Add(new EditorSeparator()); 
            group.Tools.Add(new EditorTool("LinkManager")); 
            group.Tools.Add(new EditorTool("Unlink")); 
            group.Tools.Add(new EditorSeparator()); 
            group.Tools.Add(new EditorTool("AjaxSpellCheck")); 
            //EditorTool emoticons = new EditorTool("Emoticons"); 
            //emoticons.ShowIcon = true; 
            //group.Tools.Add(emoticons); 
  
  
            editor.Tools.Clear(); 
            editor.Tools.Add(group); 
        } 
  
        private bool IsMember 
        { 
            get 
            { 
                return true
                //return Roles.IsUserInRole("Members"); 
            } 
        } 
  
        private string CurrentUserName 
        { 
            get { return HttpContext.Current.User.Identity.Name; } 
        } 
  
    }  


after that, im add to code check for add ScriptManager to the page once (valiable smAdded), this is a bad workaround :(.
At now Editor display at page, but not functional, and im take some JavaScript errors in Firefox:

Error: InlineContentEditor is not defined
http://localhost/cs/forums/AddPost.aspx?ForumID=1
Error: Sys is not defined
http://localhost/cs/forums/AddPost.aspx?ForumID=1
Error: Telligent_Modal is not defined
http://localhost/cs/forums/AddPost.aspx?ForumID=1
Error: Telligent_InlineEditor is not defined
http://localhost/cs/forums/AddPost.aspx?ForumID=1
Error: DefaultTextEditor is not defined
http://localhost/cs/forums/AddPost.aspx?ForumID=1
Error: Telligent_DblClickInlineEditorPanel is not defined
http://localhost/cs/forums/AddPost.aspx?ForumID=1
Error: Telligent_DblClickInlineEditorPanel is not defined
http://localhost/cs/forums/AddPost.aspx?ForumID=1
Error: TagEditor is not defined
http://localhost/cs/forums/AddPost.aspx?ForumID=1
Error: Sys is not defined
http://localhost/cs/forums/AddPost.aspx?ForumID=1
Error: Telligent_TabbedPanes is not defined
http://localhost/cs/forums/AddPost.aspx?ForumID=1



If you have an opportunity, please help, to understand with a problem.
Probably someone already faced the same problem and could solve it.
Thankful in advance for the help!
Lini
Telerik team
 answered on 06 Aug 2008
5 answers
155 views
Sir
How to give different color to each column of grid

Thanks
Princy
Top achievements
Rank 2
 answered on 06 Aug 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?