Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
131 views

I am using Rad Calendar in my vb project. I am trying to display the meeting details on the tooltip.

I am trying to import Telerik.Web.Examples.ToolTip.ToolTipCalendar using:
But it is showing error. Kindly suggest. I had used the same logic in C#. It is working fine there, but it is not working in vb
Imports Imports Telerik.Web.Examples.ToolTip.ToolTipCalendar

I am using the following code in my default.aspx.vb file:
Protected Sub RadToolTipmanager1_AjaxUpdate(sender As Object, e As ToolTipUpdateEventArgs)
      Dim details As AppointmentDetails = DirectCast(Me.LoadControl("../Admin/UserControls/AppointmentDetails.ascx"), AppointmentDetails)
      details.AppointmentID = e.Value
      e.UpdatePanel.ContentTemplateContainer.Controls.Add(details)
  End Sub

Also i had created a user control AppointmentDetails.ascx.vb


Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports System.Drawing
Imports System.IO
 
 
Namespace Telerik.Web.Examples.ToolTip.ToolTipCalendar
 
    Partial Public Class AppointmentDetails
        Inherits System.Web.UI.UserControl
        Private EmpployeeClass As New EmployeeManager()
        Private user As New UserManager()
        Private m_appointmentID As String
 
        Public Property AppointmentID() As String
            Get
                Return m_appointmentID
            End Get
            Set(value As String)
                m_appointmentID = value
            End Set
        End Property


        Protected Sub Page_PreRender(sender As Object, e As EventArgs)
            Me.AppointmentsDataSource.SelectParameters("ID").DefaultValue = Me.AppointmentID.ToString()
            GridView1.DataSource = AppointmentsDataSource
            GridView1.DataBind()

        End Sub

    End Class
End Namespace


and the default.aspx file contains

<telerik:RadToolTipManager Width="250px" HideDelay="0" RelativeTo="Mouse" ID="RadToolTipManager2"
    runat="server" Position="TopRight" OnAjaxUpdate="RadToolTipmanager1_AjaxUpdate"
    AutoCloseDelay="0">
</telerik:RadToolTipManager>
<telerik:RadCalendar ID="RadCalendar2" RangeMinDate="3/1/2007" runat="server" Width="100%"
    Height="200px" Skin="Default" OnDayRender="RadCalendar2_DayRender" RangeMaxDate="3/30/2014">
</telerik:RadCalendar>

Marin Bratanov
Telerik team
 answered on 01 Mar 2013
1 answer
103 views

Hi,

I have a grid on my page which allows users to edit records and do batch updates. I am using the following demo which works just fine. (http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultvb.aspx?#qsf-demo-source).

However, in my RadGrid I have several bound columns set to ReadOnly and when the users accidentally double click those ReadOnly columns JavaScript errors occur. It seems the errors occur because the JavaScript functions are looking for the editable control (textbox) for every column including the ReadOnly ones.

I tried to modify the JavaScript functions so no “dblclick” handler is added to those ReadOnly columns but I am still getting the errors.

Using the demo specified above, is there any way the ReadOnly columns will be ignored when double clicking the cell?

Using: 

  • RadControls for ASP.NET AJAX Q1 2013
  • Windows 7
  • Visual Studio 2010
  • vb.net
  • .NetFramework 4.0
  • SQL Server 2005

Thanks

Sigi Perez

Eyup
Telerik team
 answered on 01 Mar 2013
1 answer
462 views
Hi there,

I use a textbox filter template in my RadGrid column, but the textbox value disappear after the postback, as far as I know the value should be kept there by default, can anyone please let me know why is this happening? Thanks in advance!

Following is my code (database is northwind):
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <%--Needed for JavaScript IntelliSense in VS2010--%>
                <%--For VS2008 replace RadScriptManager with ScriptManager--%>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <script type="text/javascript">
            //Put your JavaScript code here.
        </script>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"></telerik:RadAjaxLoadingPanel>
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" CellSpacing="0"
            GridLines="None" Width="800px" AllowFilteringByColumn="true" EnableLinqExpressions="false" AutoGenerateColumns="false"
             OnNeedDataSource="RadGrid1_NeedDataSource" ShowFooter="True">
            <MasterTableView AutoGenerateColumns="false" EditMode="InPlace" AllowFilteringByColumn="True"
            ShowFooter="True" TableLayout="Auto">
                <Columns>
                    <telerik:GridTemplateColumn DataField="Freight" HeaderText="Freight" SortExpression="Freight" AutoPostBackOnFilter="true" CurrentFilterFunction="GreaterThanOrEqualTo"
                        ShowFilterIcon="false">
                            <ItemTemplate>
                                <asp:LinkButton ID="lbl_freight" runat="server" Text='<%#Eval("Freight")%>' Visible="true"/>
                            </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn DataField="ShipName" HeaderText="Ship Name" SortExpression="ShipName" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                    ShowFilterIcon="false">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbl_name" runat="server" Text='<%#Eval("ShipName")%>' Visible="true"/>
                        </ItemTemplate>
                   </telerik:GridTemplateColumn>
                   <telerik:GridTemplateColumn DataField="ShipCountry" UniqueName="ShipCountry" HeaderText="Ship Country" SortExpression="ShipCountry">
                        <FilterTemplate>
                            <telerik:RadTextBox runat="server" ID="filterCountry" ClientEvents-OnValueChanged="CountryChanged" CssClass="rgFilterTextBox"></telerik:RadTextBox>
                            <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server"
                                <script type="text/javascript">
                                    function CountryChanged(sender, args) {
                                        var txtbox = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        txtbox.filter("ShipCountry", sender.get_value(), "Contains");
                                    
                                </script
                            </telerik:RadScriptBlock
                        </FilterTemplate>
                        <ItemTemplate>
                            <asp:LinkButton ID="lbl_country" runat="server" Text='<%#Eval("ShipCountry")%>' Visible="true"/>
                        </ItemTemplate>
                   </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </form>
</body>

cs file
public partial class RadGridFilterTest : System.Web.UI.Page
{
    protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        LoadData();
    }
  
    private void LoadData()
    {
        RadGrid1.DataSource = GetDataTable("SELECT OrderID, OrderDate, Freight, ShipName, ShipCountry FROM Orders");
    }
  
    public DataTable GetDataTable(string query)
    {
        String ConnString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
        SqlConnection conn = new SqlConnection(ConnString);
        SqlDataAdapter adapter = new SqlDataAdapter();
        adapter.SelectCommand = new SqlCommand(query, conn);
  
        DataTable myDataTable = new DataTable();
  
        conn.Open();
        try
        {
            adapter.Fill(myDataTable);
        }
        finally
        {
            conn.Close();
        }
  
        return myDataTable;
    }
}
Eyup
Telerik team
 answered on 01 Mar 2013
2 answers
140 views
Hello Everyone,

I'm having trouble in the following situation:

http://demos.telerik.com/aspnet-ajax/pivotgrid/examples/configurationpanel/defaultcs.aspx
On the Demo page I see a CategoryName & ProductName and so on...

In my application I've got the fields names separated with a "_" sign.

i would like to replace the "_" sign with an empty space " ". ex(Category_name => Category name)

I've tried to alter the column caption on databinding of the pivot grid (server side).
I've searched for a event (server side) prior to the Show of the configuration panel -> non existing.

can someone please point me in an other direction to search for the solution?
Maria Ilieva
Telerik team
 answered on 01 Mar 2013
4 answers
158 views
Hi

I need to save an edited image server-side in an SQL database. Apparently this does not work correctly with CanvasMode set to 'yes', but I need this set to yes as I am using the new Drawing tools!

Could you please help me achieve this. Is there a way I can successfully retrieve the edited image server-side while using the drawing tools, if not could you help provide me with a work around that perhaps retrieves the edited image client-side and then executes a server-side function that can reference the retrieved image (i.e. client-side place the image contents in a server control, and then call a server side function to save it in a database)?

Any help would be much appreciated.

Regards, Paul
Paul
Top achievements
Rank 1
 answered on 01 Mar 2013
4 answers
231 views
I have a RadCombobox inside the RadListView ItemTemplate. From RadComboBox SelectedIndexChanged I am trying to update database, but RadCOmbobox value comes back null. 

 protected void ddCustomer_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            RadComboBox ddCustomer = (RadComboBox)RadListView1.FindControl("ddCustomer");
            ---- it shows ddCustomer null. How can I find the control?
           ----- is there anyway, I can reach datakeys from here also?          
        }
