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

Image Attached.
Below mentioned code working fine with IE8 or above but with IE7 it throwing an alignment issues. OutPut attached in image format.

<telerik:RadToolBar id="RadToolBar1" runat="server" EnableRoundedCorners="true" EnableShadows="true">
                <Items>
                    <telerik:RadToolBarButton Text="Button" />
                    <telerik:RadToolBarButton IsSeparator="true" />
                    <telerik:RadToolBarButton Text="Toggle button" CheckOnClick="true" Checked="true" AllowSelfUncheck="true" />
                    <telerik:RadToolBarButton IsSeparator="true" />
                    <telerik:RadToolBarButton Text="Button" />
                </Items>
            </telerik:RadToolBar>


Pls do the needful.
Kate
Telerik team
 answered on 24 Sep 2012
5 answers
228 views
Hey at Telerik

I would like to know if there's a way to switch the expand/collapse logic of the RadPanelBar regarding the design.

I have a RadPanelBar locked in the middle at the bottom of my page and would like the expand/collapse images (logic) to be switched.

I have tried playing with css for elements

.rpExpandHandle and

.rpCollapseHandle


but with no luck.

Any help would be greatly appreciated.

Sincerly

Jan
Kate
Telerik team
 answered on 24 Sep 2012
4 answers
325 views
Greetings,

I would like to allow users to upload any type of file except ones with no extension.  Any ideas how to do this?

Your help is appreciated!

Matt
WAMatt
Top achievements
Rank 2
 answered on 24 Sep 2012
4 answers
163 views
Okay so here is the problem.  I have a self-referencing grid that is setup for drag and drop.  It takes a row and it can move it up and down and it can make it a child of another row.  everything is working fine 99% of the time.  Where I run into the issue is when I close the drop down menus that show the children and then try to move a row in the grid.  Here's my code:

<script type="text/javascript">
    function gridRowDropping(sender, args) {
        var targetTable = args.get_targetItemTableView();
        if (!targetTable || targetTable.get_owner().get_id() !== sender.get_id()) {
            args.set_cancel(true);
        }
    }
</script>
 
<div id="DropUnderWrapper">
    <asp:CheckBox ID="IsUnder" runat="server" Text=" Drop Under Parent" />
</div>
<telerik:RadGrid ID="SiteMenuGrid" runat="server"
    AutoGenerateColumns="false" AllowMultiRowSelection="false"
    OnNeedDataSource="SiteMenuGrid_NeedDataSource"
    OnItemCreated="SiteMenuGrid_ItemCreated"
    OnRowDrop="SiteMenuGrid_RowDrop">
    <MasterTableView DataKeyNames="MenuID, ParentID, SortOrder" CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add Menu Item" HierarchyDefaultExpanded="true" HierarchyLoadMode="Client" Width="100%">
        <Columns>
            <telerik:GridDragDropColumn UniqueName="DragDropColumn" HeaderStyle-Width="20px"/>
            <telerik:GridBoundColumn DataField="MenuText" HeaderText="Name" UniqueName="Name" />
            <Telerik:GridHyperLinkColumn DataNavigateUrlFields="SitePageID" DataNavigateUrlFormatString="/admin/pageManager/?CID={0}" DataTextField="PageTitle" HeaderText="Page Title" UniqueName="PageTitle"  />
            <telerik:GridBoundColumn DataField="MenuUrl" HeaderText="Url" UniqueName="MenuUrl" />
            <telerik:GridBoundColumn DataField="MenuTarget" HeaderText="Target" UniqueName="MenuTarget" />
            <telerik:GridBoundColumn DataField="IsEnabled" HeaderText="Status" UniqueName="MenuItemEnabled" />
            <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-Width="20px" />
            <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" HeaderStyle-Width="20px" />
        </Columns>
        <EditFormSettings UserControlName="~/includes/userControls/MenuForm.ascx" EditFormType="WebUserControl">
            <EditColumn UniqueName="MenuForm">
            </EditColumn>
        </EditFormSettings>
        <SelfHierarchySettings KeyName="MenuID" ParentKeyName="ParentID" />
    </MasterTableView>
    <ClientSettings AllowRowsDragDrop="true">
        <Selecting AllowRowSelect="true" />
        <ClientEvents OnRowDropping="gridRowDropping" />
    </ClientSettings>
</telerik:RadGrid>

here's my code behind:

