Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
189 views
I'm trying to place a background image just under the last item of my sub-menu and its not really happening for me.  I've been trying for two days to get this working and have been pulling my hair out and can't quite work out where I'm going wrong.

I used the CssBlue skin as a template to create my own skin.

The code for the menu item is:
<rad:RadMenu ID="RadMenu1" runat="server" Skin="Dest">  
            <Items> 
                <rad:RadMenuItem runat="server" NavigateUrl="/link/menu.aspx" Text="this is menu 1">  
                    <Items> 
                        <rad:RadMenuItem runat="server" Text="sub menu 1" NavigateUrl="/link/menu.aspx">  
                        </rad:RadMenuItem> 
                        <rad:RadMenuItem runat="server" Text="sub menu 2" NavigateUrl="/link/menu.aspx">  
                        </rad:RadMenuItem> 
                        <rad:RadMenuItem runat="server" Text="sub menu 3" NavigateUrl="/link/menu.aspx">  
                        </rad:RadMenuItem> 
                    </Items> 
                </rad:RadMenuItem> 
                <rad:RadMenuItem runat="server" NavigateUrl="/link/menu.aspx" Text="this is menu 2"></rad:RadMenuItem> 
                <rad:RadMenuItem runat="server" NavigateUrl="/link/menu.aspx" Text="this is menu 3"></rad:RadMenuItem> 
                <rad:RadMenuItem runat="server" NavigateUrl="/link/menu.aspx" Text="this is menu 4"></rad:RadMenuItem> 
                <rad:RadMenuItem runat="server" NavigateUrl="/link/menu.aspx" Text="this is menu 5"></rad:RadMenuItem> 
                <rad:RadMenuItem runat="server" NavigateUrl="/link/menu.aspx" Text="this is menu 6"></rad:RadMenuItem> 
                <rad:RadMenuItem runat="server" NavigateUrl="/link/menu.aspx" Text="this is menu 7"></rad:RadMenuItem> 
                <rad:RadMenuItem runat="server" NavigateUrl="/link/menu.aspx" Text="this is menu 8"></rad:RadMenuItem> 
            </Items> 
        </rad:RadMenu> 
This is the code for the last item style:
.RadMenu_Dest .item .last  
{  
    background: transparent url('img/menucorner.gif') no-repeat;   
    background-position: 0px 10px;  
} 
Is this the right style class I should be using?  It doesn't seem to be appearing at all and changing the background position doesn't seem to help either.  Any help appreciated.
Ryan Mariotti
Top achievements
Rank 1
 answered on 06 Apr 2010
6 answers
195 views
Hi,
I am getting the infamous error creating control in the design view of VS 2008 SP1. I was using radGrid control.

I have copied the telerik.web.dll to the following locations

1.[Visual_Studio_Install_Dir]\Common7\IDE\
2.[Visual_Studio_Install_Dir]\Common7\IDE\Public Assemblies
3.[Visual_Studio_Install_Dir]\Common7\IDE\Private Assemblies
4.GAC

I have cleared c:\Users\John\AppData\Local\Microsoft\VisualStudio\9.0\ProjectAssemblies

My OS is  Windows Vista 32bit

Please tell me a way to solve this issue.

Regards,
John
Erjan Gavalji
Telerik team
 answered on 06 Apr 2010
4 answers
109 views
Hello -

I have an issue where I have a ListBox with 4 items in it, ordered Item 1, Item 2, Item 3, Item 4.  When I select Item 2 and drag to infront of Item 1, my code on the postback doesn't seem to register the reorder. Although the event is firing, the code is getting data that in the ItemCollection that resembles the original list.

So just for fun, I turned on the button and tried it.  In this case, everything works. 

So I trace through both approaches, and the Sender object I pass in is different in both cases.  The Selected item is Item 2 in both cases, but the Item collection from drag and drop is (1, 2, 3, 4) and the item collection from button up is (2, 1, 3, 4).  I have tried a variety of combinations and it always seems to follow the same way.

Even stranger, I do the same thing elsewhere on a different page, and it doesn't have this problem at all. 

As far as I can tell, all the setting on the two controls are the same.

Is there any known issue that might be causing this?  Is there anything you suggest we can try to do differently to sort it out?

Thanks-
P.J.
Simon
Telerik team
 answered on 06 Apr 2010
2 answers
183 views
Hello,

