Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
130 views
Hi,

I need to localize my Rad ListBox for 3 languages. It's all good except to tooltips for buttons. I found this article that explains how tooltips can be set in JavaScript but I need to use resource files for that.

So my ListBox controls looks like this:

 <table style="vertical-aligntop;">
                                        <tr>
                                            <td style="vertical-aligntop;">
                                                <label> 
                                                    <asp:Literal ID="Literal1" runat="server" meta:resourceKey="RadPanelLeftLabel" />
                                                </label>                                                    
                                                    <br />
                                                <telerik:RadListBox runat="server" ID="RadListBoxSource" Height="200px" Width="200px"
                                                   AllowTransfer="true" TransferToID="RadListBoxDestination"  
                                                    TransferMode="Copy" AllowReorder="false" SelectionMode="Multiple" 
                                                    EnableDragAndDrop="true"  ButtonSettings-TransferButtons="TransferFrom,TransferAllFrom"
                                                    OnClientTransferred="ShowHideValidationMessage" 
                                                    AutoPostBackOnTransfer="true" OnTransferred="SortDestinationListBox" />                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                            </td>
                                            <td style="vertical-aligntop;">
                                                <label>
                                                 <asp:Literal ID="Literal2" runat="server" meta:resourceKey="RadPanelRightLabel" />
                                                    </label>
                                                    <br />
                                                <telerik:RadListBox runat="server" 
                                                ID="RadListBoxDestination" Height="200px" Width="200px"
                                                AllowReorder="false" AllowDelete="true" />     
                                                                                                                                                                                      
                                                <asp:Label ID="lblRadListBoxDestinationEmpty" 
                                                runat="server" Font-Bold="true" ForeColor="Red" 
                                                meta:resourceKey="lblRadListBoxDestinationEmpty"
                                                Visible="false"/>
 
                                            </td>
                                        </tr>
                                    </table>


Can you please show me how I can localize tooltips for transfer buttons with resource files much like I did for say titles above listboxes.

Thanks!

brian
Top achievements
Rank 1
 answered on 31 Oct 2011
1 answer
92 views
Hello Team,
I have added a RadScheduler and a RadToolTipManager to a page. The RadScheduler OverflowBehavior="Expand" and Width="100%" to create that effect in the scheduler. When mouse over one of the appointment of the top of the scheduler the RadToolTipManager shows the tooltip over the appointment but when it's in one of the bottom the page is scrolled up and then I have to scroll it down in order to see the tooltip. Is there any solution to avoid the page scrolls up when mouse over an appointment in the bottom of the scheduler?.

<

 

 

asp:UpdatePanel runat="server" ID="EventUpdatePanel" UpdateMode="Conditional">

 

 

 

<ContentTemplate>

 

 

 

    <telerik:RadScheduler ID="EventScheduler" runat="server" 
                        OverflowBehavior="Expand" 
                        width="100%"         
                        Skin
="Web20" 
                        
ReadOnly="true" 
                        DataKeyField="EventId" 
                        EnableEmbeddedSkins="false" 
                        DataSubjectField="Subject" 
                        DataStartField="StartTime" 
                        DataEndField="EndTime" 
                        DataDescriptionField="Description" 
                        TimelineView-UserSelectable="false" 
                        ShowAllDayRow="true" 
                        ShowFullTime="false" 
                        FirstDayOfWeek="Monday" 
                        LastDayOfWeek="Friday" 
                        SelectedView="MonthView" 
                        MonthView-VisibleAppointmentsPerDay="4" 
                        RowHeight="30px" 
                        OnAppointmentCommand="EventScheduler_AppointmentCommand">

 

 

 

        <AppointmentTemplate>

 

 

 

          <div>

 

            <%

 

#Eval("Subject") %>

 

 

 

            <br />

 

 

 

          </div>

 

 

 

        </AppointmentTemplate>

 

 

 

    </telerik:RadScheduler>

 

 

 

    <telerik:RadToolTipManager runat="server" ID="EventToolTipManager" 
        
Width="320" Height="210"

 

 

 

        Animation="Fade" 
        HideEvent="LeaveToolTip" 
        Text="Loading..." 
        RelativeTo="Element" 
        Position="TopLeft"

 

 

 

        OnClientBeforeShow="clientBeforeShow" 
        EnableShadow="true" 
        OnAjaxUpdate="EventToolTipManager_AjaxUpdate" />

 

 

 

</ContentTemplate>

 

</

 

 

asp:UpdatePanel>

 



Regards,

Juan
Peter
Telerik team
 answered on 31 Oct 2011
1 answer
57 views

Hi,

 

I am using radfilter on a radlistview bound to a datasource. On pageload I use the following code to default show the filteritem Name from the datasource:

 

 

