Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
174 views
Is there an easy way to determine when the mouse has completely left the menu?   The MouseOut event gets fired when moving from one menu item to the next, so the mouse may or may not have completely left the menu.  How can I determine for sure that the mouse isn't over the menu, or any child menus?

Thanks,
Brian
Brian Mila
Top achievements
Rank 1
 answered on 07 Feb 2010
1 answer
119 views
Here's the line of code:

<telerik:RadDateInput Label="Order Date:" width="700" ID="RadDateInput1"
DateFormat="MM/dd/yy" ForeColor="GrayText"
SelectedDate='<%#DateTime.Now%>'
runat=server /> 
 

When the control is rendered to the page.  The DateInput is empty.  I would expect it to be today's date. 

Ideas?

atk

Adam
Top achievements
Rank 1
 answered on 07 Feb 2010
7 answers
419 views
Hi

I am new to datepicker control. I am able to do all other operations with it. can any one tell me how to validate the content entered in it.
I want to associate a regular expression to it so that client side validation disable the postback till a valid value is entered. I don't want to use a required field validator as the field is not mandatory in my case.

Any pointers to this will be greately appreicated.
TonyG
Top achievements
Rank 1
 answered on 07 Feb 2010
2 answers
213 views
Hello,
I got an exception with Q3 2009 Chart Control, the exception is
The type 'Telerik.Charting.Styles.StyleLabel' exists in both c:\...\...\...\Telerik.Charting.DLL


I have cleaned the asp.net temp folders but the problem persisted, on the machine there is no Telerik Reporting installed.

This happens on two development machines so it is not a localized case.

What could the cause be, and what might the solution be.

Thanks,
Martin
Martin
Top achievements
Rank 1
 answered on 06 Feb 2010
6 answers
132 views
It doesn't seem to matter how I define AppointmentTemplate it always displays the same way. I suspect that it is something to do with the skin 'cos, as you will see from the screenshot (attached), the right HTML is being rendered...

Am I missing something?

--
Stuart
Stuart Hemming
Top achievements
Rank 2
 answered on 05 Feb 2010
2 answers
130 views
Hi, everybody

I have been working with Telerik controls since yestarday and they don´t work properly, they send me a message sometimes in design time, the message is: "Error rendering control. An unhandled exception has ocurred. Could not load file or assembly 'Telerik.Web.UI, Version=2009.3.1314.35, Culture=neutral' or one of its dependencies. The system cannot find the file espicified"

the background is: I have VS2008 and I work with Rad Control Ajax Q3 2009 SP2.
The files exist.
The first times I did a repair of files and it work properly, but now its don't work.

I will apreciate your help.
Edgar Treviño
Top achievements
Rank 1
 answered on 05 Feb 2010
4 answers
254 views

Folks,

I am trying to retain the values in a detail grid after a griddropdowncolumn event fire (selectedindexchanged event ). I am extracting the values (current cell values) of the grid in a session variable and changing some properties for a column depending on the selected value in dropdown in the selectedindexchanged event (then I am rebinding the grid to see the effects of changed properties). Then in grid prerender event I am trying to set the cell values from the session variable, Here comes the problem, I am unable to find the detail grid items to set the cell values.

I am binding the grid on the server (using needdatasource event and detailtablebind events).

For your reference, I have included my selectedindexchanged event and grid prerender events here

Private Sub List_SelectedIndexChanged(ByVal sender As ObjectByVal e As RadComboBoxSelectedIndexChangedEventArgs)  
 
            Dim editedItem As GridEditableItem = CType(CType(sender, RadComboBox).NamingContainer, GridEditableItem)  
            Dim ddlChsnMthd As RadComboBox = CType(editedItem("CHSN_MTHD_ID").Controls(0), RadComboBox)  
            Dim insertItem As GridDataItem = DirectCast(CType(sender, RadComboBox).NamingContainer, GridDataItem)  
            Dim insertVals As Hashtable = New Hashtable  
 
            RadGrid1.MasterTableView.ExtractValuesFromItem(insertVals, insertItem)  
            Session("insertvals") = insertVals  
 
            If ddlChsnMthd.SelectedValue = 4 Then 
                RadGrid1.MasterTableView.DetailTables.Item(0).Columns.Item(9).Visible = True 
            Else 
                RadGrid1.MasterTableView.DetailTables.Item(0).Columns.Item(9).Visible = False 
            End If 
 
            RadGrid1.MasterTableView.Rebind()  
 
End Sub

 

