Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
167 views
I'm running VS2010
I have an existing web project
When I open a web form in which I want to place a control I see all the standard web form controls but no Telerik.
I tried launching the Toolbox Configurator and then tell it to install the v.2010.3.1215.40 [Installation Folder] [Trial]
After relaunching they were in the toolbox for a second but when I opened it again they were gone.
Now they never appear after running the configurator.  Even if I exit and relaunch VS 2010;
Petar
Telerik team
 answered on 18 Jan 2011
3 answers
110 views
Howdy,

I am looking for more info on the Custom Links drop-down used on the editor control.  I am adding a bunch of custom links to the control and everything is working great. However, the link display is not the best.  The value of the Name property on some of the links is fairly long (30+ chars) and these links are one to two levels deep in the drop-down (I have the links in two levels of categories) which means there is white space to the left of the link names.  

When the link is long, the link that follows the long one is indented and does not look proper. Can I control how the links are displayed (ie no wrap)? Can I get rid of the unwanted indention? I have not seen any example of nested links with long text. Also can I control the width of the drop-down area, so that the control width remain normal in the toolbar, but the drop-down is large to handle the long link name?

Thanks,
Seth
Dobromir
Telerik team
 answered on 18 Jan 2011
1 answer
96 views
Hello,

I have a simple drop down:

<div style="margin: 0 0 15px 0;"><b>Available User(s):</b>
<telerik:RadComboBox ID="rcbApprovalUsers" runat="server" MarkFirstMatch="true" AllowCustomText="false"
    Filter="Contains" Width="250px" />
</div>

void rcbApprovalUsers_DataBinding(object sender, EventArgs e)
{
    List<ApproverInfo> unassignedApprovalUsers =
        CustomerFactory.ApprovalForwardingGetUnassigned(ECISite.ID, Master.ECICustomer.ID, Master.ECISession.AccountInfo.AccountNumber);
 
    rcbApprovalUsers.Visible = bAddApprover.Visible = (unassignedApprovalUsers.Count != 0);
    lNoApproversAvailable.Visible = (unassignedApprovalUsers.Count == 0);
 
 
    if (unassignedApprovalUsers.Count > 0)
    {
        rcbApprovalUsers.DataSource = unassignedApprovalUsers;
        rcbApprovalUsers.DataTextField = "UserInfo";
        rcbApprovalUsers.DataValueField = "CustomerID";
        rcbApprovalUsers.SelectedValue = unassignedApprovalUsers[0].CustomerID.ToString();
    }
}

If I click on this drop-down I see the following behaviors:

1) Text for selected value is highlighted.
2) Combo box expands to display values
3) On typing values the values filter to those containing the typed text

However, if I tab to this drop-down the behavior is different.  The combo box won't expand when I start typing and the only way to make this happen is to physically click on the combo box.

Is there a way to make the combo box expand when they start typing regardless of whether they tabbed or clicked to it?  Basically I would like the user to be able to see the available values containing their typed text without having to click the drop-down.

Thanks,
Andy
Kate
Telerik team
 answered on 18 Jan 2011
1 answer
51 views
Hi. I have a RadGrid that will display some records from a database table (using an sqldatasource). The user can edit and add records as normal. However, there is one field (called "default") which has special conditions associated with it. For a given set of records, only one record should have default=true.

I want to set client select = true such that only one record can be selected at a time (which is easy to do on the RadGrid). Then in the commandItem I want to add a button for a custom command "SetDefault". I am happy doing all of that - no problems.

My question relates to the code behind for the custom command "SetDefault". I can see three ways of doing what I want and would appreciate any view/comment about the best solution. If I do it within the Grid I am not sure how best to implement it. Options I can see are:

1. in the code use a datacontext and then a program loop to modify each of the records (easy to do) and I then assume I will need to refresh the grid.

