Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
161 views
How can I reference to a TextBox inside an EditFormTemplate in Page_Load (if IsPostBack = true) after editing an item in the EditFormTemplate?
Roy Halvorsen
Top achievements
Rank 1
 answered on 13 Aug 2009
4 answers
345 views
Greetings,

I have a checkboxlist on a page to which I am trying to add tooltips to.  I finally managed to find some code that placed them onto it during the load of the page, but whenever I do a postback, they will not return, no matter what I seem to do to them.  Here is the code for what I'm doing.

//I cut out part of the code that does other things, but this is basically the same  
protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!IsPostBack)  
                //CoP is just a Session variable that is pulled into a property  
                LoadValues(CoP);  
 
            LoadTooltips();  
        }  
 
//Called after checkboxlist is built  
private void LoadTooltips()  
        {  
            foreach (ListItem li in cblModules.Items)  
            {  
                var moduleHit = (from a in CoP.Modules where a.ModuleID == Int32.Parse(li.Value) select a.Description).FirstOrDefault();  
 
                if (!string.IsNullOrEmpty(moduleHit))  
                    ToolTipify(li, moduleHit);  
            }  
        } 

When the OnSelectedIndexChanged event is fired, LoadTooltips is called at the end to rebuild the Tooltips for the cblModules.  Unfortunately, nothing happens.  Here is the code I use to build the Tooltips if it helps.

private void ToolTipify(ListItem li, string description)  
        {  
            ContentPlaceHolder con = (ContentPlaceHolder)Master.Master.FindControl("cphContent2");  
            ContentPlaceHolder con1 = (ContentPlaceHolder)con.FindControl("cphCCMContent");  
            RadToolTip tip = new RadToolTip();  
 
            li.Attributes.Add("ID", Guid.NewGuid().ToString());  
              
            tip.RelativeTo = ToolTipRelativeDisplay.Element;  
            tip.Text = description;  
            tip.TargetControlID = li.Attributes["ID"];  
            tip.IsClientID = true;  
            con1.Controls.Add(tip);  
        } 

Again, it works on the first time through, when there is no Postback, but when I cause a Postback (clicking on cblModules), the tooltips vanish.  If anyone has any ideas or a better solution, I'd be very appreciative.

~Chad Johnson
Chad Johnson
Top achievements
Rank 1
 answered on 13 Aug 2009
2 answers
145 views
Hy i have a rad grid, which im using a RadMenu as a context menu with it. All works fine.

The Radmenu Command calls the method "OpenFile(int id)" in the code behind file to as u correctly guess should opens a already on the server stored file in a file stream to the client.

Heres the method:

private void OpenFile(int id) 
        { 
            try 
            { 
                Document doc = BLDocument.GetDocument(id); 
 
                if (File.Exists(doc.Metainformation.filepath)) 
                { 
                    // Create New instance of FileInfo class to get the properties of the file being downloaded 
                    FileInfo file = new FileInfo(doc.Metainformation.filepath); 
  
                    // Clear the content of the response 
                    Response.ClearContent(); 
 
                    // LINE1: Add the file name and attachment, which will force the open/cance/save dialog to show, to the header 
                    Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name); 
 
                    // Add the file size into the response header 
                    Response.AddHeader("Content-Length", file.Length.ToString()); 
 
                    // Set the ContentType 
                    Response.ContentType = ReturnExtension(file.Extension.ToLower()); 
 
                    // Write the file into the response (TransmitFile is for ASP.NET 2.0. In ASP.NET 1.1 you have to use WriteFile instead) 
                    Response.TransmitFile(file.FullName); 
 
                    // End the response 
                    Response.End(); 
                } 
            } 
            catch (Exception ex) 
            { 
 
            } 
        } 

After i reach the Reespnse.End(); line i get following exception:

((System.Threading.ThreadAbortException)(ex)):


{Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.}

Is there any propertie i have to set to be able to give my user the file / filestream ?
Or what can i do to make it work properly?

thx mario
Mario
Top achievements
Rank 2
 answered on 13 Aug 2009
1 answer
178 views
<style type="text/css">
    .FontBlack
    {
        color: black !important;
    }
</style>

<telerik:RadTreeView ID="RadTreeView1" runat="server" Skin="Vista">
<telerik:RadTreeNode Text="a" Enabled="false" DisabledCssClass="FontBlack" >
                                                                    </telerik:RadTreeNode>

I want to display this node with Black font.

Thanks,
Vincent
Shinu
Top achievements
Rank 2
 answered on 13 Aug 2009
6 answers
146 views
Hi
I have a composite control which contains a DateTimePicker control and other child controls.  The composite control is in a visual studio solution which has a class project (for generating the dll of my composit controls) and a web site (for testing the dll).  I can run the composite control in the testing web site.  However, when I include the dll in my other projects, I got the javascript error 

'this.Slots.Month' is null or not an object

when a date or time is selected in the pop up calendar.  In debug mode, it stopped in

