Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
96 views
Hi,

I see a few posts here on the slider.repaint(); and RadSlider1.ClientID as a possible fix.  We implemented this in order to allow a div/modal to appear without reloading the whole page.  No joy.

Here's the code:
function ShowDiv() {
                            var MainSearchDivID = '<%=MainSearchDiv.ClientID %>';
                            var MainD = document.getElementById(MainSearchDivID);
                            MainD.style.display = "block";

                            var btnShowDivID = '<%=btnShowDiv.ClientID %>';
                            var btnHideDivID = '<%=btnHideDiv.ClientID %>';

                            var btnShow = document.getElementById(btnShowDivID);
                            var btnHide = document.getElementById(btnHideDivID);

                            btnShow.style.display = "none";
                            btnHide.style.display = "block";
                            var slider = $find("<%= RadSlider1.ClientID %>");

                            slider.repaint();
                            return false;

                        }

We add the ShowDiv on the link which opens the div and yet the first panel shows nothing with the slider.  The slider uses letters a through z.  When you click 'b' you'll see the values associated with letter b and when you select a, you'll see the values associated with letter a.  It is as if the radslider1.clientid isn't recognized and that's why the results aren't populating.

Before my forehead finds the keyboard one more time...thoughts?   What are we missing.
Svetlina Anati
Telerik team
 answered on 16 Feb 2012
3 answers
210 views
I am creating a keyboard shortcuts for various actions on a page that uses the Telerik toolbar. In particular, I want Ctrl+S to save the inputted form info. There is already a Save button on our toolbar, so we want to just use a script to generate a click on that button rather than reconstruct the POST manually (which would be quite complicated). I am using John Resig's jQuery hotkey plugin, which is what is handling the bind statement. In all browsers, the selection of the Save button element or any of the related divs works.

The click registers perfectly in Firefox and IE9, but in Chrome the click does not work at all. Why might this be? The actual code is within a product that I can't really replicate here, but I've made a dummy page to the same effect. Here are the relevant snippets:

JS:
(function($) {
    $(document).ready(function() {
        $(document).bind('keydown', 'ctrl+s', function() {
        $("div#RadToolBar .rtbOut").click();
            return false;
        });
    });
})(jQuery);

ASPX:
<div class="save-button">
<telerik:radtoolbar id="radToolBar" runat="server" cssclass="toolbar">
  <items>
    <telerik:radtoolbarbutton navigateurl="~/default.aspx" postback="false" text="Goto Default Page" causesvalidation="false"/>
  </items>
</telerik:radtoolbar>
</
div>
Dimitar Terziev
Telerik team
 answered on 16 Feb 2012
3 answers
120 views

Why does my horizontal and vertical menus which use a background image and are totally controlled by the CSS settings work fine in IE 8, and Firefox and Safari

While in Chrome there is no images, no text formatting - just blue underlined links?  The sub menus do slide in and out but they are also just boring blue links?

Where do I hit Chrome to make it behave like the others?

Kate
Telerik team
 answered on 16 Feb 2012
1 answer
239 views
I am trying to access datakeyvalue in itemdatabound event of inner grid.This is code I am trying.
aspx;
<telerik:RadGrid runat="server" ID="RadGrid1" AutoGenerateColumns="true"
            DataSourceID="SqlDataSource1" AllowSorting="true" OnItemDataBound="RadGrid1_ItemDataBound"
            OnItemCreated="RadGrid1_ItemCreated">
<MasterTableView DataKeyNames="Storename" CommandItemDisplay="Top">
               
                <NestedViewSettings DataSourceID="SqlDataSource2">
                    <ParentTableRelation>
                        <telerik:GridRelationFields MasterKeyField="CustomerID" DetailKeyField="CustomerID" />
                    </ParentTableRelation>
                </NestedViewSettings>
                <NestedViewTemplate>
<telerik:RadGrid runat="server" ID="RadGrid2" DataSourceID="SqlDataSource2" OnItemDataBound="RadGrid2_ItemDataBound"
                            AllowSorting="true" AutoGenerateColumns="false">
                            <MasterTableView DataKeyNames="Orders" >
</MasterTableView>
                        </telerik:RadGrid>
                    
                </NestedViewTemplate>
 </telerik:RadGrid>
Shinu
Top achievements
Rank 2
 answered on 16 Feb 2012
2 answers
103 views

i have a slider without items. i want to create items manually and set selected style bold. 
is it possible?

regards

Ömer
Slav
Telerik team
 answered on 16 Feb 2012
6 answers
178 views

Hi,

I am debugging a lot the last days and I was wondering if it's normal that VS2010 get flooded by script blocks.
Just run the following markup without any code behind in debug and watch your project-explorer.
After a few seconds the view is flooded with script blocks ... it seems that the same script blocks from the controls get registered again on every ajax request. Is there a way to prevent that ?
My VS 2010 sometimes needs 2 minutes to stop debugging and I can watch it removing the script blocks which is a real pain in the a..

