Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
254 views
When entering a value in the numeric textbox with a large decimal value such as 0.000013, the value turns into scientific notation, 1E-03 or something to that effect on postback. I have tried removing the DecimalDigits property as well as setting KeepNotRoundedValue to true or false and AllowRounding to true or false without any luck. Any decimal less than the initial four zero's for the precision are handled correctly. I see this error may already have been resolved in the latest Q1 2012 BETA release but I am instructed not to use BETA versions for any development since this will be incorporated into production code. Is there any workaround to allow me to use a six digit decimal value with 4-5 zero's in the precision without having to do away with the numeric textbox until the final Q1 release comes out? Maybe an override or something for this hover effect turning into scientific notation?

Thanks,
Brandon
Mira
Telerik team
 answered on 09 Feb 2012
10 answers
174 views
Anyone have any ideas what would cause the images for the expand/collapse not to render.  See the attached screenshot.
I am not doing anything out of the ordinary.  And haven't modified the styles at all.

The treelist is on a UserControl.

Hopefully someone can point me in the right direction.

Thanks,
Kenneth
Tsvetina
Telerik team
 answered on 09 Feb 2012
2 answers
108 views
Hi

Below is my Code:
<FONT color="#0000ff" size="2" face="Consolas"><FONT color="#0000ff" size="2"
face="Consolas"><FONT color="#0000ff" size="2"
face="Consolas"><telerik:RadPanelItem Text="Content Details" Expanded="True"
PostBack="false"
Selected="true"><BR>
<Items><BR>
<telerik:RadPanelItem Text="Description" Value="DESCRIPTION"
></telerik:RadPanelItem><BR>
<telerik:RadPanelItem Text="Objectives/Requirements"
Value="Requirements"></telerik:RadPanelItem><BR>
<telerik:RadPanelItem Text="Scenario Details"
Value="ScenarioDetails"></telerik:RadPanelItem>
<BR>
<telerik:RadPanelItem Text="Categorization"
Value="TrainingDiscipline"></telerik:RadPanelItem><BR>
<telerik:RadPanelItem Text="Simulator Details"
Value="SimulatorDetails"></telerik:RadPanelItem>
<BR>
<BR>
</Items><BR>
</telerik:RadPanelItem><BR></FONT></FONT></FONT>

Now I want to maintain the Selected Item even if click the Root Item(Here : "DESCRIPTION").

if click any item under "DESCRIPTION" then the selected item is highlighted
and Now if click the root item i.e."DESCRIPTION" then the "DESCRIPTION" is Highlighted, but i want to hhighlight the child Item i.e "Categorization", because i'm still on the same page.

I attached the screen shots also. I want to maintain the Highlighted selected Item based on the current page.
Thanks in Advance
karthik

Karthik
Top achievements
Rank 1
 answered on 09 Feb 2012
4 answers
240 views
Hi,

I have implemented stylesheetManager for my application.
I am trying to set different theme on postback i.e. by adding css files dynamically.

here is sample code:

private void AddStyleSheets(RadStyleSheetManager styleSheetManager)
        {
            styleSheetManager.StyleSheets.Clear();
  
            if (SessionManager.CurrentSessionManager.PageTheme.ToLower().Equals("tone"))
            {
                styleSheetManager.StyleSheets.Add(new Telerik.Web.UI.StyleSheetReference("SNet.RTO.Skins.TOne.ComboBox.css", "SNet.RTO.Skins.TOne"));
            }
            else
            {
                styleSheetManager.StyleSheets.Add(new Telerik.Web.UI.StyleSheetReference("CustomSkins.ComboBox.css", "CustomSkins"));
            }
  
            styleSheetManager.ApplyStyleSheetSkin(Page);
        }

I am calling above method on Page's Init event.

Style is set on first time load only and never works after postback. I have read following post but of no use.
http://www.telerik.com/community/forums/aspnet-ajax/scriptmanager-and-stylesheetmanager/stylesheetmanager-does-not-update-head-section-after-ajax-postback.aspx

Any help? Thanks in anticipation.
Simon
Telerik team
 answered on 09 Feb 2012
7 answers
214 views
I have a couple of RadListBox controls on a page configured to use the Listbox\ Transfer functionality as outlined in this Demo.

I have bound an "onkeypress" event to both listboxes in the code behind. Thus

