Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
107 views
Hi,

I've been trying to figure out how to make the RadMenu expand on click, but close when the mouse moves away from the child item.

I have been able to get it to work with a regular RadMenuItem as a child Item.

However my child item is a custom Item Template.  With the custom item template, the Mouseover/out events just don't seem to fire.

I have found some jquery methods to put on the div's in my custom item template, however, I'm not sure how to close the menu from inside the jquery event, since I don't have a reference to the radmenu or radmenuitem.

I've searched long and hard on this site and others to figure out a solution.

Thanks,
Nona
Princy
Top achievements
Rank 2
 answered on 28 Jun 2012
5 answers
224 views
I currently have a radeditor inside of a radwindow. The radwindow pops up when a user clicks on something and then they can edit the content in the new window. I am experiencing problems with the resizing of the radwindow when opening a dialogue. The initial dialog expands the radwindow sufficiently so I can view it (see screenshot "2_hyperlink_manager.jpg"). However, when I open the document manager from within the hyperlink manager, the document manager does not resize the original radwindow again so I cannot see the entire dialog (see screenshot "3_dialog_window.jpg"). Because of this and some other issues, I would like to change how dialogs open when clicked on from the radeditor. I think that opening the dialog windows outside of the calling radwindow that contains the editor would be more the effect I am looking for. This is what I cannot figure out how to do.

Can you please either redirect me to instructions or provide assistance for how to accomplish this? Or even put the radeditor into another control (not sure which one) that could behave like a popup window so that the dialogs open in a new radwindow on their own. I really like the "modal" features in the radwindow though.

Thank you kindly for your assistance.
Waseem
Top achievements
Rank 1
 answered on 28 Jun 2012
1 answer
157 views
Hi,

I am using telrik grid having 'EnableHeaderContextFilterMenu' enabled. I want to customize header context filter menu in order to add custom combo box instead of text box in filter menu  option. I am using 'GridTemplateColumn' having rad combo box in 'FilterTemplate' as mentioned below:-

<telerik:GridTemplateColumn DataField="UserType" InitializeTemplatesFirst="false"
                                    HeaderText="User Type" HeaderStyle-Width="100px" UniqueName="UserType" SortExpression="UserType"
                                    AllowFiltering="true" AutoPostBackOnFilter="true" FilterControlWidth="80px">
                                    <HeaderTemplate>
                                        <table>
                                            <tr>
                                                <td>
                                                    <asp:LinkButton ID="lnkSort2" runat="server" CommandArgument="UserType" CommandName="Sort"
                                                        Text="User Type"></asp:LinkButton>
                                                </td>
                                                <td>
                                                    <img src="App_Themes/Default/img/fillter_icon.png" style="vertical-align: middle;
                                                        margin-left: 5px; cursor: pointer" onclick='ShowColumnHeaderMenu(event,"UserType")'
                                                        alt="Show context menu" />
                                                </td>
                                            </tr>
                                        </table>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblUserType" runat="server" Text='<%# Eval("UserType")%>'></asp:Label>
                                    </ItemTemplate>
                                    <FilterTemplate>
                                        <telerik:RadComboBox runat="server" ID="radCmbUserType" DataValueField="UserType"
                                            AutoPostBack="true" DataTextField="UserType" Width="90px">
                                        </telerik:RadComboBox>
                                    </FilterTemplate>
                                </telerik:GridTemplateColumn>

Below is the function which binds rad combo box with the values:-

private void LoadFilterCombo()
        {
            if (null != grdAccounts && grdAccounts.MasterTableView.GetItems(GridItemType.Item).Count() > 0)
            {
                RadComboBox cboUserType = ((RadComboBox)((GridFilteringItem)grdAccounts.MasterTableView.GetItems(GridItemType.FilteringItem)[0])["UserType"].FindControl("radCmbUserType"));           

                foreach (int index in Enum.GetValues(typeof(CampaignService.UserType)))
                {
                    RadComboBoxItem item = new RadComboBoxItem();
                    item.Value = index.ToString();
                    item.Text = Enum.GetName(typeof(CampaignService.UserType), index);
                    cboUserType.Items.Add(item);
                }

            }
        }

I want this rad combo box to be displayed in 'HeaderContextFilter Menus' instead of default textbox as shown in attached image in order to apply filter as per selected values in combo box.

can you please suggest any solution on this?

Thanks and Regards,
Deepti



Pavlina
Telerik team
 answered on 27 Jun 2012