if (!IsPostBack)
{
       RadFilterTextFieldEditor editor = new RadFilterTextFieldEditor();
       RadFilterPartner.FieldEditors.Add(editor);
       if (!IsPostBack)
       {
              editor.FieldName = "NAME";
              editor.DataType = typeof(string);
              RadFilterContainsFilterExpression filter = new RadFilterContainsFilterExpression("NAME");
              filter.Value = "";
 
              RadFilterPartner.RootGroup.Expressions.Add(filter);
        }
}
 

 

My question is how I can set the focus on the NAME filteritem on pageload, so the user can start typing the filtertext, instead of manually click the filteritem and then typing the filtertext?

-Kurt

Mira
Telerik team
 answered on 31 Oct 2011
5 answers
131 views
I have  panel to contain all body
then i use ajax to control this panel 
Code show below
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server" >
<AjaxSettings >
<telerik:AjaxSetting AjaxControlID ="rblCatLevel">
<UpdatedControls >
<telerik:AjaxUpdatedControl ControlID ="pnlMainCat" />
<telerik:AjaxUpdatedControl ControlID ="rblCatLevel" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy
I have a uploader inside the pnlMainCat

when i upload file, it cannot find the find 
i use radupload.UploadedFiles.Count , it always give me 0
when i remove ajax, it can work properly

<telerik:RadUpload ID="ruBanner" runat="server" EnableAjaxSkinRendering ="true"  EnableFileInputSkinning ="false" Width="50%" InitialFileInputsCount="1" ControlObjectsVisibility="None" />

Demo
I tried this demo , but it cant work
Rayne
Top achievements
Rank 1
 answered on 31 Oct 2011
3 answers
157 views
Hi,

I got an activex control that display images, and my page divided by frames that their size can be changed by RadSplitter when I'm dragging the splitter over the activex control I'm lossing the cursor, also if I'm open popup RadWindow over activex control I cant move the popup window there is some king conflict with rad control with my activex. The Activex control actualy very simple and standart its only display images like tiff, jpeg etc.

Any ideas how can I get it work.

Thanks.
Marin Bratanov
Telerik team
 answered on 31 Oct 2011
3 answers
214 views
In the code below, I get the error: Missing operand after 'NotEqualTo' operator. 

  if (!Page.IsPostBack)
            {
                grdGSRComp.MasterTableView.FilterExpression = "([Variance] NotEqualTo \'0\') ";
                GridColumn column = grdGSRComp.MasterTableView.GetColumnSafe("Variance");
                column.CurrentFilterFunction = GridKnownFunction.NotEqualTo;
                column.CurrentFilterValue = "0";
                grdGSRComp.MasterTableView.Rebind();
            }

This code runs in page_load.

tried different variations and none worked. Any ideas?

Thanks!
Ken
Top achievements
Rank 1
 answered on 31 Oct 2011
1 answer
113 views
Hi

the RadEditor is inside a AjaxUpdatedControl, I have the MaxTextLenght set and when it is exceeded, the message appears (the added text exceeded...), after the ajax loading panel appears but it gets stuck in an infinite loopthere. How can I stop this.

Thanks
Rumen
Telerik team
 answered on 31 Oct 2011
7 answers
603 views

Requirements

RadControls version

2008.01.0415.20
.NET version

2
Visual Studio version

2005
programming language

C#
browser support

all browsers supported by RadControls


 
PROJECT DESCRIPTION

This project presents how to add a select/deselect all option for selecting all rows in a grouped Grid by means of a CheckBox residing in the Grid header along with individual group selection. To accomplish this task a CheckBox is added to the Grid header inside the ItemCreated event handler. Set the AutoPostBack property of the CheckBox control to true and intercept the action execution
in the CheckChanged event of the CheckBox.

ASPX:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!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 runat="server"
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server"
        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
        <br /> 
        <div> 
            <telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="true"  DataSourceID="SqlDataSource1" GridLines="None" AutoGenerateColumns="False" OnItemCreated="RadGrid1_ItemCreated" Skin="Hay"
                <MasterTableView DataSourceID="SqlDataSource1"
                    <RowIndicatorColumn Visible="False"
                        <HeaderStyle Width="20px" /> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn Resizable="False" Visible="False"
                        <HeaderStyle Width="20px" /> 
                    </ExpandCollapseColumn> 
                    <GroupByExpressions> 
                      <telerik:GridGroupByExpression> 
                       <GroupByFields> 
                         <telerik:GridGroupByField FieldName="Country" FieldAlias="Country" /> 
                       </GroupByFields> 
                       <SelectFields> 
                         <telerik:GridGroupByField FieldName="Country" FieldAlias="Country" /> 
                       </SelectFields> 
                      </telerik:GridGroupByExpression> 
                    </GroupByExpressions> 
                    <Columns> 
                        <telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustomerID"   DataType="System.Int32" SortExpression="CustomerID" 
                            UniqueName="CustomerID"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName" 
                            UniqueName="CompanyName"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Country" HeaderText="Country" SortExpression="Country" UniqueName="Country"
                        </telerik:GridBoundColumn> 
                    </Columns> 
                    <EditFormSettings> 
                        <PopUpSettings ScrollBars="None" /> 
                    </EditFormSettings> 
                </MasterTableView> 
            </telerik:RadGrid><br /> 
            <br /> 
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthWindConnectionString %>" 
                SelectCommand="SELECT [CustomerID], [CompanyName], [Country] FROM [ Customers]"></asp:SqlDataSource> 
            &nbsp;</div> 
    </form> 