lstFirstListBox.Attributes.Add("onkeypress", "filterListBox('" + lstFirstListBox.ClientID + "', event);");
lstSecondListBox.Attributes.Add("onkeypress", "filterListBox('" + lstSecondListBox.ClientID + "', event);");

similar to this Forum Thread and the attached example.

The problem I have encountered is that the 'onkeypress" event does not fire in Firefox. It fires in IE without any problems.

However, it will fire in Firefox after I transfer an item from one listbox to the other. In this case it does not metter which listbox has focus the event is fired on 'FirstListBox" every time. That is, I transfer an item from First to Second and then perform a key press, it fires on First. I tranfer an item from Second to First and then perform a keypress, it fires on First.

For testing I have limited the "filterListBox" function to pop up an alert with the first parameter which, apart from in IE, is always the FirstListBox clientID.

I also tried binding the event using jQuery and got the exact same behaviour.

The event does seem to fire at all in Chrome or Safari no matter what combination of clicks or trickery I attempt.

Any ideas would be greatly appreciated.
Bozhidar
Telerik team
 answered on 09 Feb 2012
1 answer
125 views
Hi everyone.

Actually i run into a problem where i have 2 radlistbox, they are inside an updatepanel wich the update is conditional. The thing is that i dont want them to postback, so i just took the autopostback off.. it works great, its really fast, but if i got the page a postback it throws an index error. this error just occur if i left 0 itens at the first radlistbox, if exists one it didnt occur.

