Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
133 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
154 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
120 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
118 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
2 answers
107 views
..
Tan
Top achievements
Rank 1
 answered on 16 Feb 2012
1 answer
119 views
hi can i Design RadMenu look like radmenu.jpg
if can't pls tell me how do i apply RadMenu skin to html table or div
and i try to set height of RadMenu to 33px but nothing happened pls tell me how to change the Radmenu height
Princy
Top achievements
Rank 2
 answered on 16 Feb 2012
1 answer
135 views
Hi,

 I have a ComboBox  with checkbox's in RadGrid.
By default, the Button is disabled and should be enabled using javascript.

I could get the reference to the Combobox but not hte Button inside Footer.

Any suggestions??

This is how i got the reference to Combobox..
var cmb = $find('<%# ((GridItem)Container).FindControl("rcbMyCombo").ClientID %>');
Princy
Top achievements
Rank 2
 answered on 16 Feb 2012
1 answer
126 views
I was looking to apply the metro style skin for radwindow same as provided in 
http://demos.telerik.com/aspnet-ajax/window/examples/default/defaultcs.aspx    (Select metro skin)

It has nice titlebar with not left right and bottom thick borders. 

I downloaded the metro style for that and got that skin into the project.
To remove the left and right thick borders i overrided the following styles in Window.Metro.css file

.RadWindow_Metro .rwCorner .rwBodyLeft, 
.RadWindow_Metro .rwCorner .rwBodyRight
{
width: 1px;
display:none;
background-color:Red;
}

but without any effect, the thick borders still stay.

Can you please provide me with the style to get the same metro look available in the demos for radwindow?

mirang
Top achievements
Rank 1
 answered on 16 Feb 2012
1 answer
85 views
Hi,

I have filters in radgird. When i click on filter option the text is not visible fully. Attached is screenshot.
i have used office2007 skin for radgrid

Regards,
Akki
Princy
Top achievements
Rank 2
 answered on 16 Feb 2012
3 answers
130 views
Hi,

I just want to scroll to a special position after the page include dock control posted back.
I have read the article http://www.telerik.com/help/aspnet-ajax/grid-scroll-to-selected-item.html. But I stil have no idea how to find scroll area of a dock control.

For an example,  when i scroll to the bottom item of the RadListView, and click it, the page will reload and the scrollbar for dock control will go back to top. How can I let it scrolling to the selected item? 

       
<telerik:RadDock ID="RadDock2" runat="server" Skin="Black" Height="300px" Width="200px"
    DockMode="Docked">
    <ContentTemplate>
        <telerik:RadListView ID="RadListView1" runat="server" DataSourceID="SqlDataSource1"
            ItemPlaceholderID="SubsystemContainer" Skin="Black">
            <LayoutTemplate>
                <asp:placeholder id="SubsystemContainer" runat="server" />
            </LayoutTemplate>
            <ItemTemplate>
                <table>
                    <tr>
                        <td style="width: 100%; width: 150px; height: 45px;">
                            <asp:linkbutton id="LinkButton1" runat="server" commandname="Select">
                            <div>
                            <asp:Label ID="Label8" runat="server" Text='<%# Bind("CSNAME") %>'/>
                            </div>
                            </asp:linkbutton>
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
        </telerik:RadListView>
        <asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="" selectcommand="">
</asp:sqldatasource>
    </ContentTemplate>
</telerik:RadDock>


Any comment is appriciated. Thanks.
Charles
Top achievements
Rank 1
 answered on 16 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?