Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
228 views
Hello,

Is it possible to cause text to trim with (...) on a combo box for the visible text when the combobox is closed?

We're using the combo boxes where the text can be 100 characters in length.  When selecting the items from the combo box this is not a problem because it can wrap or we can do other things.

If we have test such as:"

A really long long long long description

Instead of being just trimmed we would like it to display

A really long lon...   

I know how to do this for silverlight or WPF.  Can we do something with asp.net Ajax controls?
Yana
Telerik team
 answered on 28 Oct 2010
1 answer
120 views
I have a page with essentially three user controls:
1) Contains only a listbox for selection of a location
2) Contains only a date picker.
3) Contains a grid which dynamically changes based on the selections above.

For the date picker we're limiting selection to the "first" day of the week, which may be different depending on the location.  The styling of the first day is different than other days so users know what can be clicked.  So there is an event attached to 4-5 dates per month, and some custom styling.

If date selection is limited to something like 2 months back and 1 month forward, the unique styling is limited, so the control weighs in at only about 11k.  Recently the client asked to allow selection to go back up to one  year back and any time in the future.  After this change the control consumed close to 7MB and overall app performance tanked.  The client is now reconsidering whether that's a "nice to have" feature or a real requirement.  I suspect they will prefer better performance over a long-term date selection.

But I'd like to work out the best way to approach this.  I'm thinking I can limit the control to a few months back and forward, and when they click on Previous or Next outside of the current scope, I can use code behind to regenerate the control with a wider range in the chosen direction.  But that requires more postbacks and that itself will affect performance.

So is there an elegant way to go about managing this?  What about some in-depth detail on doing this on the client side?  Is this a good application for some rigorous JavaScript?

Another thing I'm thinking is that for this specific application we don't really need to see every day of every week, since they can only select one day from any week.  Can we limit the number of days displayed in the calendar control, or might I need to create/find a custom control that elegantly renders only the first day of every week?

Thanks!
Dimo
Telerik team
 answered on 28 Oct 2010
2 answers
145 views
I'm looking for a way to take the selected file in teh FileExplorer and grab it's file path and make it availble in the clipboard as a copy/paste.

If the file has been uploaded to a folder location like /Documents/Secured/Downloads/ and the file name is Fall2010.pdf. I want to be able to copy that full path including the filename and paste the text (not the actual file) into a text box in another window of my CMS tool.

I have a working solution using the zeroClipboard solution, Flash and jQuery. It works but several of my users are running into a problem where the computer clipboard is not updating and the copy of a new file path is failing. I've reinstalled Flash on those PC's and it's still very hit or miss.


Are there any methods already available in the FileExplorer that I may be overlooking? Has anyone implemented a different solution that works?


Looking closer at the tool, I see that the current folder path is displayed below the menu bar. But when I select a file the path doesn't update. That would be a good workaround if the path updated. I'll look at the docs and forum posts to see if I can do this.
Craig Tarr
Top achievements
Rank 2
 answered on 28 Oct 2010
1 answer
122 views
Please see attached. When I click on the dropdown list inside the radtoolbarbutton itemtemplate, the entire toolbarbutton closes. How do I keep it open? I only want it to close if the user clicks outside of the radtoolbarbutton area.

Thanks!
Yana
Telerik team
 answered on 28 Oct 2010
3 answers
206 views
I have a page that is fairly large and broken up into tabs with RadTabStrip and RadMultiPage. Each PageView in the multipage is a usercontrol. The hosting page uses MS Ajax to host a javascript application that the child usercontrols leverage. So it's a fairly complex page. To make matters worse I have a scenario where I need to postback and load two more tabs and make one of those tabs and the corresponding multipage the active tab. I use RadAjaxManager to do this. The button that initiates this action is in a RadToolBar.

I have two AjaxSettings that wire up the toolbar to the tabstrip and the multipage control. The only way I've been able to get it to work is to wire up the ajax setting to the RadMultiPage control. The downside to this is that it is very slow now when anything is done in the toolbar because it has to reload the entire multipage rather than just the appropriate portions. On one hand it makes sense that the ajax setting has to be wired up to the entire multipage control, but I sure wish it didn't have to be and figured I'd see if someone had a better idea on how to do this.

Another reason why I'm asking is that I get the pesky IE prompt "a script on this page is causing internet explorer to run slowly" which I'm sure has to do with all the javascript I have in the hosting page and the usercontrols that have to be reloaded each time a toolbar button is pressed.

Note that I can't use the RadMultiPage capability of loading each page on demand because I need the switching of tabs be really fast (except for the two tabs that are loaded by the toolbar buton). My users are on the phone with customers when they are on this page so they need to be able to switch around really fast to enter data or answer questions.
Sathish
Top achievements
Rank 1
 answered on 28 Oct 2010
2 answers
131 views
Hi!  Is it possible to customize the display of the RadFilter so that the filter displays continuously along one line rather than indenting on separate lines?  If so, could someone point me to an example?

Thank you!
Amy
Top achievements
Rank 1
 answered on 28 Oct 2010
3 answers
80 views

HI  ALL

I have a  text box in  edit item template in a rad grid