Protected Sub RadGrid1_PreRender(ByVal sender As ObjectByVal e As System.EventArgs) Handles RadGrid1.PreRender     
    
    
           If Not Session("insertvals"Is Nothing AndAlso RadGridTransCalc.MasterTableView.DetailTables.Item(0).IsItemInserted Then    
                Dim insertvals As Hashtable = CType(Session("insertvals"), Hashtable)     
                Dim insertItem As GridEditableItem = DirectCast(RadGridTransCalc.MasterTableView.DetailTables.Item(0).GetInsertItem(), GridEditableItem)     
                If Not insertvals("ID"Is Nothing Then TryCast(insertItem("ID").Controls(0), RadComboBox).SelectedValue = insertvals("ID")     
                If Not insertvals("CALC_DATE"Is Nothing Then TryCast(insertItem("CALC_DATE").Controls(0), RadDatePicker).SelectedDate = CDate(insertvals("CALC_DATE"))     
                If Not insertvals("STRT_TIME"Is Nothing Then TryCast(insertItem("STRT_TIME").Controls(0), RadTimePicker).SelectedDate = CDate(insertvals("STRT_TIME"))     
                If Not insertvals("END_TIME"Is Nothing Then TryCast(insertItem("END_TIME").Controls(0), RadTimePicker).SelectedDate = CDate(insertvals("END_TIME"))     
                If Not insertvals("COND_ID"Is Nothing Then TryCast(insertItem("COND_ID").Controls(0), RadComboBox).SelectedValue = insertvals("COND_ID")     
                If Not insertvals("MTHD_ID"Is Nothing Then TryCast(insertItem("MTHD_ID").Controls(0), RadComboBox).SelectedValue = insertvals("MTHD_ID")     
          End If    
 
End Sub   
 

Does anyone came across this scenario, please help.

Thanks,

Kevin

Kevin
Top achievements
Rank 1
 answered on 05 Feb 2010
1 answer
103 views
This is my first encounter with RadMenu, so I just copied directly from the online example and modified it to fit my column names:

<telerik:RadContextMenu ID="radContextMenu1" runat="server" Skin="Forest" OnClientItemClicked="ClientItemClicked">  
    <Items> 
        <telerik:RadMenuItem Text="Show Column">  
            <Items> 
                <telerik:RadMenuItem Text="MDEP" /> 
                <telerik:RadMenuItem Text="MDEP Description" /> 
                <telerik:RadMenuItem Text="OA" /> 
                <telerik:RadMenuItem Text="OA Description" /> 
                <telerik:RadMenuItem Text="EOR" /> 
                <telerik:RadMenuItem Text="EOR Description" /> 
                <telerik:RadMenuItem Text="ASN" /> 
                <telerik:RadMenuItem Text="ASN Description" /> 
                <telerik:RadMenuItem Text="APC" /> 
                <telerik:RadMenuItem Text="APC Description" /> 
                <telerik:RadMenuItem Text="FY06" /> 
                <telerik:RadMenuItem Text="FY07" /> 
                <telerik:RadMenuItem Text="FY08" /> 
                <telerik:RadMenuItem Text="FY09" /> 
            </Items> 
        </telerik:RadMenuItem>   
        <telerik:RadMenuItem Text="Hide Column" /> 
    </Items>   
    <Targets> 
        <telerik:ContextMenuTagNameTarget TagName="thead" /> 
    </Targets>   
</telerik:RadContextMenu>  

The menu pops up on right mouse-click populated with all the menu items.  When I click on a menu item the following javascript is invoked, again copied verbatum from the online example:

function ClientItemClicked( sender, eventArgs ) {  
    activeTable = $find( "<%= radGrid1.ClientID %>" ).get_masterTableView();  
    colIndex = GetRealCellIndex( activeTable, eventArgs.get_gridColumn().get_element());  
 
    switch( eventArgs.get_item().get_text() ) {  
        case "MDEP" :  
            activeTable.showColumn( 0 );  
            break;  
 
        case "MDEP Description" :  
            activeTable.showColumn( 1 );  
            break;  
 
        case "OA" :  
            activeTable.showColumn( 2 );  
            break;  
 
        case "OA Description" :  
            activeTable.showColumn( 3 );  
            break;  
 
        case "EOR" :  
            activeTable.showColumn( 4 );  
            break;  
 
        case "EOR Description":  
            activeTable.showColumn( 5 );  
            break;  
 
        case "ASN":  
            activeTable.showColumn( 6 );  
            break;  
 
        case "ASN Description":  
            activeTable.showColumn( 7 );  
            break;  
 
        case "APC":  
            activeTable.showColumn( 8 );  
            break;  
 
        case "APC Description":  
            activeTable.showColumn( 9 );  
            break;  
 
        case "FY06":  
            activeTable.showColumn( 10 );  
            break;  
 
        case "FY07":  
            activeTable.showColumn( 11 );  
            break;  
 
        case "FY08":  
            activeTable.showColumn( 12 );  
            break;  
 
        case "FY09":  
            activeTable.showColumn( 13 );  
            break;  
 
        case "Hide Column" :  
            activeTable.hideColumn( colIndex );  
            break;     
 
        default :  
            break;  
    }  

And no matter what menu item I click on a get a JavaScript "Property Not Supported" error.  The cause of this is apparently

                    colIndex = GetRealCellIndex( activeTable, eventArgs.get_gridColumn().get_element());


So I commented it out and then all I get is the [undefined] JavaScript error.

Can someone please give me a clue, because I obviously don't have one?

Thanks,
Mark
Mark Galbreath
Top achievements
Rank 2
 answered on 05 Feb 2010
7 answers
168 views

 

I have a combo box that I populate with with searchig a db once the user has typed at least two characters. How do I make sure that the user actually selects one of the returned items and doesn't simply type a few characters and move on? I need the value in the control to be one of the returned items whether the user types it all the way out or selects an option after the LoadOnDemand. Is there a property I am not using correctly or a client side script approach?

 

 <telerik:RadComboBox ID="cboAccounts" runat="server" Width="300" Font-Size="11px"
                        EnableLoadOnDemand="true" AllowCustomText="false" MarkFirstMatch="true" EnableTextSelection="true"
                        EmptyMessage="Search/Select an Account" IsCaseSensitive="false" EnableItemCaching="true"
                        LoadingMessage="Fetching matching items..." ShowDropDownOnTextboxClick="false"
                        Height="100" AutoPostBack="true" CausesValidation="false">
                        <ExpandAnimation Duration="200" />
                        <CollapseAnimation Duration="200" />
 </telerik:RadComboBox>
 <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="cboAccounts"
                        runat="server" ErrorMessage="*" CssClass="ErrorMsg"></asp:RequiredFieldValidator>

 

     Private Sub cboAccounts_ItemsRequested(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles cboAccounts.ItemsRequested

        If e.Text <> String.Empty And Len(e.Text) >= 2 Then
            Dim dtbl As DataTable = SearchAccounts("", e.Text, Url.GetPath(), ActiveUser.UserID)

            For Each row As DataRow In dtbl.Rows
                Dim item As New RadComboBoxItem(row("account_name").ToString() & " (" & row("account_type").ToString() & ")", row("account_no").ToString())
                cboAccounts.Items.Add(item)
            Next
        End If
    End Sub

    Private Function SearchAccounts(ByVal top As String, ByVal prefixText As String, ByVal path As String, ByVal user_id As String) As DataTable
        Dim dvw As DataTable

        With New VBDataLayer.SqlServer(conStr)
            .AddParameter("@top", top)
            .AddParameter("@prefixText", prefixText)
            .AddParameter("@path", path)
            .AddParameter("@user_id", user_id)
            .AddParameter("@version", CStr(Session("version")))
            dvw = .RunProc("wsp_web_Search_Accounts2", "Accounts").Tables(0)
        End With

        Return dvw
    End Function

 

 

 

Kalina
Telerik team
 answered on 05 Feb 2010
1 answer
274 views

I have a stored procedure that accepts a parameter ("UserID") via a session variable, and returns specific data.  The data in question comprises of multiple columns containing branch number, and address.  I have tested this query, and it performs correctly, returning the necessary data.  However, when testing the page (and combo box), the combo box does not list the data, but rather has an item in it that says "System.Data.DataRowView" - and nothing else.  This has me a little lost, as I am not certain why it is doing this.  Here's the requisite code:

'This is the code behind code for the page_load event;  
 
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load  
 
        Dim conn As New SqlClient.SqlConnection  
        Dim cmd As New SqlClient.SqlCommand  
 
        MemUser = Membership.GetUser()  
        UserID = MemUser.UserName.ToString()  
 
        Session("UserID") = UserID & "@tscgrpsolutions.com" 
 
    End Sub 
<!-- Here's the combo box & datasource--> 
<telerik:RadComboBox ID="ddlSelectStore" runat="server" Skin="Black" Width="300px"   
        DataSourceID="sqlStoreSelect">  
</telerik:RadComboBox> 
 
<!-- Data Connections--> 
 
<asp:SqlDataSource ID="SqlDataSource1" runat="server"   
    ConnectionString="<%$ ConnectionStrings:xxxxxxxxxx%>"   
    SelectCommand="StoreSelectCommand" SelectCommandType="StoredProcedure">  
    <SelectParameters> 
        <asp:SessionParameter DefaultValue="xxxxxxxxxxxxxx"   
            Name="RepName" SessionField="UserID" Type="String" /> 
    </SelectParameters> 
</asp:SqlDataSource> 

The data returned comprises of 4 or 5 columns. 

Update: I did try doing a SQL select command directly to the database from the ASP.NET data source, and was able to populate the combo box. HOWEVER, the first item in the combo box still says "System.Data.DataRowView", and I cannot select any of the items the combo box is populated with. I have no idea why...

Any direction would be appreciated.
Kalina
Telerik team
 answered on 05 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?