Newbie here working with the radgrid.
I have a grid on my page and there are 4 bound fields on it. I am using a sqldatasource to connect to the database.
One of the fields is a Datetime field. When inserting a record I want it to default to the current date.
I saw a property called defaultinsertvalue. I tried using <%=Now()%> or <%=Today()%> on this field but I keep getting an error about the value not being able to be converted to system.datetime.
I am using vb by the way,
Can someone guide me in the right direction to get this field autopopulated with the current date and time?

Thanks in advance.
Tom Edward
Top achievements
Rank 1
 answered on 06 Apr 2010
3 answers
261 views
I am trying to add TEXT with newline and spaces to the radEditor using VB.NET using the radEditor.Content property. But it seems to loose all the formatting made in the TEXT string.

Also I would like to know what method is recommended to call editor.set_html in VB.net. I guess that will solve my problem of formatting.

Thanks.
Rumen
Telerik team
 answered on 06 Apr 2010
1 answer
100 views
I am having trouble trying to do a crosspage postback when a user double clicks on a grid row. Using the example found at

http://www.telerik.com/support/kb/aspnet-ajax/grid/performing-postback-from-grid-client-events.aspx I did the following for my aspx page. I think the issue is using the ajax manager with the grid. I want the ajax manage for all the other events such as paging, sorting, etc., but not for the client double click which I want to do a full postback with a the postback url being another page.

   <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
        <script type="text/javascript">  
            function refreshGrid(arg) {  
                if (!arg) {  
                    $find("<%= ramCustomerProfileList.ClientID %>").ajaxRequest("Rebind");  
                }  
                else {  
                    $find("<%= ramCustomerProfileList.ClientID %>").ajaxRequest("RebindAndNavigate");  
                }  
            }  
 
            function rowDblClick(sender, eventArgs) {  
                aspnetForm.action = "CustomerProfile.aspx";  
                __doPostBack("<%= rgCustomerProfileList_CustomerProfiles.UniqueID %>", "RowDblClicked:" + eventArgs.get_itemIndexHierarchical());  
            }  
              
        </script> 
    </telerik:RadCodeBlock>   
 
<telerik:RadAjaxManager ID="ramCustomerProfileList" runat="server" OnAjaxRequest="ramCustomerProfileList_AjaxRequest">  
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="rgCustomerProfileList_CustomerProfiles">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="rgCustomerProfileList_CustomerProfiles" LoadingPanelID="ralpCustomerProfileList_LoadingPanel" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting>   
    </AjaxSettings> 
</telerik:RadAjaxManager> 
 
        <telerik:RadAjaxLoadingPanel ID="ralpCustomerProfileList_LoadingPanel" runat="server">  
        </telerik:RadAjaxLoadingPanel> 
    <telerik:RadGrid ID="rgCustomerProfileList_CustomerProfiles" runat="server"   
        AllowFilteringByColumn="True"   
        AllowPaging="True"   
        AllowSorting="True"   
        AutoGenerateColumns="False"   
        GridLines="None"   
        ShowGroupPanel="True" 
        OnNeedDataSource="rgCustomerProfileList_CustomerProfiles_NeedDataSource" 
        > 
<MasterTableView  
        DataKeyNames="CustomerId"   
        ClientDataKeyNames="CustomerId" 
        CommandItemDisplay="Top" 
        CommandItemSettings-ShowExportToCsvButton="true" 
        PageSize="20" 
        > 
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
 
<CommandItemSettings ShowExportToCsvButton="True"></CommandItemSettings> 
    <Columns> 
        <telerik:GridBoundColumn DataField="AccountName" HeaderText="Account Name"   
            UniqueName="AccountName">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn HeaderText="Parent Company" UniqueName="ParentCompany" DataField="ParentCompany.Name">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="AccountManagerName"   
            HeaderText="Account Manager" UniqueName="AccountManagerName">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="City" HeaderText="City" UniqueName="City">  
        </telerik:GridBoundColumn> 
    </Columns> 
   <CommandItemTemplate> 
    <asp:LinkButton ID="btnAddNewRecord" runat="server"   
           onclick="btnAddNewRecord_Click" PostBackUrl="~/CustomerProfile/CustomerProfile.aspx">&nbsp;<img src="../images/icons/add-16x20.gif" border="0" />&nbsp;Add New Record&nbsp;</a></asp:LinkButton>   
   </CommandItemTemplate> 
    <NoRecordsTemplate> 
    No Records      
    </NoRecordsTemplate> 