private string[] MenuID = { "MenuID", "ParentID", "SortOrder" };
private List<SiteMenu> MenuList = new List<SiteMenu>();
 
protected override void OnInit(EventArgs e)
{
    base.OnInit(e);
    SiteMenuGrid.Skin = "Default";
    SiteMenuGrid.AutoGenerateColumns = false;
    SiteMenuGrid.NeedDataSource += SiteMenuGrid_NeedDataSource;
    SiteMenuGrid.InsertCommand += SiteMenuGrid_InsertCommand;
    SiteMenuGrid.UpdateCommand += SiteMenuGrid_UpdateCommand;
    SiteMenuGrid.DeleteCommand += SiteMenuGrid_DeleteCommand;
    SiteMenuGrid.ItemDataBound += SiteMenuGrid_ItemDataBound;
    SiteMenuGrid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;
    SiteMenuGrid.MasterTableView.CommandItemSettings.ShowRefreshButton = false;
    SiteMenuGrid.ClientSettings.AllowRowsDragDrop = true;
    SiteMenuGrid.ClientSettings.Selecting.AllowRowSelect = true;
    SiteMenuGrid.ClientSettings.ClientEvents.OnRowDropping = "gridRowDropping";
 
    MenuList = new SiteMenu().SelectAllPublicMenuItemsBySiteIDNotDeleted(PCSSession.Current.SiteID);
}
 
protected override void OnLoad(EventArgs e)
{
    base.OnLoad(e);
    if (!IsPostBack)
    {
        SiteMenuGrid.MasterTableView.FilterExpression = "ParentID = 0";
    }
}
 
protected void SiteMenuGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    SiteMenuGrid.DataSource = MenuList;
}
 
protected void SiteMenuGrid_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridNoRecordsItem && e.Item.OwnerTableView != e.Item.OwnerTableView.OwnerGrid.MasterTableView)
    {
        e.Item.OwnerTableView.ParentItem.Expanded = false;
        e.Item.OwnerTableView.ParentItem["ExpandColumn"].Controls[0].Visible = false;
    }
    if (e.Item is GridCommandItem && e.Item.OwnerTableView != SiteMenuGrid.MasterTableView)
    {
        e.Item.Style["display"] = "none";
    }
}
 
protected void SiteMenuGrid_ItemDataBound(object sender, GridItemEventArgs e)
{

}
 
protected void SiteMenuGrid_InsertCommand(object sender, GridCommandEventArgs e)
{

}
 
protected void SiteMenuGrid_UpdateCommand(object sender, GridCommandEventArgs e)
{
}
 
protected void SiteMenuGrid_DeleteCommand(object sender, GridCommandEventArgs e)
{

}
 
protected void SiteMenuGrid_RowDrop(object sender, GridDragDropEventArgs e)
{
    int key = (int)e.DraggedItems[0].GetDataKeyValue("MenuID");
 
    int destinationId = 0;
    int sortOrder = 0;
 
    if (IsUnder.Checked)
    {
        destinationId = (int)e.DestDataItem.GetDataKeyValue("MenuID");
        sortOrder = 1;
    }
    else
    {
        destinationId = (int)e.DestDataItem.GetDataKeyValue("ParentID");
        sortOrder = ((int)e.DestDataItem.GetDataKeyValue("SortOrder")) + 1;
    }
 
    if (destinationId == 0)
    {
        if (key != destinationId)
        {
            MenuList.FirstOrDefault(i => i.MenuID == key).ParentID = destinationId;
            MenuList.FirstOrDefault(i => i.MenuID == key).SortOrder = sortOrder;
 
            foreach (SiteMenu menuItem in MenuList.Where(i => i.ParentID == destinationId))
            {
                if (menuItem.SortOrder >= sortOrder && menuItem.MenuID != key)
                {
                    menuItem.SortOrder += 1;
                }
            }
 
            if (new SiteMenu().UpdateMenuListByParentID(destinationId, MenuList.Where(i => i.ParentID == destinationId).ToList()))
            {
                Response.Redirect("/admin/menuManager/");
            }
        }
    }
    else
    {
        if (key != destinationId && key != MenuList.FirstOrDefault(i => i.MenuID == destinationId).ParentID)
        {
            MenuList.FirstOrDefault(i => i.MenuID == key).ParentID = destinationId;
            MenuList.FirstOrDefault(i => i.MenuID == key).SortOrder = sortOrder;
 
            foreach (SiteMenu menuItem in MenuList.Where(i => i.ParentID == destinationId))
            {
                if (menuItem.SortOrder >= sortOrder && menuItem.MenuID != key)
                {
                    menuItem.SortOrder += 1;
                }
            }
 
            if (new SiteMenu().UpdateMenuListByParentID(destinationId, MenuList.Where(i => i.ParentID == destinationId).ToList()))
            {
                Response.Redirect("/admin/menuManager/");
            }
        }
    }
}
Kevin
Top achievements
Rank 1
 answered on 24 Sep 2012