1 answer
238 views
Hello.
I have a MasterPage setup in a Web Application.
Based on different button clicks i load dynamically different usercontrols in a contentplaceholder.

ContentPlaceHolder cph = this.FindControl("ContentPlaceHolder1") as ContentPlaceHolder;
      UserControl uc = this.LoadControl("~/UserControls/" + strName + ".ascx") as UserControl;
 
      if ((cph != null) && (uc != null))
      {
          uc.ID = strName;
          cph.Controls.Clear();
          cph.Controls.Add(uc);
          IsControlAdded = true;
          ViewState[IDS_USERCONTROL] = strName;
      }

The problem is that i need in Site.Master to use some js code that exists in a dynamically loaded usercontrol.
That seems to be no problem for the first loaded usercontrol because the usercontrols html is included in the master page html.
The problem arrises when i dynimically load the second usercontrol i find out that the html and js from the first usercontrol loaded persists in the master page and the second usercontrol's js and html is not loaded.

If i add EnableAJAX="false" to the radajaxmanager it solves my problem .. but then again .. that beats the purpose of using ajaxmanager.
 
switch (index) {
 case 0: //Person
     var arr = GetSelectedPerson();                            
     args.set_cancel(true);
     break;
 case 1: //Company
     break;
 case 2: //Group
     var arr = GetSelectedGroups();
    break;

This is a code snipplet from Site.Master
GetSelectedPerson and GetSelectedGroups are two js methods that exist in different usercontrols.

Maria Ilieva
Telerik team
 answered on 27 Jun 2012
9 answers
668 views
Is there a property for the RadNumericTextBox equivalent to the "Validation-IsRequired" property of the RadInputManager control?
Maria Ilieva
Telerik team
 answered on 27 Jun 2012
3 answers
223 views
Hi,

I have country and city column in the radgrid and I have defined a template filters using radcombobox for both the columns. I am able to filter on both columns.

The only problem I have is when removing filtering.

Say I have filtered on both Country and city column and then I select All in the Country Filter column. 
In the country combo selectedindexchanged event I am clearing the filtering using the following command

filterItem.FireCommandEvent("Filter"new Pair("NoFilter""Country")); 

The problem is that the filtering on the city column is still active. So i modified the above code to this

filterItem.FireCommandEvent("Filter"new Pair("NoFilter""Country")); 
filterItem.FireCommandEvent("Filter"new Pair("NoFilter""City")); 

THe above code does not work. The FireCommandEvent works only for the first line, not for the second. I tried switching the statement order.  Is it possible to remove filtering on multiple columns by calling FireCommandEvent multiple times.

Thanks
Pavlina
Telerik team
 answered on 27 Jun 2012
3 answers
175 views
I'm using an image with a hyperlink grid column but I am unable to get the image to vertically align in the middle. It almost appears like the grid is placing the image in the column an an unbreakable space ( & nbsp ;) causing the image to be forced to the top.

Any thoughts?
Eyup
Telerik team
 answered on 27 Jun 2012
10 answers
327 views
Hello Everyone,

I have two questions about Radgrid that I never understood completely. I'm using the new telerik 2011.3.1305.40. ASP.NET AJAX.
I Send a download Link with a simple example to illustrate my doubts. http://www.omnilab.com.br/documentos/ReadOnlyFields.rar
In the example I have one table with 4 fields. One of them is the primary key and identity field.

When I run the example, all happens fine, I can Edit and Update the table, however:
  1. When I make the field "id_movie" readonly, the table no longer updates. Why this happens? How can I solve this?
  2. If I change the type of field "control" to bit (to enable checkbox), the table no longer updates. Why this happens? How can I solve this?

I appreciate anyone to clarify those doubts to me.

Regards,
Marcio Nascimento

Andrew
Top achievements
Rank 1
Veteran
Iron
 answered on 27 Jun 2012
5 answers
265 views
I'm trying to build something like a "newsletter manager" that allows the user to compose an html formatted message and then send it to mailing lists.
In a real scenario, the user would insert Images and/or other "contents" (something that's not just typed text) selecting it from its local hard drive.
Onche the content file has been selected, and the user has choosen some of its properties (i.e. height/width for an image) I would like to process this file, maybe resize/compact it, then upload to a specific website folder, and then have the url to that file inserted in the editor content.

I hoped that this was what the RadEditor ImageDialog and similar do, but it doesn't seems so.
I'm I wrong ar I'm I missing something ?

What is the preferred tecnique to achieve that goal ?

thx
Ubaldo
Rumen
Telerik team
 answered on 27 Jun 2012
0 answers
369 views
Need help here. This grid has 2 records being displayed. If I edit the first record everything works fine. If I edit the second record I get this debug message:

This only happens if I have ListDataMember="ReportName"

HttpException was unhandled by user code
DataBinding: 'System.String' does not contain a property with the name 'ReportName'

here is the item databound sub, Getting the error on ReportNameddList.Databind()
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid1.ItemDataBound
    If (TypeOf e.Item Is GridEditableItem AndAlso CType(e.Item, GridEditableItem).IsInEditMode) Then
        Dim GridRow As GridEditableItem = e.Item
        Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
        Dim editMan As GridEditManager = editedItem.EditManager
 
 
        ' this covers the report format field priming
        Dim editor As GridDropDownListColumnEditor = CType(editMan.GetColumnEditor("ddReportFormat"), GridDropDownListColumnEditor)
 
        Dim ReportFormatddList As DropDownList = editor.DropDownListControl
        ReportFormatddList.Items.Insert(0, New ListItem("Excel", "Excel"))
        ReportFormatddList.Items.Insert(1, New ListItem("PDF", "PDF"))
        ReportFormatddList.Items.Insert(2, New ListItem("HTML4.0", "HTML4.0"))
        ReportFormatddList.DataBind()
 
        'select the correct record
        Dim ReportFormatString As String = GridRow.GetDataKeyValue("ReportFormat").ToString()
        ReportFormatddList.Items.FindByValue(ReportFormatString).Selected = True
 
 
 
        'this covers the report name field priming
        editor = CType(editMan.GetColumnEditor("ddReportName"), GridDropDownListColumnEditor)
        Dim ReportNameddList As DropDownList = editor.DropDownListControl
        ReportNameddList.DataSource = (From r In DbContext.SubscriptionReportNames Select r.ReportName).ToList()
        ReportNameddList.DataBind()  '<-- this is the error line, but only when second row is being edited.

 
        'select the correct record
        Dim ReportNameString As String = GridRow.GetDataKeyValue("ReportName").ToString()
        ReportNameddList.Items.FindByValue(ReportNameString).Selected = True
 
 
 
    End If
End Sub

.aspx code
  <telerik:RadGrid runat="server" ID="RadGrid1" AutoGenerateColumns="False"
            AllowPaging="True" AllowSorting="True" CellSpacing="0"
        GridLines="None" ShowGroupPanel="True" Skin="Web20">
            <MasterTableView DataKeyNames="ReportFormat,ReportName,FranchiseSubscriptionEmailID" CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage">
                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" />
 
                    <telerik:GridBoundColumn DataField="FranchiseSubscriptionEmailID"
                        HeaderText="Record ID" ReadOnly="true"
                        ForceExtractValue="Always" ConvertEmptyStringToNull="true"
                        Visible="False" />
 
                    <telerik:GridBoundColumn DataField="FranchiseeID" HeaderText="Franchisee ID"
                        Visible="False" />
 
                <telerik:GridDropDownColumn DataSourceID="ReportNameddlist" ListTextField="ReportName"
                    ListValueField="ReportName" UniqueName="ddReportName" SortExpression="ReportName"
                    HeaderText="Report Name" DropDownControlType="DropDownList" ListDataMember="ReportName"
                        DataField="ReportName">
                </telerik:GridDropDownColumn>
 
                    <telerik:GridBoundColumn DataField="EmailAddress" HeaderText="Email Address" />
                    <telerik:GridBoundColumn DataField="Name" HeaderText="Franchisee Name" />
 
                <telerik:GridDropDownColumn DataSourceID="ReportFormatddlist" ListTextField="ReportFormat"
                    ListValueField="ReportFormat" UniqueName="ddReportFormat" SortExpression="ReportFormat"
                    HeaderText="Report Format" DropDownControlType="DropDownList"
                        DataField="ReportFormat" ListDataMember="ReportFormat">
                </telerik:GridDropDownColumn>
 
                    <telerik:GridButtonColumn ConfirmText="Delete this record?" ConfirmDialogType="RadWindow"
                       ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
 
                </Columns>
                <EditFormSettings>
                    <EditColumn ButtonType="ImageButton" />
                </EditFormSettings>
            </MasterTableView>
            <PagerStyle Mode="NextPrevAndNumeric" />
            <ClientSettings AllowDragToGroup="True">
                <ClientEvents OnRowDblClick="rowDblClick" />
            </ClientSettings>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
 
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
        </telerik:RadGrid>
justin
Top achievements
Rank 1
 asked on 27 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?