Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
168 views
I am creating the context menu for a Treeview Node using Javascript on the client side. I need to set the access key for the menu items but I have not been able to find a client side method to do that. I will appreciate if you could please guide me.

Thanks
Som

Veselin Vasilev
Telerik team
 answered on 27 Nov 2008
1 answer
105 views
How can I get the splitter to not behav like a frame?
When I use the following code, it appears nice.

When I add a bunch content, to the RadPane2 I get vertical scrollbars.

I would like for it to size automatically to the content within

 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>  
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="rad" %>  
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
    <title>Untitled Page</title>  
    <style type="text/css">  
    html, body, form  
    {  
        height: 100%;  
        overflow: hidden;  
        margin: 0px;  
        padding: 0px;  
    }  
    </style>  
</head>  
<body>  
    <form id="form1" runat="server">  
        <div id="header" style="height:100px;background-color:Gray;">Header</div>  
    <rad:radscriptmanager runat="server"></rad:radscriptmanager>  
        <rad:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%" 
            HeightOffset="200">  
            <rad:RadPane ID="SideNav" runat="server" width="180" MinWidth="180"></rad:RadPane>  
            <rad:RadSplitBar id="VerticalSplitBar" runat="server" CollapseMode="Forward"  />  
            <rad:RadPane ID="RadPane2" runat="server">            
                
            </rad:RadPane>  
        </rad:RadSplitter>  
        <div id="footer" style="height:100px;background-color:Gray;">Footer</div>  
    </form>      
</body>  
</html> 

Tsvetie
Telerik team
 answered on 27 Nov 2008
1 answer
150 views
Hi,

I would like to get some feedback on the recommended way to disable MarkFirstMatch through Javascript. 

My situation is this:  I have a load-on-demand combo box  MarkFirstMatch = true to allow the users to have autocomplete capability.  However, the combo itself will allow custom text.  We just ran into a situation where the user attempted to enter an item that begins with the same letters as an existing item, but the combo would not allow the text truncation.  For example, the combo has "Principal Software Developer", but the user just wanted to enter "Principal", and the combo box would automatically complete with "Software Developer".   Pressing backspace would delete the "Software Developer" only temporarily, and it would re-appear as you navigated to another control. 

Anyway, I fixed it by adding the following javascript code in the OnKeyPressing event of the combo box:
        function rdlKeyPressing(sender, eventArgs) {  
            if (eventArgs.get_domEvent().keyCode == 8) {  
                sender._markFirstMatch = false//This allows users to enter values not in combo, but shortened versions of existing items.  
            } else {  
                sender._markFirstMatch = true;  
            }  
        }  
 
(Note: In the above code block, "markFirstMatch" begins with underscore)

The above code traps the backspace key, and when pressed, disables the MarkFirstMatch property of the calling combo box.  If the user starts to type anything else, it turns it back on. 

This seems to work fine, but I am a little uneasy relying on an undocumented javascript property.  Is there a better way to do this?

Thanks,

 --Brad
Veselin Vasilev
Telerik team
 answered on 27 Nov 2008
1 answer
68 views
Hi,
We are using telerik tabstrip and rad combo with load on demand. Its working fine with all other browsers as well as version 3 of safari, but we are getting the following errors with safari 2.

With rad tabstrip.

undefined value
at
var _13f=_13e.split("");

With rad combo
value is not object
at
Array.prototype.isprototypeof

Are there are known issues of rad controls with safari two and could you please help as to overcome them? We need to support safari and currently our site is on hold for deployment just because of these two blocking issues.

Thanks in advance for your help.
Best regards,
Khurram Shehzad
Helen
Telerik team
 answered on 27 Nov 2008
3 answers
228 views
I am trying to open a menu from the onClick event of a A-link.

I use this function

function

openRadMenu(menuId)

 

{

 

 

var oRadMenu = $find(menuId);

 

 

oRadMenu.get_items().getItem(0).click();

 

}