2. somehow use an sql update query to update all of the records necessary (I can write the sql update query but I don't know how to execute a query from code) and then again refresh the grid

3. somehow process the RadGrid from the code that implements the custom command. This will have to do a foreach (GridDataItem item in RadGrid1.Items) loop that then modifies the value of a column in the grid. Questions: do I need to put each item into edit mode? How do I reference a column from the code to modify it's value? What do I need to do to then save the modified value? I am concerned that this approach will be slower than either of the previous two options - hence my question


Does this make sense?
Iana Tsolova
Telerik team
 answered on 18 Jan 2011
1 answer
41 views

I am using dropdown within Radgrid which has inline editing.

Now when I click on dropdown and then dragging the below scroll bar the list items of dropdown is also moving.
Please have a look on attached screen and 
suggest me some solution:


Thanks
Mukesh

Maria Ilieva
Telerik team
 answered on 18 Jan 2011
1 answer
68 views
I have placed my grid inside a radtooltip but when I hover my mouse the tooltip is showing but my Grid is hidden. Please explain me why its happening.

 <ItemTemplate>
                <asp:Label ID="lblJobStatus" runat="server" Text='<%# FF_JobState.GetJobStateSummary(Container.DataItem) %>' />
                <div id="divJobStatus" class="tooltip">
                    <telerik:RadToolTip ID="RadToolTipJobStatus" runat="server" CssClass="tooltipBackColor"
                        TargetControlID="lblJobStatus" RelativeTo="Element" HideDelay="3000" HideEvent="LeaveTargetAndToolTip"
                        ShowCallout="true" Position="TopRight" Width="350px" Height="200px">
                        <asp:GridView ID="gvJobStates" runat="server" AutoGenerateColumns="False" ShowHeader="False"
                            Width="300px" CssClass="gridviewSpacing gvJobStates">
                            <Columns>
                                <asp:TemplateField SortExpression="JobStateName">
                                    <ItemTemplate>
                                        <asp:Label ID="lblJobStateName" runat="server" Text='<%# Eval("JobStateName") %>' />
                                        <asp:HiddenField ID="hidJobStateKey" runat="server" Value='<%# Eval("JobStateKey")%>' />
                                    </ItemTemplate>
                                    <ItemStyle Width="200px" />
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="cbIsCompleted" runat="server" AutoPostBack="true" OnCheckedChanged="cbIsCompleted_CheckedChanged"
                                            Checked='<%# Eval("IsCompleted")%>' ValidationGroup='<%# Eval("JobStateKey")%>' />
                                    </ItemTemplate>
                                    <ItemStyle Width="80px" />
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </telerik:RadToolTip>                    
                </div>
            </ItemTemplate>
Tsvetina
Telerik team
 answered on 18 Jan 2011
5 answers
74 views
Hi guys,

Am I doing something silly here, looking at the documentation for the RadTreeView (http://www.telerik.com/help/aspnet-ajax/tree_overviermigrating.html) I see there should be a method OnClientDoubleClicking that would allow me to hook into the handling of a double-click and cancel under certain conditions.

However, I only see OnClientDoubleClick which occurs too late for what I need to do.

Frustratingly I can see OnClientNodeClicked and OnClientNodeClicking so what's going on? And yes I've tried a dummy method using the same signature and it doesn't fire.

Any ideas?

thanks
Nikolay Tsenkov
Telerik team
 answered on 18 Jan 2011
1 answer
103 views
Hello All,

I have a RadGrid, I have applied skin webBlue to it, now what I want is the border for the items in the grid, I want the Gridlines on the grid. The only solution what I am getting is to apply border to all fields but I don't want to do this.
Princy
Top achievements
Rank 2
 answered on 18 Jan 2011
1 answer
97 views
** SORRY POSTED ON WRONG FORUM ** (--->MVC)
Is there a way to catch the new row event - like OnEdit() ?
I wish to do some manipulation on the new inserted row (in edit mode).
But I don't want this manipulation to occur in existing rows in Edit Mode (hence the OnEdit Event doesn't help).

To be more specific - I have a dropdownlist , while in inset mode I want to pass values from the selected item to other columns.
but I don't want it to be enabled on regular edit mode at all....

How can I achieve this ?

Mira
Telerik team
 answered on 18 Jan 2011
5 answers
126 views
Hi,

I'm having some problems with records disappearing from grid.
I'm attaching screenshots to show the problem.

This is the behavior of the problem:

Web page is loaded and all records are retrieve (164 records) paged every 10 records (very fast, 3 sec).
Moving to another page of records all works fine but very slow (22 sec).
If I try to filter the grid from the filter field, for a record in the list, the record is not found (confirmed, the record exists).
If I clear the filter (setting button to None) it takes a lot of time to get all record again and only 131 records are showed.
I've confirmed that the bind function always return 164 records and not 131 as grid show.

This is the code for aspx page:

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="Quasar.WebUI.Customers.Customers.List" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <title>Quasar | CRM - Customers List</title>
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
 
   <telerik:RadAjaxLoadingPanel ID="ListRadAjaxLoadingPanel" runat="server" Skin="Default" />
 
   <telerik:RadAjaxManager ID="ListRadAjaxManager" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ListGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ListGrid" LoadingPanelID="ListRadAjaxLoadingPanel" UpdatePanelHeight="" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
    <telerik:RadWindowManager ID="ListRadWindowManager" runat="server" />
 
    <div class="findField">
        <asp:Label ID="FindFieldLabel" runat="server" AssociatedControlID="FindFieldTextBox">Customer :</asp:Label>
        <telerik:RadTextBox ID="FindFieldTextBox" runat="server" EmptyMessage="(empty)" MaxLength="50" Columns="50"
            SelectionOnFocus="SelectAll" ToolTip="Find Customer"></telerik:RadTextBox>
        <telerik:RadButton ID="FindButton" runat="server" Icon-PrimaryIconUrl="~/Images/Find.png" Text="Find" Width="75px"
            onclick="FindButton_Click">
        </telerik:RadButton>
    </div>
 
    <telerik:RadGrid ID="ListGrid" runat="server" AllowFilteringByColumn="True"
        AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
        GridLines="None" ShowStatusBar="True" ShowGroupPanel="True" EnableLinqExpressions="false"
        onneeddatasource="ListGrid_NeedDataSource"
        onitemcommand="ListGrid_ItemCommand">
 
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" AllowDragToGroup="True">
            <Selecting AllowRowSelect="False" />
        </ClientSettings>
 
        <GroupingSettings CaseSensitive="false" />
 
        <MasterTableView DataKeyNames="CustomerId" CommandItemDisplay="Top">
            <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
 
            <RowIndicatorColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
 
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
 
            <NestedViewSettings>
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="ContactId" MasterKeyField="CustomerId" />
                    <telerik:GridRelationFields DetailKeyField="AddressId" MasterKeyField="CustomerId" />
                </ParentTableRelation>
            </NestedViewSettings>
 
            <NestedViewTemplate>
 
                <asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap">
                    <telerik:RadTabStrip runat="server" ID="CustomersTabStrip" MultiPageID="CustomersMultipage" SelectedIndex="0">
                        <Tabs>
                            <telerik:RadTab runat="server" Text="Contacts" PageViewID="ContactsPageView">
                            </telerik:RadTab>
                            <telerik:RadTab runat="server" Text="Addresses" PageViewID="AddressesPageView">
                            </telerik:RadTab>
                        </Tabs>
                    </telerik:RadTabStrip>
 
                    <telerik:RadMultiPage runat="server" ID="CustomersMultipage" SelectedIndex="0" RenderSelectedPageOnly="false">
 
                        <telerik:RadPageView runat="server" ID="ContactsPageView">
 
                            <telerik:RadGrid ID="ContactsGrid" runat="server" AllowSorting="false" AllowFilteringByColumn="false"
                                PageSize="5" AllowPaging="true" AutoGenerateColumns="False" GridLines="None"
                                onneeddatasource="ContactsGrid_NeedDataSource">
 
                                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True"
                                    AllowDragToGroup="True">
                                    <Selecting AllowRowSelect="True" />
                                </ClientSettings>
 
                                <MasterTableView DataKeyNames="ContactId">
 
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="ContactId" HeaderText="Id"
                                            UniqueName="ContactId" Visible="false">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Full Name" DataField="FullName" UniqueName="FullName">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Position" DataField="Position" UniqueName="Position">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Contact Type" DataField="ContactType.Description" UniqueName="ContactType">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridHyperLinkColumn DataNavigateUrlFields="Email" DataNavigateUrlFormatString="mailto:{0}"
                                            DataTextField="Email" HeaderText="Email" UniqueName="Email" Groupable="false"
                                            AllowFiltering="false">
                                        </telerik:GridHyperLinkColumn>
                                        <telerik:GridBoundColumn HeaderText="Phone" DataField="Phone" UniqueName="Phone">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Mobile" DataField="Mobile" UniqueName="Mobile">
                                        </telerik:GridBoundColumn>
                                    </Columns>
 
                                </MasterTableView>
 
                            </telerik:RadGrid>
 
                        </telerik:RadPageView>
 
                        <telerik:RadPageView runat="server" ID="AddressesPageView">
 
                            <telerik:RadGrid ID="AddressesGrid" runat="server" AllowSorting="false" AllowFilteringByColumn="false"
                                PageSize="5" AllowPaging="true" AutoGenerateColumns="False" GridLines="None"
                                onneeddatasource="AddressesGrid_NeedDataSource">
 
                                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True"
                                    AllowDragToGroup="True">
                                    <Selecting AllowRowSelect="True" />
                                </ClientSettings>
 
                                <MasterTableView DataKeyNames="AddressId">
 
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="AddressId" HeaderText="Id"
                                            UniqueName="AddressId" Visible="false">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Address Type" DataField="AddressType" UniqueName="AddressType">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Full Address" DataField="FullAddress" UniqueName="FullAddress">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Zip Code" DataField="ZipCode" UniqueName="ZipCode">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="City" DataField="City" UniqueName="City">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Province" DataField="Province" UniqueName="Province">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Country" DataField="Country" UniqueName="Country">
                                        </telerik:GridBoundColumn>
                                    </Columns>
 
                                </MasterTableView>
 
                            </telerik:RadGrid>
 
                        </telerik:RadPageView>
 
                    </telerik:RadMultiPage>
 
                </asp:Panel>
 
            </NestedViewTemplate>
 
            <Columns>
                <telerik:GridButtonColumn ButtonType="ImageButton" Reorderable="False"
                    Resizable="False" ShowFilterIcon="False" ShowSortIcon="False"
                    UniqueName="EditButton" ImageUrl="~/Images/Edit.png" CommandName="Edit">
                    <ItemStyle Width="20px" HorizontalAlign="Center" VerticalAlign="Middle" />
                </telerik:GridButtonColumn>
                <telerik:GridImageColumn AllowFiltering="False" AllowSorting="False"
                    DataAlternateTextField="Name" DataImageUrlFields="Logo"
                    DataImageUrlFormatString="~/Images/Customers/{0}" Groupable="False"
                    HeaderText="Logo" ImageHeight="64px" ImageWidth="64px" ShowSortIcon="False"
                    UniqueName="Logo" ItemStyle-Width="75px">
                    <ItemStyle Width="75px" />
                </telerik:GridImageColumn>
                <telerik:GridBoundColumn DataField="CustomerId" HeaderText="Id" UniqueName="CustomerId" Visible="false"
                    AllowFiltering="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="Name" AutoPostBackOnFilter="true"
                    CurrentFilterFunction="Contains">
                </telerik:GridBoundColumn>
                <telerik:GridHyperLinkColumn DataNavigateUrlFields="Web" DataNavigateUrlFormatString="{0}" DataTextField="Web"
                    HeaderText="Web" UniqueName="Web" Target="_blank" Groupable="false" AllowFiltering="false">
                </telerik:GridHyperLinkColumn>
                <telerik:GridBoundColumn DataField="Group.Name" HeaderText="Group" UniqueName="Group" AutoPostBackOnFilter="true"
                    CurrentFilterFunction="Contains">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="AccountManager.FullName" HeaderText="Acct. Manager"
                    UniqueName="AccountManager" AutoPostBackOnFilter="true"
                    CurrentFilterFunction="Contains">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="SIC.Description" HeaderText="SIC"
                    UniqueName="SIC" AutoPostBackOnFilter="true"
                    CurrentFilterFunction="Contains">
                </telerik:GridBoundColumn>
                <telerik:GridCheckBoxColumn DataField="IsProspect" HeaderText="Prospect"
                    UniqueName="IsProspect" AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo">
                </telerik:GridCheckBoxColumn>
                <telerik:GridButtonColumn ButtonType="ImageButton" Reorderable="False"
                    Resizable="False" ShowFilterIcon="False" ShowSortIcon="False"
                    UniqueName="DeleteButton" ImageUrl="~/Images/Delete.png" CommandName="Delete"
                    ConfirmDialogType="RadWindow" ConfirmText="Are you sure you want to delete this record?" ConfirmTitle="Delete record..."
                    ConfirmDialogHeight="130px">
                    <ItemStyle Width="20px" HorizontalAlign="Center" VerticalAlign="Middle" />
                </telerik:GridButtonColumn>
            </Columns>
 
        </MasterTableView>
 
        <PagerStyle Mode="NextPrevAndNumeric" Position="Bottom" />
 
        <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
 
    </telerik:RadGrid>
 
</asp:Content>

Code  Behind for binding:

#region Binding
 
// Bind main grid
protected void ListGrid_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    ListGrid.DataSource = BindControls();
}
 