here goes the code. 
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <plk:Formulario ID="frmDistribuidor" runat="server" Titulo="Distribuidores" Visible="false">
                <asp:Panel ID="pnlDistribuidorUnico" runat="server" Visible="false">
                    <div>
                        <asp:Label ID="label4" runat="server" Text="Distribuidor"></asp:Label>
                        <span style="padding-left: 73px;">
                            <asp:DropDownList ID="ddlDistribuidor" Width="280px" runat="server">
                            </asp:DropDownList>
                        </span>
                    </div>
                </asp:Panel>
                <asp:Panel ID="pnlDistribuidorLooping" runat="server" Visible="false">
                    <div style="float: left; padding-left: 20px;">
                        <div class="esq larg300">
                            <div style="background-color: #3C49A5; width: 300px; height: 20px;">
                                <div style="padding-top: 4px; text-align: center; color: White; height: 20px;">
                                    Distribuidores de Preferência
                                </div>
                            </div>
                            <telerik:RadListBox ID="RadListBox1" runat="server" Width="300px" Height="150px"
                                SelectionMode="Multiple" AllowTransfer="True" TransferToID="RadListBox2"
                                AllowReorder="True" EnableDragAndDrop="True" PersistClientChanges="true" OnClientTransferred="onClientTransferredHandler" AutoPostBackOnReorder="true" CssClass="RadListBox">
                                <ButtonSettings ShowTransferAll="false" ShowTransfer="false" VerticalAlign="Middle"
                                    ShowReorder="false" AreaWidth="50px" />
                            </telerik:RadListBox>
                        </div>
                        <div class="esq alt150" style="text-align: center; padding-left: 10px">
                            <br />
                            <br />
                            <br />
                            <asp:ImageButton ID="btnParaDireita" ImageUrl="~/Imagens/btn-Rigth.png" runat="server"
                                ToolTip="Adicionar" OnClientClick="return transferRight()" />
                            <br />
                            <asp:ImageButton ID="btnParaEsquerda" ImageUrl="~/Imagens/btn-Left.png" runat="server"
                                ToolTip="Remover" OnClientClick="return transferLeft()" />
                            <br />
                            <br />
                            <img id="btnAjudaListBox" runat="server" alt="Ajuda" src="../../Imagens/btn-ajudar.png" />
                            <telerik:RadToolTip ID="RadToolTip1" runat="server" AnimationDuration="0" AutoCloseDelay="0"
                                Position="MiddleRight" RelativeTo="Element" ShowCallout="False" ShowDelay="0"
                                ShowEvent="OnClick" Skin="Hay" TargetControlID="btnAjudaListBox" Text="Para inclusão de um distribuidor no processo de looping, selecione-o na <br /> lista de Distribuidores de Preferência e arraste para a lista de Distribuidores <br /> Selecionados, ou pressione o botão adicionar.">
                            </telerik:RadToolTip>
                        </div>
                        <div class="esq larg300" style="padding-left: 10px">
                            <div style="background-color: #3C49A5; width: 300px; height: 20px;">
                                <div style="padding-top: 4px; text-align: center; color: White; height: 20px;">
                                    Distribuidores Selecionados
                                </div>
                            </div>
                            <telerik:RadListBox ID="RadListBox2" runat="server" Width="300px" Height="150px"
                                SelectionMode="Multiple" AllowReorder="true"
                                EnableDragAndDrop="true" PersistClientChanges="true" AutoPostBackOnReorder="true" CssClass="RadListBox">
                                <ButtonSettings ShowTransferAll="false" ShowReorder="false" VerticalAlign="Middle"
                                    AreaWidth="50px" />
                            </telerik:RadListBox>
                        </div>
                        <div class="esq alt150" style="text-align: center; padding-left: 10px;">
                            <div class="marginTop47">
                                <asp:ImageButton ID="btnParaCima" ImageUrl="~/Imagens/btn-Up.png" runat="server"
                                    OnClientClick="return reorderUp()" ToolTip="Mover para Cima" />
                            </div>
                            <div>
                                <asp:ImageButton ID="btnParaBaixo" ImageUrl="~/Imagens/btn-Down.png" runat="server"
                                    OnClientClick="return reorderDown()" ToolTip="Mover para Baixo" />
                            </div>
                        </div>
                    </div>
                </asp:Panel>
                <div style="clear: both;">
                </div>
                <asp:Panel ID="pnlDistribuidorVisualizacao" runat="server" Visible="false">
                    <div class="esq larg300" style="padding-left: 200px">
                        <div style="background-color: #3C49A5; width: 300px; height: 20px;">
                            <div style="padding-top: 4px; text-align: center; color: White; height: 20px;">
                                Distribuidores Selecionados
                            </div>
                        </div>
                        <telerik:RadListBox ID="RadListBoxVisualizacao" runat="server" Width="300px" SelectionMode="Single"
                            AllowReorder="false" AutoPostBackOnReorder="true" EnableDragAndDrop="false" CssClass="RadListBox">
                            <ButtonSettings ShowTransferAll="false" ShowReorder="false" ShowDelete="false" ShowTransfer="false"
                                VerticalAlign="Middle" AreaWidth="50px" />
                        </telerik:RadListBox>
                    </div>
                </asp:Panel>
                <div style="clear: both;">
                </div>
                <br />
                <div>
                    <div align="center">
                        <asp:Label ID="label3" runat="server" Text="Forma de Pagamento" Font-Underline="true"
                            Font-Bold="true"></asp:Label>
                    </div>
                    <div align="center" class="alinhaDivPrazoPagamento">
                        <asp:RadioButtonList ID="rblPrazo" runat="server" CssClass="Formulario" Height="12px"
                            RepeatDirection="Horizontal" Width="184px" BorderStyle="None" CausesValidation="True"
                            Visible="true">
                            <asp:ListItem Value="1">À vista</asp:ListItem>
                            <asp:ListItem Value="2">A prazo</asp:ListItem>
                        </asp:RadioButtonList>
                    </div>
                </div>
            </plk:Formulario>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnVisualizar" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnCorrigir" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>

and here its the javascript for the buttons, well, the buttons to the left and right has the same problem, so i took out the return false, making a postback doing the work correctly... well.. unfortunely it blinks the page.... but its fast...

function transferRight() {
                var listBox = $find("<%= RadListBox1.ClientID %>");
 
                var selectedItem = listBox.get_selectedItems();
                if (selectedItem == null) {
                    alert("É necessário selecionar um item primeiro.");
                    return false;
                }
 
                listBox.transferToDestination(selectedItem);
            }
 
            function transferLeft() {
                var listBox = $find("<%= RadListBox1.ClientID %>");
                var listBox2 = listBox.get_transferTo();
                var selectedItem = listBox2.get_selectedItems();
                if (selectedItem == null) {
                    alert("É necessário selecionar um item primeiro.");
                    return false;
                }
 
                listBox.transferFromDestination(selectedItem);
            }


hope u guys help me....  thx in advance ^^
Bozhidar
Telerik team
 answered on 09 Feb 2012