Eyup
Telerik team
 answered on 01 Mar 2013
2 answers
80 views
I'm trying to access EditForm controls from a different method on the same page.

I'm using the following method but I keep getting null for GridEditableItem. Help?

Protected Sub NumericTextBoxChanged(ByVal sender As Object, ByVal e As EventArgs)
     
    Dim grid As RadGrid = AddEditQuoteFormView.FindControl("ItemsRadGrid")
 
    Dim editItem As GridEditableItem = CType(grid.MasterTableView.GetItems(GridItemType.EditItem)(0), GridEditableItem)
     
    Dim lengthNumericTextBox As RadNumericTextBox = CType(editItem("Length").Controls(0), RadNumericTextBox)
    Dim length = lengthNumericTextBox.Value
 
    CalculateFreightClass(length, width, height, weight)
 
End Sub
Andrey
Telerik team
 answered on 01 Mar 2013
2 answers
143 views
Hi,
Instead of a LoadingMessage = "Loading..." , I would like to add a spinning.gif in combobox. Is it possible???   
Karthik
Top achievements
Rank 1
 answered on 01 Mar 2013
1 answer
107 views
Hi ,

I am binding treenodes using webmethod and having following clientitemtemplate
<ClientNodeTemplate>
<
span id="#=Value#_span">#=Text#</span>
<
input type="text" value="#=Text#" style="display:none;width:100px;" id="#=Value#_txtEdit" ></input>
</ClientNodeTemplate>


I am showing/hiding  input control using javascript.

When I am editing the name in input control it is not accepting space bar (blank space)

I have also tried following solution provided in your forums
   OnClientLoad="clientLoad"

    function clientLoad(sender) {
            $telerik.$("input", sender.get_element()).on('keydown', function (e) {
                if (!e) var e = window.event;
                e.cancelBubble = true;
                if (e.stopPropagation) e.stopPropagation();
            });
        }

Please help for the same

Thanks ,
Somnath
Bozhidar
Telerik team
 answered on 01 Mar 2013
5 answers
150 views
Hi
I have a master page and sevral content page in my project.
after i send my postback and call MasterAjaxManager_AjaxRequest my master page i need call a function in content page but i dont find any solotion.
in all document resolve send AjaxRequest to master page but What i do for send AjaxRequest to content page.also i use AjaxManager.IsAjaxRequest in my content to detect any request but how can determine what is request arg.

in other solotion i call a client function and after that call another functiopn in content page.then send a querystring to my content and detect that in Page_Load. but it not work good.
mohammad farahani
Top achievements
Rank 1
 answered on 01 Mar 2013
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?