Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
158 views
Is there anywhere that shows a general breakdown on the syntax of how to do format string in the RadGrid. I'd prefer to keep this out of the code behind databound event. I figured out how to do basic currency, however I want negatives to display with parenthesis instead of a minus symbol.

For example: (224,563.30) instead of -224,563.30

Here is one of the columns from my grid.:
<telerik:GridBoundColumn DataField="warehouse_249000" HeaderText="249000" UniqueName="warehouse_249000" DataFormatString="{0:$###,##0.#0}"></telerik:GridBoundColumn>

Normally, if I was using a repeater I would use something like "$#,##0.#0;($#,##0.#0);$#,##0.#0". What's the syntax for doing this with the RadGrid?
License
Top achievements
Rank 1
 asked on 15 Dec 2011
1 answer
109 views
Hi

I have several grids which have a selection column.

When I select the individual rows I get an ItemCommand 'RowClick' event.
When this happens I want to manipulate the UI depending on the number of items selected.

If its a single selection I do certain things. If its a multi-selection I want to do something different.

Obviously if I click the checbox in the column header ALL the items get marked as selected,
but I don't get an ItemCommand 'RowClick' event.

So my UI doesn't behave as I want.

Presumably there is some event getting fired. I just don't know what to detect.

TIA
Shinu
Top achievements
Rank 2
 answered on 15 Dec 2011
2 answers
85 views
Hi,
We're using the RAD Editor in an application where screen space is limited. For that reason we opted to use the 'Show on focus' method of displaying/hiding the editor toolbar as it doesn't require any space at the top of the editor content area.

Unfortunately, on some screens the toolbar obscures other screen content above the editor. If the editor was configured to use the 'Floating' toolbar mode (which allows the toolbar to be re-positioned), is there any way that displaying/hiding the toolbar can be controlled from a custom toggle image or button on the application screen? As part of this approach, we would obviously need to hide the table row at the top of the editor content area that's used for standard editor toggle button.

Thanks, Ian
Ian
Top achievements
Rank 1
 answered on 15 Dec 2011
3 answers
58 views
Hi Telerik Team,

Please I need to know how to change the HeaderContextMenu items order.
For example, I want the item "Columns" to be the 1st item in the HeaderContextMenu.

Please let me know how can I achieve this.

Thanks,
Bilal
Marin
Telerik team
 answered on 15 Dec 2011
3 answers
81 views
Hello,

I just added my first webresource/scriptresource to a project.
The class for which I added this contains a RadTreeView.
Since I added this, I get this (server-side) error when the browser tries to load Telerik.Web.UI.WebResource.axd:

   bei Telerik.Web.UI.CombinedScriptWriter.RegisterNamespace(TextWriter builder, String typeName, Boolean isDebug)
   bei Telerik.Web.UI.CombinedScriptWriter.WriteAssemblyScriptResources(TextWriter outputWriter, ScriptEntry scriptEntry)
   bei Telerik.Web.UI.CombinedScriptWriter.WriteScripts(List`1 scriptEntries, TextWriter outputWriter)
   bei Telerik.Web.UI.CombinedScriptWriter.GenerateResponse(List`1 scriptEntries, String hiddenFieldName, String combinedScripts)
   bei Telerik.Web.UI.CombinedScriptWriter.WriteCombinedScriptFile()
   bei Telerik.Web.UI.CombinedScriptWriter.WriteCombinedScriptFile(Page page, HttpContext context)
   bei Telerik.Web.UI.WebResource.ProcessRequest(HttpContext context)
   bei System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   bei System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

This is the code which leads to the exception (the class implements IScriptControl):
public IEnumerable<ScriptReference> GetScriptReferences()
 {
         yield return new ScriptReference("HierarchyTree1.HierarchyTree.js", GetType().Assembly.FullName);
}

When I use a non-existant scriptreference (e.g. "xxx.js") I won't get that error.
Please tell me if you need additional informations.

Regards,
JP

Edit: I just tested this without any telerik component involved and everything works. Somehow the TelerikWebResource won't work together with mine.
Edit2: Using a ScriptManager instead of a RadScriptManager helps.
Simon
Telerik team
 answered on 15 Dec 2011
2 answers
99 views
Hi, I've tried various css/manuals/snippets to get RadSplitter within RadWindow automatically resize on RadWindow resize. I wonder if there's known way to do it without conditionally heavy client-side js.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GlobalException.aspx.cs"
    Inherits="GlobalException" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form2" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <telerik:RadFormDecorator ID="FormDecorator" runat="server" DecoratedControls="all" />
    <telerik:RadSkinManager runat="server" ID="SkinManager" Skin="Windows7" PersistenceKey="Skin"
        PersistenceMode="ViewState" />
    <telerik:RadWindowManager ID="CommonWindowManager" runat="server" Behaviors="Resize, Maximize, Move">
        <Windows>
            <telerik:RadWindow ID="ExceptionWindow" runat="server" VisibleOnPageLoad="true">
                <ContentTemplate>
                    <telerik:RadSplitter ResizeWithParentPane="true" ResizeWithBrowserWindow="true" ID="MainSplitter" runat="server" Orientation="Horizontal">
                        <telerik:RadPane ID="TopPane" runat="server">
                            <telerik:RadTabStrip ID="exceptionTabStrip" runat="server" SelectedIndex="0" MultiPageID="exceptionMultiPage">
                                <Tabs>
                                    <telerik:RadTab runat="server" Text="message" Selected="True">
                                    </telerik:RadTab>
                                    <telerik:RadTab runat="server" Text="details">
                                    </telerik:RadTab>
                                </Tabs>
                            </telerik:RadTabStrip>
                        </telerik:RadPane>
                    </telerik:RadSplitter>
                </ContentTemplate>
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    </form>
</body>
</html>

