Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
97 views
When the user clicks the 'New Row' button from the grid's command bar, I'd like to create the row, put it in edit mode, and set focus to the new row's first field.

I've gotten the new row created and put in edit mode but I cannot get it to put the cursor in the edit controls for the row (I have to click inside them to get it started, from that point Tab gets me from field to field and Enter commits as expected).  Is there an example out there on how to do this that I've missed?
J
Top achievements
Rank 1
 answered on 01 Mar 2013
1 answer
75 views
Using SQLDataSource, so please provide a solution with this rather than an alternative unless it cannot be done. Thanks

TableA and TableB from the same database

My "ItemsRequested" for the combobox has this string setup and it works fine.

Dim sql as string = "SELECT TOP 10 B.serialnumber,  A,column, B,Column FROM DB.dbo.TableA A, DB.dbo.TableB B Where B.column LIKE'" + e.Text + "%' and B.column!='CL' order by B.column"

My problem is on the "ItemBound" method.

e.Item.Text = e.Item.Attributes("column") + ", "+e.Item.Attributes("column") + ", " +e.Item.Attributes("column")

The column name has to be the colum from TableB.  In other words  B.Colmn.
Putting in B.Column of course won't work as follows...
e.Item.Text = e.Item.Attributes("B.serialnumber") + ", "+e.Item.Attributes("column") + ", " +e.Item.Attributes("column")

So with this join involved how do a pull this information specifically from the joined table column? B.Column

Thanks!
Hristo Valyavicharski
Telerik team
 answered on 01 Mar 2013
1 answer
211 views
Is it possible for the CaptionDataField to contain more than one field?  

I had thought to set up the CaptionFormatString with something like "This is {0} of {1}" with the CaptionDataField = "Field1, Field2" but this crashes the grid everytime.

(Both of the fields I tried to use are defined in the DetailTables GridTableView DataKeyNames.)
Jayesh Goyani
Top achievements
Rank 2
 answered on 01 Mar 2013
3 answers
103 views
I used radGrid to display my items, also I am using javascript to find a row and select a row when user type in textbox. The problems is if those row is outside a radgrid's view, how can I move scrollBar to the selectedRow by javascript (clientside)
Charles Goh
Top achievements
Rank 1
 answered on 01 Mar 2013
0 answers
72 views

i designed table in report text box fields are shown but data base fields are not show

see the screen shot


Thanks Advance,
Mohamed.
mohamed
Top achievements
Rank 1
 asked on 01 Mar 2013
4 answers
198 views

I have reviewed the Upload Async demo (the overview). Telerik describes this demo as a "simple mail app mockup" and the AsyncUpload is used to add "file attachments". Within the demo, I clicked [Select] to "attach" a file. The demo also displays a default email address of john@johnsmith.com. I replaced this address with my own and clicked [Send], expecting to receive a message in my Inbox that included the file attachment. I never received a mail message (after several attempts).

Can someone explain how this demo is intended to work?
Is it suppose to send email?
If it is suppose to send email, is it also suppose to include a file attachment?
Can I change it so that it emails a hyperlink to a file that was uploaded to my webserver, instead of physically emailing an attachment?

I want a hyperlink (of the uploaded file) to be embedded in the mail message so that when a user receives the mail message, they can simply click on the hyperlink, and have it prompt the user to download the file from my webserver.

Can this be done? How?

Thank you,
Steven

Brian
Top achievements
Rank 1
 answered on 01 Mar 2013
4 answers
112 views
Hi,

(I am using the 2012.3.1205.40 version.)
I think I figured out a weird issue with the RadComBox when used with LoadOnDemand + EnableVirtualScrolling.
I bind my RadComboBoxes with a WCF Webservice and has been surprised to see that it is called two times:
- when I open the drop down panel (normal) 
- but also after I selected an item.

I checked your demo and it worked as expected.
Finally I detected that it was the MaxHeight property that makes the RadCombobox to call the WCF Webservice two times.

Code:
<telerik:RadComboBox ID="ddlCustomer" runat="server" ClientIDMode="Static" EnableLoadOnDemand="true" MaxHeight="200"            
    ShowMoreResultsBox="true" EnableVirtualScrolling="true" EmptyMessage="Type here ..."  >
    <WebServiceSettings Path="~/TestWS.svc" Method="LoadCustomersOnDemand" />
</telerik:RadComboBox>
 
 
<telerik:RadComboBox ID="ddlCustomer2" runat="server" ClientIDMode="Static" EnableLoadOnDemand="true"
    ShowMoreResultsBox="true" EnableVirtualScrolling="true" EmptyMessage="Type here ...">
    <WebServiceSettings Path="~/TestWS.svc" Method="LoadCustomersOnDemand" />
</telerik:RadComboBox>
The first RadCombobox calls my WCF Webservice two times, whereas the second one behaves normally (only one call).

Moreover because it is called two times, when you try to get the selectedItem after the second call, it returns null:
$find("ddlCustomer").get_selectedItem()


Can you check and confirm that?


Dimitar Terziev
Telerik team
 answered on 01 Mar 2013
1 answer
148 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
118 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
486 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?