<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Timer1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="grid1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<asp:Timer ID="Timer1" runat="server" Enabled="true" Interval="1000">
</asp:Timer>   
<div>
    <telerik:radgrid ID="grid1" runat="server"></telerik:radgrid>
</div>
</form>

 

Frans
Top achievements
Rank 1
 answered on 16 Feb 2012
3 answers
181 views
I am using the ItemCreated event to retrieve a logo from the database for any items that are added to it.  The code also updates a "Point Total" for the items in the ListBox once the new item has been created.  This all is working fine.

However when I step through the code I find that the ItemCreated method is getting called for all existing items in the ListBox as well as the newly added one.  To make it worse it seems the ItemCreated method is called for every existing item in the ListBox whenever the SelectedIndexChanged event is raised as well.  Is this normal behaviour?

Here is my ItemCreated code snippet:

protected void listEntity_ItemCreated(object sender, RadListBoxItemEventArgs e)
        {
            RadListBox listBox = (RadListBox)sender;
 
            RadListBoxItem item = e.Item;
 
            LMEntityEntity entity = new LMEntityEntity(int.Parse(item.Value));
 
            RadBinaryImage entityLogo = (RadBinaryImage)item.FindControl("entityLogo");
            if (entity.Logo.Length > 0)
                entityLogo.DataValue = entity.Logo;
            else
                entityLogo.ImageUrl = "~/images/faction-icons/" + _factionName.ToLower() + ".jpg";
            item.DataBind();
 
            UpdatePointTotal(listBox);
        }

And here is my ListBox declaration in the HTML:

<telerik:RadListBox ID="upgradesListBox" runat="server" width="400px" DataKeyField="LMEntityIdChild"
                                Height="170px" CssClass="list-box" Skin="Black" AllowDelete="False" DataValueField="LMEntityIdChild"
                                AllowTransfer="True" TransferToID="listEntityListBox"
                                AutoPostBack="false" AllowReorder="False"
                                onitemdatabound="upgrades_ItemDataBound" AllowTransferDuplicates="True"
                                AllowTransferOnDoubleClick="True" AutoPostBackOnTransfer="True"
                                ontransferring="upgrades_Transferring" TransferMode="Copy">
                                <ItemTemplate>
                                    <telerik:RadBinaryImage id="logoImage" runat="server" CssClass="list-box-icon"
                                        DataValue='<%# (int)(Eval("LMEntity.Logo.Length"))>0?Eval("LMEntity.Logo"):null %>' height="20px" ResizeMode="Fit" width="20px" />
                                    <span class="list-box-text"><asp:Label ID="itemLabel" runat="server"></asp:Label></span>
                                </ItemTemplate>               
                                <ButtonSettings ShowTransferAll="False" TransferButtons="TransferFrom" />
                            </telerik:RadListBox>

Regards,
Andrew
Peter Filipov
Telerik team
 answered on 16 Feb 2012
7 answers
171 views
Hello,

I've a strange issue. I'm using a radGrid with editForm for editing and updating my records.
I've (single) row-selection enable and also keyboard support enabled.
In my EditForm I've placed a RadDatePicker. When records exists and I'm pressing the <DEL> / Delete button  (on the keyboard) in the RadDatePicker Input field, to delete f.e. the date value, than the Delete Command on the grid is fired and the focused/selected record in the grid is deleted. I only expected the RadDatePicker Input Field to remove a character.

Is this normal behaviour?

Regards,
  JosM
RvdGrint
Top achievements
Rank 1
 answered on 16 Feb 2012
1 answer
130 views
Hi, I'm not sure if anyone else is having this problem, but when I install the Telerik RadControls for ASP.NET AJAX Q2 2011 SP1 it doesn't install any Telerik project templates for visual studio 2011 Developer Preview.

Is there any way to install these templates for VS2011 Developer Preview?


 
Biliana Ficheva
Telerik team
 answered on 16 Feb 2012
2 answers
130 views
HI there,
How to restrict the postback when we click upper arrow in the numeric textbox after reaching the maxvalue?? or Is it possible to disable the upper arrow after reaching maxvalue.??..I am aware of textbox doesn't allow the value that exceeding maxvalue.
Here is my code ,
<telerik:RadNumericTextBox ID="tbDays" AutoPostBack="true"  MaxValue="50"
        runat="server" ontextchanged="tbDays_TextChanged">
        <NumberFormat DecimalDigits="0" />
    </telerik:RadNumericTextBox>
On server side:
protected void tbDays_TextChanged(object sender, EventArgs e)
    {
       int itemCount = int.Parse(tbDays.Text);
       ///Doing Some stuff..
    }
Thanks in advance..
suresh
Top achievements
Rank 1
 answered on 16 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?