protected IEnumerable<Customer> BindControls()
{
    var customers = customersRepository.GetAllCustomers();
 
    return customers;
}
 
// Bind contacts grid
protected void ContactsGrid_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    (sender as RadGrid).DataSource = BindContactsControls();
}
 
protected IEnumerable<Contact> BindContactsControls()
{
    var contacts = contactsRepository.GetContactsByCustomer(System.Convert.ToInt32(CurrentRecordId));
 
    return contacts;
}
 
// Bind addresses grid
protected void AddressesGrid_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    (sender as RadGrid).DataSource = BindAddressesControls();
}
 
protected IEnumerable<Address> BindAddressesControls()
{
    var addresses = addressesRepository.GetAddressesByCustomer(System.Convert.ToInt32(CurrentRecordId));
 
    return addresses;
}
 
#endregion

And this is the code for Customers repository:

using System.Linq;
 
using System.Transactions;
using System.Data;
 
namespace Quasar.Repository
{
    public class CustomersRepository
    {
        // Create data context
        private QuasarEntities entities = new QuasarEntities();
 
        // Retrieve all Customers
        public IQueryable<Customer> GetAllCustomers()
        {
            return entities.Customers.OrderBy(o => o.Name);
        }
 
        // Retrieve a Customer by Id
        public Customer GetCustomer(int id)
        {
            return entities.Customers.FirstOrDefault(d => d.CustomerId == id);
        }
 
        // Add Customer
        public int Add(Customer customer)
        {
            using (TransactionScope transaction = new TransactionScope())
            {
                try
                {
                    entities.Customers.AddObject(customer);
                    entities.SaveChanges();
 
                    // Commit Transaction
                    transaction.Complete();
 
                    return customer.CustomerId;
                }
                catch
                {
                    return 0;
                }
            }
        }
 
        // Delete Customer
        public bool Delete(Customer customer)
        {
            using (TransactionScope transaction = new TransactionScope())
            {
                try
                {
                    // Delete Customer and childs
                    entities.Customers.DeleteObject(customer);
                    entities.SaveChanges();
 
                    // Commit Transaction
                    transaction.Complete();
 
                    return true;
                }
                catch
                {
                    return false;
                }
            }
        }
 
        // Persistence
        public bool Save()
        {
            using (TransactionScope transaction = new TransactionScope())
            {
                try
                {
                    entities.SaveChanges();
 
                    // Commit Transaction
                    transaction.Complete();
 
                    return true;
                }
                catch
                {
                    return false;
                }
            }
        }
    }
}


Please, any help?

Regards
Jose
Mira
Telerik team
 answered on 18 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?