I tried clean code from
http://demos.telerik.com/aspnet-ajax/splitter/examples/resizewithwindow/defaultcs.aspx
Everything works in browser page and in RadWindow with Url on another page but not in RadWindow's <ContentTemplate>.

!important: It is only acceptable to me to have a SINGLE page for RadWindow with controls without external url as in windowManager.open("Window.aspx", "Window");

Thanks
Max
Top achievements
Rank 1
 answered on 15 Dec 2011
4 answers
88 views
Everyone at Telerik who has dealt with me knows that I absolutely love your company and the great products you produce.  However, I do have a complaint/suggestion:

I've noticed that the vast majority of your demos and documentation and forum responses are strictly client-side solutions.  I realize that this is great for some developers but I would bet that there are a whole lot of your customers like me who:
  1. Are developing corporate web-based solutions that involve < 500 users.
  2. When it comes to the frequent battle between a Rich-UI and Lightning Fast Speed, often the UI is much more important.
  3. In my particular case, all of my server-side code is written in C#.  There are HUGE benefits to keeping as much of the codebase in C# and minimizing the amount of Javascript & jQuery code.
  4. Because of #1, scalability problems associated with keeping lots of state variables on the server is NOT an issue.

In my particular case, I'm building a web-based intranet app for a multi-billion dollar company.  But within that company its actual userbase will be less than 50.  As was the case with the app's VB6 WinForms predecessor, I will almost certainly be required to make periodic improvements to it over the next decade.  Because of this it's critically important to minimize the amount of client-side code and instead maximize the amount of type-safe, well structured server-side code.

To Telerik, all I'm asking for is this: Wherever possible, please include a server-side solution (or mostly server-side solution) where you have traditionally presented a strictly client-side solution in times past.  This will go a LONG WAY to helping developers (and loyal customers) like myself.

Sincerely,

Robert Werner
Vancouver, BC

Iana Tsolova
Telerik team
 answered on 15 Dec 2011
1 answer
183 views
Is it possible to use JQuery to select and modify properties on Telerik ASP.NET Ajax controls?

For example, I have the follow code which works fine to disable the ASP.NET textboxes on a particular form, but does not touch the RadComboBoxes or the RadDatePickers, even though they have the appropriate class.

        $(".datafield").attr("disabled", "disabled");

Is there any way, or do I have to select the Telerik controls one by one with Javascript, per the samples in help?:

    var combo = $find("<%= RadComboBox1.ClientID %>"); combo.disable();
    var picker = $find("<%= RadDatePicker1.ClientID %>"); picker.set_enabled(false);


Dobromir
Telerik team
 answered on 15 Dec 2011
3 answers
116 views
My apologies if this has come up before but when using the ShowIcon mode is there a way to make this work properly with No colour?

If I select no colour then the colour shown in the Icon is white - not the nothing icon (checked background with a red line through it).  I appreciate the fact that it does work behind the scenes but visually this is very misleading to the user.

When opening a form how do I know which are set to white and which are set to no colour?  This wouldn't be so much of a worry if when clicking the icon you could tell if white or no colour is picked but you can't - there is no indication whatsoever which is the active colour.

Does anyone know of a work around and can this be added as a bugfix or improvement (depends on your viewpoint but I regard as a bug).

Best Regards,

Jon

Jon
Top achievements
Rank 1
 answered on 15 Dec 2011
1 answer
105 views
As part of my reworking to try and avoid having to use the standard FormView component - as sadly no-one has yet developed a good alternative :(  - I am trying to use RadGrids and RadTreeLists to allow for my New, Edit and View requirements.  

I've got the new and edit forms kind of working (subject to some more help from support) but am having a dilemma re the view form.

My Edit and New forms use a popup formtemplate and that works very well.  I'd like the view only form to be similar.  Has anyone had experience doing this?

I see three potential ways to achieve this:
1) Use some form of detail template to popup a form and show data - the downside is that it means maintaining a second template.
2) Somehow use the FormTemplate and have some code to strip out the fields replacing them with labels showing the data.  I think that this would be the preferred option as it would mean consistency between forms and reuse of code.
3) Same as above but make the fields all read only to prevent user editing.  Downside is that they will look grey.

I haven't been able to find any demos for this kind of thing - some would be useful in the demos section :)

Any pointers?

Best Regards,

Jon
Tsvetina
Telerik team
 answered on 15 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?