1 answer
78 views
Hi,

Referring to the link http://www.ximnet.com.my/upload/br_tag_removed_automatically.swf. Browser is IE (9, 10)



1. It is a list.

2. I try to use Shift-Enter to create a line break in one of the item.

3. The line break is removed by editor.

4. I try to put in BR manually and it is removed as well.



Is there a way to stop the BR tag from being removed?



Thanks.

Misho
Telerik team
 answered on 24 Sep 2012
2 answers
95 views
Hi there,

in a HTML table there is two row.
in first row, Calling a new page(.ascx) in which RadMenu Defined.
in Second row, ribbonBar Defined.

Now issue is, 
RadMenu horizontal Drop down popping up underneath of RibbonBar.

this issue persisting with IE7 only.
Kate
Telerik team
 answered on 24 Sep 2012
1 answer
63 views
Is there a way to select a cell (column and row) and position the view to that cell on page load?

I have done row positioning before, but never column.

Thanks,

Terry
Galin
Telerik team
 answered on 24 Sep 2012
1 answer
76 views
Good morning! I'm using Raddock to show some customer information. But I have some problems with the appearance of Raddock, specifically in Internet Explorer just below the title bar. I am attaching a picture with the problem.Thank you!
Bozhidar
Telerik team
 answered on 24 Sep 2012
9 answers
607 views
Hello,

I have a Hierarchical RadGrid with 3 Detail tables nested inside. I'd like to know if it's possible to hide the tables if they have no records instead of showing them with the "No child records to display." message?

Note: I do not want to do this: http://www.telerik.com/help/aspnet-ajax/grdhideexpandcollapseimageswhennorecords.html. I just need to hide tables that might have no records, but one will always have records.

Thanks!
Caleb
Top achievements
Rank 1
 answered on 24 Sep 2012
1 answer
118 views
Hi  ,

My code is below.

  protected void rgDocumentType_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
 {
   TextBox tbFilter=null;
                AjaxControlToolkit.FilteredTextBoxExtender ftExtender;
                if (e.Item is GridFilteringItem)
                {
                    GridFilteringItem fItem = (GridFilteringItem)e.Item;
                    foreach (GridColumn col in rgDocumentType.MasterTableView.Columns)
                    {
                        
                    
                        if (Convert.ToString(col.UniqueName).Equals("colIsModified") == false && Convert.ToString(col.UniqueName).Equals("colActive") == false && Convert.ToString(col.UniqueName).Equals("colCONCUR_ID") == false && Convert.ToString(col.UniqueName).Equals("colRemark") == false)
                        {
                            
                              tbFilter  = fItem[col.UniqueName].Controls[0] as TextBox;
                              tbFilter.ID = col.UniqueName;
                              ftExtender = new AjaxControlToolkit.FilteredTextBoxExtender();
                               ftExtender.TargetControlID = tbFilter.ID;
                               ftExtender.FilterMode = AjaxControlToolkit.FilterModes.InvalidChars;
                               ftExtender.FilterType=AjaxControlToolkit.FilterTypes.Custom|AjaxControlToolkit.FilterTypes.Numbers|AjaxControlToolkit.FilterTypes.LowercaseLetters | AjaxControlToolkit.FilterTypes.UppercaseLetters;
                               ftExtender.InvalidChars = @"%!&;`'\|*?~<>^()[]{}$&quot;";
                               tbFilter.Controls.Add(ftExtender);

                               col.CurrentFilterFunction = GridKnownFunction.Contains;
                               col.AutoPostBackOnFilter = true;

                              
                              
                               ftExtender = null;
                               tbFilter = null;
                            

                                                      
                        }
                       
                    }
                } 


}

This code is used for blocking some special characters in the filter textbox Also prevent pasting.
I set the current filter function here But when clicking on the filter menu button it does not work?

Thanks & Regards
Anzar.M
Eyup
Telerik team
 answered on 24 Sep 2012
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?