</MasterTableView> 
        <ClientSettings AllowDragToGroup="True" Resizing-AllowColumnResize="true">  
            <Selecting AllowRowSelect="True" /> 
            <Scrolling AllowScroll="True"   
            UseStaticHeaders="True" /> 
            <ClientEvents OnRowDblClick="rowDblClick" /> 
        </ClientSettings> 
      
      
    </telerik:RadGrid> 

 

Iana Tsolova
Telerik team
 answered on 06 Apr 2010
10 answers
260 views
Hi there

I have a grid which is bound client-side. The table contains about 10 columns of which some are fixed width and others aren't.
When I page through the grid everything works as expected until I reach the last page. Then the scrollbar disapears the headers are misaligned with the table content.
I found that calling grid.repaint() from the client when the data is bound fixes this problem for Internet Explorer 7 (haven't tried other versions), however, Firefox doesn't seem to care and the grid is misaligned until the scrollbar reapears (pushing the content back to place). The problem is a bit different in Google Chrome, but it's still an issue.

Is there any way to realign the headers programatically through script whenever a scrollbar (re)apears?
Nikolay Rusev
Telerik team
 answered on 06 Apr 2010
1 answer
158 views
Hi,

I have a load-on-demand combo box but have a problem where you can type something in the text field and even if what is typed does not match an item in the combobox, if you tab out, or click out of the control, the page posts back, the selected index changes and what was typed remains in the combobox text field.

I would like the behaviour of the control to not post back if what someone types does not match an item, but does post back if the item matches. I presume this is a client-side event I need to handle for this, but I would appreciate some help.

Thanks
Tom

Control:

<telerik:RadComboBox ID="ddlStudents" EnableViewState="false" runat="server" EnableVirtualScrolling="true"
                      ShowMoreResultsBox="true" EnableLoadOnDemand="true" OnItemsRequested="ddlStudents_ItemsRequested"
                       OnClientDropDownOpening="OnClientDropDownOpening" AutoPostBack="true" EnableItemCaching="true" HighlightTemplatedItems="true" EmptyMessage="Select a student or start typing their name" ExpandAnimation-Duration="150"
                       MarkFirstMatch="true" EnableTextSelection="true" IsCaseSensitive="false" CollapseAnimation-Duration="9" Skin="Default" DataValueField="StudentId"
                        DataTextField="CombinedName" ToolTip="Select a student from the drop down list or start typing their name/ID to return only those students matching your criteria."
                        OnSelectedIndexChanged="ddlStudents_SelectedIndexChanged" MaxHeight="250px" Width="100%">
Kalina
Telerik team
 answered on 06 Apr 2010
2 answers
139 views
Hi,

By now I'm grouping by expressions programmatically, what I want to do is to change the text displayed on the group header, I mean, I'm doing this:

Dim expression As GridGroupByExpression = GridGroupByExpression.Parse("PROJECT[Project ID] Group by PROJECT") 

so the result in the grid is like this: "Project ID: Project1" (being Project1 the field in the database), but what happen if the field of the database, PROJECT, is empty? the result will be: "Project ID: "; is there a way to write "Empty" instead of " "(blank)???...I don't want to modify the database.

Thanks in advance!
Dany V
Top achievements
Rank 1
 answered on 06 Apr 2010
2 answers
100 views
I have a radEditor on a web page. Unfortunately, the way the text is saved and interpreted by another site (beyond my control), requires a css class to control each of the the bullet types. So what I have done is created a custom function every time the ordered and unordered lists are created. The problem now is, when I hit the bullet button twice, it no longer takes away the list item, it adds another list.

            Telerik.Web.UI.Editor.CommandList["InsertUnorderedList"] = function(commandName, editor, args) { 
                var selection = editor.getSelection(); 
                var selectedHTML = selection.getHtml(); 
 
                editor.pasteHtml("<ul class=ulolProdDesc><li>" + selectedHTML + "</li></ul>"); 
            } 


Is there any way to grab the line of text the cursor is on when you hit the button on the tool bar? Or is there a better way to do this (maybe like limiting the amount of list items a list can have?). When I try to use createRestorePoint() I get an undefined error, even though I'm not sure I can use it anyway. Thanks for the help.
Alex
Top achievements
Rank 2
 answered on 06 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?