Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
96 views
top RadRotator using mycustomskin (as set up like http://www.telerik.com/help/aspnet-ajax/rotator-css-classes-and-their-use.html); second RadRotator not using custom skin - problem: 2nd radRotator picking up css from the first.
Slav
Telerik team
 answered on 10 Sep 2012
1 answer
125 views

I have a combo box that is set to AllowCustomText = "True", however, I just cant seem to get it to clear. Here is my code:

<telerik:RadComboBox ID="rcb_Users" Runat="server" AutoPostBack="True"
    DataSourceID="sds_UserList" DataTextField="UserName"  AllowCustomText = "True"
    DataValueField="UserName" EmptyMessage="Select User" Height="150px"
    Skin="WebBlue" EnableAutomaticLoadOnDemand="True" EnableVirtualScrolling="True"
    ItemsPerRequest="100" ShowMoreResultsBox="True" OnClientKeyPressing="HandleKeyPressUN">
</telerik:RadComboBox>


Private Sub ClearRCB_LUUserName()
 
    rcb_Users.ClearSelection()
    rcb_Users.Text = String.Empty
 
End Sub


Any help much appreciated.

Nencho
Telerik team
 answered on 10 Sep 2012
2 answers
237 views
Hi,
i have a radgrid which is exceeding the page size when i gave the width in "%". if i gave width in pixels it is not displaying according to page resolution.

plz suggest me how to override the style properties of radgrid.
 <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="SampleGrid">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="SampleGrid" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="clrFilters">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="SampleGrid" />
                        <telerik:AjaxUpdatedControl ControlID="clrFilters" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <div id="divDefCols" style="height: 1600px; width: 100%; min-width: 730px; overflow-x: auto;
            overflow-y: auto; border: 1px solid;">
            <asp:LinkButton runat="server" ID="btnSaveSettings" Text="Set as Default setting"
                Font-Bold="false" Font-Size="Small" Width="150px" OnClick="btnSaveSettings_Click" />
            <asp:Image runat="server" ID="InfoImage" Visible="false" EnableViewState="false"
                Style="float: left;" ImageUrl="Images/UpdateActivity.gif" /><asp:Label runat="server"
                    ID="StatusLabel" Font-Bold="false" Font-Size="Small" ForeColor="Red" EnableViewState="false"></asp:Label>
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1"
                Width="190px">
             
                        <telerik:RadGrid ID="SampleGrid" EnableAJAX="True" EnableAJAXLoadingTemplate="True"
                            LoadingTemplateTransparency="50" Skin="Office2007" runat="server" AllowSorting="True"
                            AllowFilteringByColumn="True" AllowPaging="True" ShowFooter="True" ShowHeader="true"
                            CellSpacing="0" OnNeedDataSource="SampleGrid_NeedDataSource" OnColumnCreating="SampleGrid_ColumnCreating"
                            OnItemDataBound="Sample_ItemDataBound" OnItemCommand="SampleGrid_ItemCommand"
                            PageSize="50" GridLines="Vertical" AutoGenerateColumns="false" ShowSortIcon="true"
                            Height="900px" ShowGroupPanel="True">
                            <ClientSettings AllowDragToGroup="True">
                            </ClientSettings>
                            <FilterMenu EnableImageSprites="False">
                            </FilterMenu>
                            <MasterTableView EnableHeaderContextMenu="true">
                                <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                                    <HeaderStyle Width="20px"></HeaderStyle>
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                                    <HeaderStyle Width="20px"></HeaderStyle>
                                </ExpandCollapseColumn>
                                <EditFormSettings>
                                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                    </EditColumn>
                                </EditFormSettings>
                                <HeaderStyle Height="40px" Width="100px" />
                                <ItemStyle Height="30px" Width="100px" Wrap="False" />
                                <AlternatingItemStyle Height="30px" Width="100px" Wrap="False" />
                                <PagerStyle NextPageText="&amp;gt;" PrevPageText="&amp;lt;" AlwaysVisible="true"
                                    Mode="NextPrevAndNumeric"></PagerStyle>
                            </MasterTableView>
                            <ClientSettings AllowColumnHide="true" AllowColumnsReorder="True" ColumnsReorderMethod="Swap">
                               
                            </ClientSettings>
                        </telerik:RadGrid>
                   
            </telerik:RadAjaxPanel>
            <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
            </telerik:RadScriptBlock>
        </div>

Adv thxs,
Balaji
Maria Ilieva
Telerik team
 answered on 10 Sep 2012
0 answers
97 views
Hi ,
i am using a telerik radGrid and i invoke the exportExcel fonctionality  , when exporting i catch the event and i try to saving the result excel file in my disq , My problem is in using french caracter ( é , à , ... ) in grid column title who make chines carracter in my excel file . 

protected void GridPJ_GridExporting(object source, GridExportingArgs e)
{
 
 
    string path = ((CImport)Session["CImport"]).sFileExcel;
         
        
 
    using (FileStream fs = File.Create(path))
     
    {
       Byte[] info = System.Text.Encoding.Default.GetBytes(e.ExportOutput);
        fs.Write(info, 0, info.Length);
 
         
    }
    Session["Export"] = true;
    Response.Redirect(Request.Url.ToString());
 
}



thank's for reply . 
Sofiene
Top achievements
Rank 1
 asked on 10 Sep 2012
2 answers
106 views
Hello guys,

Really love the FileExplorer, but I'd like to tinker with the Thumbnails functionality. In its current state the thumbnail is just a link to the original image. Since I use the FileExplorer control to serve up a gallery of hi-res stock images, my page basically downloads twenty-megabyte JPEGs as "thumbnails". This also results in ugly compression artifacts and distortions as the browser uses its own algorithm to compress the image.

Is there any way to override the thumbnail display functionality either on the client side or on the server side? For example, if I could point the thumbnails to an ASP.NET handler instead of the images themselves I'd be all set to go since I could perform my own high-quality resizing on the server side and serve up small, good quality thumbnails.

Any ideas?
Balint
Top achievements
Rank 1
 answered on 10 Sep 2012
1 answer
46 views
Hi,

 For ex, I am getting the output from editor.get_html() like "aaa <span class='masked'>bbb</span> ccc". I need the index of ccc from the html which i got from editor. Please share it.
Princy
Top achievements
Rank 2
 answered on 10 Sep 2012
1 answer
69 views
Is it possible to save the entire RibbonBar in a Session variable and use it on page load?
I tried the following but on PostBack it fails.

if (!Page.IsPostBack)
{
 TCMenu _rb = new TCMenu();
 _rb.InitRibbonBar(ref trans_RibbonBarMenu); //dynamically adding tabs, groups and buttons - see code below
 Session["Test"] = trans_RibbonBarMenu;
}
else
{
 trans_RibbonBarMenu = (Session["Test"] as RadRibbonBar);
}


public void InitRibbonBar(ref RadRibbonBar ribbonBar, string formName, int userLevel)
 
{
 
    CriteriaOperator filter;           
 
    filter = CriteriaOperator.Parse(String.Format("FormName = '{0}'", formName));
 
  
 
    XPCollection _xpoObjects = new XPCollection(DbUtils.GetDefaultSession, typeof(XPOMenuSettings), filter, null);
 
  
 
    SortProperty TabSortOrder = new SortProperty("TabSortOrder", DevExpress.Xpo.DB.SortingDirection.Ascending);
 
    _xpoObjects.Sorting.Add(TabSortOrder);
 
  
 
    SortProperty GroupSortOrder = new SortProperty("GroupSortOrder", DevExpress.Xpo.DB.SortingDirection.Ascending);
 
    _xpoObjects.Sorting.Add(GroupSortOrder);
 
  
 
    SortProperty sortOrder = new SortProperty("SortOrder", DevExpress.Xpo.DB.SortingDirection.Ascending);
 
    _xpoObjects.Sorting.Add(sortOrder);
 
  
 
    RibbonBarTab rbt;
 
    RibbonBarGroup rbg;
 
  
 
    foreach (XPOMenuSettings _xpoButton in _xpoObjects)
 
    {
 
        bool rbt_found = true;
 
        bool rbg_found = true;
 
          
 
        rbt = ribbonBar.FindTabByValue(_xpoButton.TabValue);
 
        if (rbt == null)
 
        {
 
            rbt = new RibbonBarTab();
 
            rbt.ID = _xpoButton.TabId;
 
            rbt.Text = _xpoButton.TabText;
 
            rbt.Value = _xpoButton.TabValue;
 
            rbt_found = false;
 
        }
 
  
 
        rbg = ribbonBar.FindGroupByValue(_xpoButton.GroupValue);
 
        if (rbg == null)
 
        {
 
            rbg = new RibbonBarGroup();
 
            rbg.ID = _xpoButton.GroupId;
 
            rbg.Text = _xpoButton.GroupText;
 
            rbg.Value = _xpoButton.GroupValue;
 
            rbg_found = false;
 
        }
 
  
 
        RibbonBarButton rbb = new RibbonBarButton();
 
        rbb.Size = (RibbonBarItemSize)_xpoButton.Size;
 
        rbb.Text = _xpoButton.Text;
 
        rbb.Value = _xpoButton.Value;
 
        rbb.ID = _xpoButton.Id;
 
        rbb.ImageUrl = _xpoButton.ImageUrl;
 
        rbb.ImageUrlLarge = _xpoButton.ImageUrlLarge;
 
        rbb.Visible = _xpoButton.Visible && (_xpoButton.UserLevel >= userLevel);
 
  
 
        rbb.Width = 80;
 
  
 
        rbg.Items.Add(rbb);
 
        if (!rbg_found)
 
            rbt.Groups.Add(rbg);
 
        if (!rbt_found)
 
            ribbonBar.Tabs.Add(rbt);
 
    }
 
}

Clientside works fine, but as soon as I click a button that calls serverside, I get the following error message:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) +64
   System.ThrowHelper.ThrowArgumentOutOfRangeException() +15
   System.Collections.Generic.List`1.get_Item(Int32 index) +7500084
   Telerik.Web.UI.RadRibbonBar.RaisePostBackEvent(String eventArgument) +272
   Telerik.Web.UI.RadRibbonBar.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +39
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

Bozhidar
Telerik team
 answered on 10 Sep 2012
4 answers
122 views
this is my aspx code

 <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="100%" Width="100%" LoadingPanelID="LoadCombo" >
                            <div class="leftContainerIn">
                                <telerik:RadListBox ID="rlbAvailable" runat="server" Width="100%" AllowTransfer="true"
                                   TransferToID="rlbChosen" SelectionMode="Multiple"
                                  AllowTransferOnDoubleClick="true"
                                    


                                    Height="100%" EnableDragAndDrop="true" DataValueField="FieldId" DataTextField="tempHeader"
                                    Sort="Ascending" OnClientTransferring="rlbAvailable_OnClientTransferring" AutoPostBackOnTransfer="true"
                                    OnTransferred="rlbAvailable_OnTransferred" ButtonSettings-ShowTransferAll="true">
                                </telerik:RadListBox>
                            </div>
                            <div class="rightContainerIn">
                                <telerik:RadListBox ID="rlbChosen" runat="server" Sort="Ascending" Width="100%" Height="100%"
                                    AutoPostBack="true" OnSelectedIndexChanged="rlbChosen_SelectedIndexChange" SelectionMode="Multiple"
                                    EnableDragAndDrop="true"  AllowTransferOnDoubleClick="false"
                                    AllowReorder="true" DataTextField="tempHeader" DataValueField="FieldId" TransferToID="rlbAvailable">
                                </telerik:RadListBox>
                            </div>
                        </telerik:RadAjaxPanel>

this is my cs code

 protected void rlbAvailable_OnTransferred(object sender, RadListBoxTransferredEventArgs e)
        {
            try
            {


                List<smDocumentTypeField> avalible = FieldsOrganization;
                List<smDocumentTypeField> documentTypeFields = DocumentTypeField;


                if (e.DestinationListBox != sender) // from left to right
                {
                    foreach (RadListBoxItem ite in e.Items)
                    {
                        int id = Convert.ToInt32(ite.Value);
                        documentTypeFields.Insert(0, GetField(FieldsOrganization, id));
                        avalible.Remove(GetField(FieldsOrganization, id));


                    }


                   
                }
                else if (e.DestinationListBox == sender)// from right to left
                {
                    foreach (RadListBoxItem ite in e.Items)
                    {
                        int id = Convert.ToInt32(ite.Value);


                        avalible.Insert(0, GetField(DocumentTypeField, id));
                        documentTypeFields.Remove(GetField(DocumentTypeField, id));
                    }
                }


               FieldsOrganization = avalible;
                DocumentTypeField = documentTypeFields;
                rlbChosen.DataBind();
                rlbAvailable.DataBind();
            }
            catch (Exception ex)
            {
                Notification.LoadCatchNotification(ex, typeof (DocumentTypeForm).FullName);
            }
        }


this event does not execute when i did double click on radlistboxitem, Why?

I need help!!


regards

Bozhidar
Telerik team
 answered on 10 Sep 2012
1 answer
92 views
Hi All,

I've not had much experience with the rad controls, but what I see so far is pretty good.

I did some searching online, but either was using the wrong search terms or what I want to do is not possible.

I have a listbox on a page.  What I want to do is bind it to a linq datasource with checkboxes filled in from the datasource.

I'm hoping that I can pass in a datasource with 3 columns:

ReceivedEmail: Boolean
ClientID: Int
ClientName: String

True-1-Fred Smith
True-2-Betty White
False-3-Amy Whinehouse

This would produce a list with the three names and the first 2 items checked without any extra work in code...

I was talking to one of the other guys I work with and he said that he usually binds to a datasource and then loops through all the list items after binding has finished and then sets the checked flag..
This seemed a little inefficient, and figured that if the control handled it, why not do it in one go..

Does this make sense..??  Can it be done already..???

Many thanks
Ivana
Telerik team
 answered on 10 Sep 2012
0 answers
92 views
hi ,
kindly help me when i used drag drop in rad grid the destination grid sometimes =null 
i used this demo
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/draganddrop/defaultcs.aspx 

and args.get_destinationHtmlElement().id sometimes = the row that i selected it to drop it not the destination element 
even if  i dropped it at  the destination grid .
kindly help me ,
if i got the row index that i dropped on it i will solve my problem ,
how to get it ,
i tried all the methods
http://www.telerik.com/help/aspnet-ajax/grid-onrowdropping.html 
 
Ashraf
Top achievements
Rank 2
 asked on 09 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?