The menu opens but it is closed again at once. It does not stay open.

The menu looks like this:

 

 

</a>

 

 

 

 

 

<telerik:RadMenu ClickToOpen ="true" ID="RadMenu1" runat="server" Skin="Office2007" EnableEmbeddedSkins ="true" >

 

 

 

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

 

 

 

<Items>

 

 

 

 

 

 

<telerik:RadMenuItem text="Apa">

 

 

 

 

 

 

<Items>

 

 

 

 

 

<telerik:RadMenuItem Text="Mission Statement">

 

 

 

 

 

</telerik:RadMenuItem>

 

 

 

 

 

<telerik:RadMenuItem Text="Strategic Plan">

 

 

 

 

 

</telerik:RadMenuItem>

 

 

 

 

</Items>

 

 

 

 

 

</telerik:RadMenuItem>

 

 

 

 

 

</Items>

 

 

</telerik:RadMenu>

I have also tried with oRadMenu.get_items().getItem(0).click();

 

Paul
Telerik team
 answered on 27 Nov 2008
3 answers
159 views
I'm using the grid in a ASP.NET MVC application and though I've followed the example on scrolling ... the header row does not scroll.  I've tested this is IE7 and Firefox ... same behavior in both.  The data scrolls horizontally but the headers do not.  I've tried all kinds of things to get it to properly scroll to no avail.

Code:

<telerik:RadGrid ID="RadGrid1" AllowPaging="true" AllowSorting="true" runat="server"
                ShowStatusBar="true" ShowFooter="True" GridLines="None" Width="900px"
                AutoGenerateColumns="false" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true">
                <MasterTableView DataKeyNames="ID" EditMode="InPlace" CommandItemDisplay="Top" Width="99%" >
                    <HeaderStyle Width="200px" />

...

<ClientSettings>
                    <Scrolling AllowScroll="true" UseStaticHeaders="true"   />
                </ClientSettings>
            </telerik:RadGrid>



Vlad
Telerik team
 answered on 27 Nov 2008
3 answers
133 views

Below is my grid, I don't know why the server event "onselectedindexchanged" does not fired when I click a row. Thanks.


