Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
94 views
Hi All

I currenly have a Row click event that recognized if a certain cell has been clicked, the Javascript then opens a window and passes certain values to the window from the row.
I want to pass some values from Hidden columns however i cannot get the value unless the column is either visible or display = false,
If i set the display to False this then completely confuses the Row Click event, So i have set the columns to zero width to overcome the problem.

However i would really like to hide these columns, so my question: is there "Any" way using java to get the cell value if the associated column is hidden?

Many Thanks

Regards

Darren
Pavlina
Telerik team
 answered on 09 Feb 2012
4 answers
183 views
Hello,

I have to create a custom menu in sitefinity that must match & respect my design 100%. Unfortunately, I couldn't find any tutorial that shows step by step what i have to do. As far as i've seen there is a Navigation control that allows you to customize your menu by giving a css file or a template. In traditional html/css sites i would crop my buttons from the design and would integrate them in the design with an <a href=""><img src=""></a>.
How should i do it?
Another problem i am dealing with is that i have to create a multi language website. So i would use the Language Selector control. Can i use it and have different content in the pages? For instance in the English Language page, i would have 4 columns in a widget, and in the German Language page i would have only 3 columns, and different pictures, content, etc?
Please give me some hints, tutorials or anything that could put me on track.
Thanks.

Edit: I am not interested in drop-down menus, i want a simple linear menu. I tryed the navigator control and it generated me only one button, because i am working on the home page template. Should i create the whole structure of the website and then create the menu? This way sitefinity will generate all the buttons for all the pages?
Thanks
Jen Peleva
Telerik team
 answered on 09 Feb 2012
2 answers
293 views
How to remove the tooltip from RadCaptch Refresh Button as it is showing the Path of the image. Attached screenshot.
Also let us know if we need any custom tooltip how to set for Captch Refresh Button.
Slav
Telerik team
 answered on 09 Feb 2012
2 answers
215 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
134 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
83 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
199 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
171 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
89 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
47 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
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?