1 answer
73 views

Hello everybody,

I am using a radwindow  that will be opened from my radGrid through some JavaScript code,

<script type="text/javascript">

            function ShowEditForm(id, rowIndex) {

                var grid = $find("<%= RadGrid1.ClientID %>");

 

                var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();

                grid.get_masterTableView().selectItem(rowControl, true);

 

                window.radopen("EditFormCS.aspx?PanelId=" + id, "UserListDialog");

                return false;

            }

            function ShowInsertForm() {

                window.radopen("EditFormCS.aspx", "UserListDialog");

                return false;

            }

            function refreshGrid(arg) {

                if (!arg) {

                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");

                }

                else {

                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");

                }

            }

            function RowDblClick(sender, eventArgs) {

                window.radopen("EditFormCS.aspx?PanelId=" + eventArgs.getDataKeyValue("PanelId"), "UserListDialog");

            }

        </script>

 

After a while it enconcuter an error when I am trying to open the radwindow, and it seems that it never free the resources(memory)  after I close

the radwindow.I have read so many posts and none  of them come to solve the problem.

For   instance I used Garbage collector to free the resource but it dosnt work.I restart

 The Server(Immagin how terrible is  it when so many Users are connected )and it is ok until it take whole the memory again.

The structur is :

Myfolder :

                myPage(RaddGrid is in this page and radwindow will be opened  through a link insid the Grid)

                EditForm(content of radwinow)

 

And in EditForm after user Submit  it will close the radwindow

<script type="text/javascript">

            function CloseAndRebind(args) {

                GetRadWindow().BrowserWindow.refreshGrid(args);

                GetRadWindow().close();

            }

 

            function GetRadWindow() {

                var oWindow = null;

                if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog

                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)

 

                return oWindow;

            }

 

            function CancelEdit() {

                GetRadWindow().close();

            }

            function onError(input, args) {

                var message = "Invalid character: ";

 

                message += "accepts only numberic values.";

                document.getElementById("numInput").innerHTML = args.get_inputText();

                document.getElementById("numErrorOut").innerHTML = message;

            }

            function onKeyPress(input, args) {

 

                document.getElementById("numInput").innerHTML = "";

                document.getElementById("numErrorOut").innerHTML = "";

 

            }

            function Close() {

                GetRadWindow().Close();

            }

        </script>

And my GC is in the submit event :

  GC.Collect();

        GC.WaitForPendingFinalizers();

        GC.Collect();

 

Marin Bratanov
Telerik team
 answered on 09 Feb 2012
1 answer
149 views
Hi,

I want to create a Grid like this, but without fix encoded SQL Statements.

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx

Is it possible to make it with a objectDataSource? Finally I want to give after a SelectMethod, UpdateMethod, and DeleteMethod.
This methods are then in my code behind. Is there a sample exactly for this question?

Regards and Thanks

Princy
Top achievements
Rank 2
 answered on 09 Feb 2012
2 answers
496 views
i am using radwindow in user control which should open on click of button, if i use opernerElementID it does not open, if i use javascript
it does not show the controls which are to be inside rad window here is code

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GridColumnSelector.ascx.cs" Inherits="GCSTestApplication.Controls.GridColumnSelector" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<script type="text/javascript">
    function showWin() {
 
        var rwManager = $find("<%= rWindow.ClientID %>");
        rwManager.show();
        return false;
    }
</script>
<telerik:RadButton ID="btnShowMenu" OnClientClicked="showWin" AutoPostBack="false" runat="server" Text="Show ">
</telerik:RadButton>
 
<telerik:RadWindowManager Behaviors="Close"  ID="rwm" runat="server">
<Windows>
<telerik:RadWindow ID="rWindow" ClientIDMode="Static" Title="Save layout" runat="server" Modal="true" Height="200" Width="400">
    <ContentTemplate>
        <asp:Label ID="Label1" runat="server" Text="Show some text" />
    </ContentTemplate>
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
please help me
Toad
Top achievements
Rank 1
 answered on 09 Feb 2012
1 answer
47 views
Hello.

I am use Sheduler control and i have a problem.

In then calendar in the monthview i can see event but i cant see all name of one event.

I need display all name in of event in the Sheduler monthview without use tolltip.
Thnaks

 
Plamen
Telerik team
 answered on 09 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?