<telerik:RadGrid ID="tblSpDetl" runat="server" AutoGenerateColumns="False" GridLines="None"
                                             Skin="WebBlue" Width="100%" AllowPaging="True" AllowSorting="True"
                                             BorderColor="#6699FF" BorderStyle="None" BorderWidth="1px" onselectedindexchanged="tblSpDetl_SelectedIndexChanged" >
                                
                                 <SelectedItemStyle BackColor="#99CCFF" />    
                           
                                 <ClientSettings>
                                               <Selecting AllowRowSelect="True" />
                                               <ClientEvents OnRowClick="Row_Single_Click"  />                                       
                                               <Scrolling AllowScroll="True" ScrollHeight="100px" SaveScrollPosition="False"></Scrolling> 
                                 </ClientSettings>  
                               
                                <MasterTableView CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst"
                                                 Dir="LTR" Frame="Border" TableLayout="Auto" Width="98%"    
                                                 ClientDataKeyNames="CUST_NAME, CUST_TYPE, FLAT, FLOOR, POS, BLK, CUST_TYPE, MAJOR_INST, PHONE_NO, SN, REMARK"
                                                 AllowPaging="False" 
                                 onselectedindexchanged="tblSpDetl_SelectedIndexChanged" >
                                                                  
                                    <RowIndicatorColumn>
                                        <HeaderStyle Width="20px" />
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn>
                                        <HeaderStyle Width="20px" />
                                    </ExpandCollapseColumn>
                                                                  
                                    <Columns>
                                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                                                                ForceExtractValue="None" HeaderText="Name" UniqueName="CUST_NAME"
                                                                DataField="CUST_NAME">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                                                                 ForceExtractValue="None" HeaderText="Special Customer Type"
                                                                 UniqueName="CUST_TYPE" DataField="CUST_TYPE">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                                                                 ForceExtractValue="None" HeaderText="Flat"
                                                                 UniqueName="FLAT" DataField="FLAT" Visible="false">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                                                                 ForceExtractValue="None" HeaderText="Floor"
                                                                 UniqueName="FLO0R" DataField="FLOOR" Visible="false">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                                                                 ForceExtractValue="None" HeaderText="Pos"
                                                                 UniqueName="POS" DataField="POS" Visible="false">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                                                                 ForceExtractValue="None" HeaderText="Blk"
                                                                 UniqueName="BLK" DataField="BLK" Visible="false">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                                                                 ForceExtractValue="None" HeaderText="Cust. Type"
                                                                 UniqueName="CUST_TYPE" DataField="CUST_TYPE" Visible="false">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                                                                 ForceExtractValue="None" HeaderText="Major Inst"
                                                                 UniqueName="MAJOR_INST" DataField="MAJOR_INST" Visible="false">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                                                                 ForceExtractValue="None" HeaderText="Phone No."
                                                                 UniqueName="PHONE_NO" DataField="PHONE_NO" Visible="false">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                                                                 ForceExtractValue="None" HeaderText="SN"
                                                                 UniqueName="SN" DataField="SN" Visible="false">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                                                                 ForceExtractValue="None" HeaderText="Remark"
                                                                 UniqueName="REMARK" DataField="REMARK" Visible="false">
                                        </telerik:GridBoundColumn>
                                    </Columns>

                                    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                                    <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False"
                                                 Font-Strikeout="False" Font-Underline="False" ForeColor="Black" Wrap="True" />
                                    <FooterStyle HorizontalAlign ="Left" /> 
                                </MasterTableView>
                                 <FilterMenu EnableTheming="True" Skin="WebBlue">
                                     <CollapseAnimation Duration="200" Type="OutQuint" />
                                 </FilterMenu>
                            </telerik:RadGrid>

Vlad
Telerik team
 answered on 27 Nov 2008
1 answer
129 views
Hello

I am using radgrid 5.1.2. I am binding the grid to a List(of Pair) objects. Here is the code to bind the grid

 

Dim stockList As List(Of Pair) = CType(Session("StockList"), List(Of Pair))

 

stockList.Insert(0,

 

 

 

 

New Pair(stockCode, stockType))

 

dgStock.DataSource = stockList

dgStock.DataBind()

I have checked that the stock list definitely has some items in it at this point. In the item data bound event however it is saying the data item is not set to an instance of an object. Here is the code

 

 

 

 

 

 

Protected Sub dgStock_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.WebControls.GridItemEventArgs) Handles dgStock.ItemDataBound

 

 

 

 

 

 

If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then

 

 

 

 

 

 

 Throw New Exception(e.Item.DataItem Is Nothing) <====says TRUE

 

 

 

 

 

 

 

 

 

 

 

 


At this point the dataItem object is nothing. I don't understand why this is. I tried the same thing using an array of string and the data item was still nothing.


Please can you helpme fix this
thanks

 

 

 

 

 

Vlad
Telerik team
 answered on 27 Nov 2008
1 answer
92 views
Hello,

How can I show the finger pointing representing clickable area in the grid.

Thank you
Princy
Top achievements
Rank 2
 answered on 27 Nov 2008
2 answers
145 views
I am using panel bar with 2 items. Each item has user controls.
First panel bar item has a user control with a radgridview.
Second panel bar item has a user control with a formveiw.
some of the control in Formview reads values from the radgridview.

when insert/update occur with the radgiridview in usercontrol that is in  Panelbaritem1,
I need to formveiw to be updated in usercontorl that is in Panelbaritem2.

Thanks for all your help.
fatma
Top achievements
Rank 1
 answered on 26 Nov 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?