</body> 
</html> 
 

C#:
using System; 
using System.Data; 
using System.Configuration; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Web.UI.HtmlControls; 
using Telerik.Web.UI; 
 
public partial class _Default : System.Web.UI.Page  
    protected void Page_Load(object sender, EventArgs e) 
    { 
 
    } 
    protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e) 
    { 
        if (e.Item is GridHeaderItem) 
        { 
            GridHeaderItem header = (GridHeaderItem)e.Item; 
            CheckBox headerchkbx = new CheckBox(); 
            headerchkbx.ID = "CheckBox2"
            headerchkbx.AutoPostBack = true
            headerchkbx.CheckedChanged += new EventHandler(headerchkbx_CheckedChanged); 
            header["column"].Controls.Add(headerchkbx); 
 
        } 
        if (e.Item is GridGroupHeaderItem) 
        { 
            GridGroupHeaderItem header = (GridGroupHeaderItem)e.Item; 
            CheckBox groupchkbx = new CheckBox(); 
            groupchkbx.ID = "CheckBox1"
            groupchkbx.AutoPostBack = true
            groupchkbx.CheckedChanged += new EventHandler(groupchkbx_CheckedChanged); 
            header.Controls[0].Controls.Add(groupchkbx); 
        } 
          
    } 
    void headerchkbx_CheckedChanged(object sender, EventArgs e) 
    { 
 
        foreach (GridDataItem item in RadGrid1.MasterTableView.Items) 
        { 
            CheckBox headerchkbx = (CheckBox)sender; 
            foreach (GridGroupHeaderItem groupHeader in RadGrid1.MasterTableView.GetItems(GridItemType.GroupHeader)) 
            { 
                GridItem[] children = groupHeader.GetChildItems(); 
                CheckBox groupchkbx = (CheckBox)groupHeader.Controls[0].FindControl("CheckBox1"); 
 
                if (headerchkbx.Checked) 
                { 
                    item.Selected = true
                    groupchkbx.Checked = true
                } 
                else 
                { 
                    item.Selected = false
                    groupchkbx.Checked = false
                } 
 
            } 
        } 
    } 
 
    void groupchkbx_CheckedChanged(object sender, EventArgs e) 
    { 
        int chkCount = 0
        foreach (GridGroupHeaderItem groupHeader in RadGrid1.MasterTableView.GetItems(GridItemType.GroupHeader)) 
        { 
            GridItem[] children = groupHeader.GetChildItems(); 
 
            CheckBox groupchkbx = (CheckBox)groupHeader.Controls[0].FindControl("CheckBox1"); 
            if ((groupchkbx.Checked)) 
            { 
                chkCount++; 
            } 
            foreach (GridItem child in children) 
            { 
                GridDataItem dataItem = child as GridDataItem; 
                dataItem.Selected = groupchkbx.Checked; 
 
                foreach (GridHeaderItem item in RadGrid1.MasterTableView.GetItems(GridItemType.Header)) 
                { 
                    CheckBox headerchkbx = (CheckBox)item["column"].FindControl("CheckBox2"); 
 
                    if ((!groupchkbx.Checked)) 
                    { 
                        headerchkbx.Checked = false
                    } 
                    if (RadGrid1.MasterTableView.GetItems(GridItemType.GroupHeader).Length == chkCount) 
                    { 
                        headerchkbx.Checked = true
                    } 
 
                } 
            } 
        } 
    } 

Naeem
Top achievements
Rank 1
 answered on 31 Oct 2011
0 answers
118 views
I had the same problem others seem to of have. Disabled RadComboBoxes were ugly when used on a page that had a FormDecorator and a parent Skin. Please see the resolution below:

div.RadComboBox_Vista .rcbDisabled INPUT.rcbInput
    {
        background-color: White !important;
        color: Gray !important;
    }

Assuming a Skin of 'Vista', this will style the disabled drop down. I made it simple, used the same background color as the table the control was in and choose a Gray fore color.

Hope it helps save someone the few hours it took me to amalgamate a solution.
Sugar
Top achievements
Rank 1
 asked on 31 Oct 2011
2 answers
103 views
how do i add custom context menu to the radgrid. thank you.
Ammar
Top achievements
Rank 1
 answered on 31 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?