during the edit mode i fill this  text box with the selected node of the  RAD tree .

 not able to find the text box during the edit mode whereas during insert its working fine.



    protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e)
    {

        RadTreeView TreeNode = (RadTreeView)TreeControle.FindControl("RadTreeView1");
            -------------------------THIS PART IS WORKING FINE--------------------------------------
              if (rdUserlist.MasterTableView.IsItemInserted == true)
            {

                TextBox txtCb1 = (TextBox)rdUserlist.MasterTableView.GetInsertItem().FindControl("txtCb");
                txtCb1.Text = SLName;               

            }
            else  
            {

                --------------------NOT ABLE TO FIND THE TEXT BOX  DURING EDIT ------------------------------------------------
                -----------------OBJECT REFRENCE ERROR -----------------------------------------------------

                TextBox txtCb1 = (TextBox)rdUserlist.MasterTableView.EditItem.FindControl("txtCb");
                txtCb1.Text = SLName;  
               
            }
            TreeNode.CollapseAllNodes();
            TreeNode.ClearSelectedNodes();
                  }
    
    }

 


Thanks


Shinu
Top achievements
Rank 2
 answered on 28 Oct 2010
1 answer
370 views
How to make UpdatePanel work with telerik RadGrid?

 <div>
   <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <telerik:RadGrid ID="uiUserGrid" runat="server" GridLines="None"
                AllowPaging="True" AllowSorting="true" PageSize="20" EnableEmbeddedBaseStylesheet="True"
                EnableEmbeddedSkins="false" ImagesPath="~/_layouts/global/radcontrols/Grid/MyLink" >
  <HeaderStyle ForeColor="White" />
        </telerik:RadGrid>
   
        </ContentTemplate>
     </asp:UpdatePanel>
    </div>
Sebastian
Telerik team
 answered on 28 Oct 2010
3 answers
53 views
Help,

Im trying to create RadTabs and RadGrids dynamically based on database entries.  I also want the RadGrid to postback on double click of the row.  I've tried creating javascript methods for each grid to handle the Double Click Event but the issue I run into is that the $find function cannot find my programitaccally created grids to get their UniqueID.  Is what Im trying to accomplish possible?  Some of my code is below.

Panel GridPanel = new Panel();
  
EntityDataSource NewEDS = CreateDataSource(Tab);
  
GridPanel.Controls.Add(NewEDS);
  
RadGrid NewRG = new RadGrid();
NewRG.ID = "rg" + Tab.WebTabId.ToString();
NewRG.AutoGenerateColumns = true;
NewRG.DataSourceID = NewEDS.ID;
NewRG.MasterTableView.TableLayout = GridTableLayout.Fixed;
NewRG.ClientSettings.Scrolling.AllowScroll = true;
NewRG.ClientSettings.Scrolling.UseStaticHeaders = true;
NewRG.ClientSettings.Selecting.AllowRowSelect = true;
  
GridPanel.Controls.Add(NewRG);
  
string jsText = "function " + NewRG.ID + "_DblClick(sender, eventArgs) {$find('" + RadAjaxManager.ClientID + "').ajaxRequestWithTarget('" + NewRG.UniqueID + "','Select');}";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(),NewRG.ID + "_DblClick", jsText,true);
NewRG.ClientSettings.ClientEvents.OnRowDblClick = NewRG.ID + "_DblClick";

Thanks for any help in advance.
Mira
Telerik team
 answered on 28 Oct 2010
1 answer
161 views
Hi
I want to use Asp:CheckBox in RadComboBox that users can select any item from my RadComboBox items
I use this Asp code:
<telerik:RadComboBox ID="drpEmailAddress" runat="server"
    Width="98%" Skin="Outlook"
    EmptyMessage="Select" EnableLoadOnDemand="True" ShowMoreResultsBox="true"
    EnableVirtualScrolling="true" EnableAutomaticLoadOnDemand="true" OnItemsRequested="drpEmailAddress_ItemsRequested">
    <ItemTemplate>                                        
        <asp:CheckBox runat="server" ID="chkAddress" Text='<%#Eval("Address")%>'/>
    </ItemTemplate>                                                        
</telerik:RadComboBox>

and this Cs Code for ItemsRequested event:
protected void drpEmailAddress_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
    var q = GetData(e.Text);
    int itemOffset = e.NumberOfItems;
    int endOffset = Math.Min(itemOffset + 20, q.Count);
    e.EndOfItems = endOffset == q.Count;
    e.Message = GetStatusMessage(endOffset, q.Count); 
      drpEmailAddress.DataTextField = "Address";
      drpEmailAddress.DataValueField = "AddressId";

    drpEmailAddress.DataSource = q.Take(20);
    drpEmailAddress.DataBind();
}

 

private static string GetStatusMessage(int offset, int total)

 

{

 

  if (total <= 0)

 

 

    return "Nothing found";

 

 

  return String.Format(" <b>1 </b> <b>{0} </b> <b>{1}</b>", offset, total);

 

}


When users selecting items (checking CheckBox) i can't get selected items in my CS code!!!
I use this code for get selected items in my Cs:
protected void btnSend_Click(object sender, EventArgs e) 
    var q = (from a in drpEmailAddress.Items 
                     where (a.FindControl("chkAddress") as CheckBox).Checked 
             select a).ToList();
}

but q is empty!!!
Calleigh
Top achievements
Rank 1
 answered on 28 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?