parseDate:function(_fe,_ff){
try{
var _100=new Telerik.Web.UI.DateParsing.DateTimeLexer(this.get_dateFormatInfo());
var _101=_100.GetTokens(_fe);
var _102=new Telerik.Web.UI.DateParsing.DateTimeParser(this.get_dateFormatInfo().TimeInputOnly);
var _103=_102.Parse(_101);
_ff=this._getParsingBaseDate(_ff);
var date=_103.Evaluate(_ff,this.get_dateFormatInfo());
return date;
}  <====== stopped here
catch(parseError){
if(parseError.isDateParseException){
return null;
}else{
throw parseError;
}
}
}

I have no clue about what caused the error.  Your help is much appreciated.

Edwin
Ayaz Anwar
Top achievements
Rank 1
 answered on 13 Aug 2009
4 answers
196 views
Hi.

There appears to be a bug with left button in RadRotator.
I've put up a simple horizontal rotator and I have a problem: when rotator is positioned at page 2  - it allows a user to click the left button more then once before it disables it (for the purpose of reaching the begining of the list). What happens is - if a users clicks the left button more then once fast enough - the list ends up out of bounds. This only happens with the left(previous page) button; right(next page) buttons works properly.

I'd appreciate if I could get some help, if there is some way to work around that bug. Thanks.

Here's an example to reproduce the mentioned issue; first, scroll to page 2 and then click left scroll button a couple of times fast:
(Q2 2009 - 701)
<telerik:RadScriptManager runat="server" /> 
<telerik:RadRotator ID="RadRotator1" runat="server" RotatorType="Buttons" WrapFrames="false" Width="540px" Height="135px" ItemHeight="135px" ItemWidth="135px"> 
<ItemTemplate> 
    <div style="background: red; width: 135px; height: 135px;"> 
    TEST 
    </div> 
</ItemTemplate> 
<Items> 
    <telerik:RadRotatorItem ID="RadRotatorItem1" runat="server" /> 
    <telerik:RadRotatorItem ID="RadRotatorItem2" runat="server" /> 
    <telerik:RadRotatorItem ID="RadRotatorItem3" runat="server" /> 
    <telerik:RadRotatorItem ID="RadRotatorItem4" runat="server" /> 
    <telerik:RadRotatorItem ID="RadRotatorItem5" runat="server" /> 
    <telerik:RadRotatorItem ID="RadRotatorItem6" runat="server" /> 
</Items> 
</telerik:RadRotator> 
Fiko
Telerik team
 answered on 13 Aug 2009
2 answers
178 views

This is minor issue, but I have always had problems trying to get the ClientSelectColumn checkboxes center justified in their column. I have the following markup for the column:

I thought that it might have to do with some extra padding, so I tried to apply a style that got rid of padding, but that didn't seem to do much. I have to set the column width to at least 40px to get the checkboxes to appear even close to centered. This causes quite a bit of wasted space to the left and right of the checkboxes.

<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" Resizable="False" > 
                <ItemStyle width="40px" HorizontalAlign="Center" VerticalAlign="Middle" CssClass="GridSelectColumnItem" ></ItemStyle>  
                <HeaderStyle width="40px" HorizontalAlign="Center" VerticalAlign="Middle" BorderStyle="None"></HeaderStyle> 
            </telerik:GridClientSelectColumn> 
 
the style shown is:  
 
.GridSelectColumnItem   
{  
    padding:0;  
    margin:0;  
} 

Albert Shenker
Top achievements
Rank 1
Veteran
Iron
 answered on 13 Aug 2009
3 answers
63 views
We recently upgraded to the new controls.

I like the drop down styling , but it has made my upload boxes and my buttons vanish from the page.  They are still there as I can click where the button should be and it works.

I have chosen not to style buttons as i have my own css - the upload controls do not have any style on them
<telerik:RadFormDecorator ID="RadFormDecorator1" Runat="server"   
        DecoratedControls="CheckBoxes, RadioButtons, Textbox, Textarea, Select" />  

here is a screenshot:    Missing Items

I am stumped - My solution for now is to turn it off, but I hope we can find a better one.
Martin
Telerik team
 answered on 13 Aug 2009
1 answer
410 views
Hi,

I am using RadControl Q1 2009.
I am using RadEditor.

'RadEditor.ExportToPdf()' is used to open pdf in browser.



How can I save the radeditor content as pdf from serverside.?

Thanks


Rumen
Telerik team
 answered on 13 Aug 2009
9 answers
257 views
Hello,

I have a problem when using editor.

I don't know how to upload the attachment. so i just describe the process.

  1. using UpdatePanel in the page
  2. add 2 buttons in the UpdatePanel ContentTemplate
  3. Button1 used for create the radEditor dynamic
  4. when the editor is shown, input some text in the Editor, select all, change the text color, then click anywhere in the edit area(if keep selected state, the issue will disappear)
  5. Button2 can do anything, just make sure it do the asynchronous postback.
  6. when the result is back, click in the edit area, error 800a025e occured.

I personally think the cursor position make the problem.

Browser:IE7
Version:2008.Q3.SP1

Thanks for your reply.
kereal
Top achievements
Rank 1
 answered on 13 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?