Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
83 views
When I select the "Columns" sub-menu of the Header Context Menu, it shows a list of all the columns exactly the way each column appears in the header of my grid.  But many of my column headers are stacked type, sometimes 3 or 4 lines high, and, unfortunately, they're broken the same way in the "Columns" sub-menu, which looks bad and is difficult for the user to understand and use.  Is there any way to change the type that appears in the sub-menu?  I would like each column name to appear on one line in order to make the sub-menu more user friendly.

Thanks,
Tim
Tim
Top achievements
Rank 1
 answered on 13 Oct 2009
4 answers
189 views
Hi,

I would like to run some Javascript directly *after* the RadControls are created on the client-side. If I use "ScriptManager.RegisterStartupScript" then the javascript is inserted *before* the RadControls are created.

What I am ultimately trying to do is get a "handle" to all of my client-side RadControls. I know that I can call $find to get them, but I prefer to assign them all to variables on page load then access those variables. Here is an example:

The javascript should be generated on the server like this:

js =

"var BAN = $find('" + BAN.ClientID + "'); ";

 

 

ScriptManager.RegisterStartupScript(this, this.GetType(), "InitControls", js, true);

 


Now, on the client, I could just access "BAN.get_value()". The problem, of course, is that "$find" fails to find the control because this script executes before the client-side control is created. To work-around the problem I am currently doing a two step process (declare the variables then assign them during page load) like this:

string js = "var BAN, CompanyName, Contact, Address1, Address2, City, State, Zip, LocalBAN, Phone, Email; ";  
ScriptManager.RegisterClientScriptBlock(thisthis.GetType(), "DeclareControls", js, true);  
 
js  = "BAN = $find('" + BAN.ClientID + "'); ";  
js += "CompanyName = $find('" + CompanyName.ClientID + "'); ";  
js += "Contact = $find('" + Contact.ClientID + "'); ";  
js += "Address1 = $find('" + Address1.ClientID + "'); ";  
js += "Address2 = $find('" + Address2.ClientID + "'); ";  
js += "City = $find('" + City.ClientID + "'); ";  
js += "State = $find('" + State.ClientID + "'); ";  
js += "Zip = $find('" + Zip.ClientID + "'); ";  
js += "LocalBAN = $find('" + LocalBAN.ClientID + "'); ";  
js += "Phone = $find('" + Phone.ClientID + "'); ";  
js += "Email = $find('" + Email.ClientID + "'); ";  
ScriptManager.RegisterClientScriptBlock(thisthis.GetType(), "InitControls""function InitControls() {" + js + "}"true);  
ScriptManager.RegisterStartupScript(thisthis.GetType(), "InitControlsCall""Sys.Application.remove_load(InitControls); Sys.Application.add_load(InitControls);"true);  
 

If I could just get my javascript to run *after* the RadControls are created I could clean this up a bit.

Thanks!
Scott

P.S. It would be nice to be able set a property on the control (e.g. RadControl.ClientSideId) and have the control do this for us automatically!
Martin
Telerik team
 answered on 13 Oct 2009
2 answers
95 views
Hi all

I have an interesting issue I hope someone has an answer for.

I have a situation where I have two types of records, Full and Split. A full record may have from 0 to 3 split records. I want to display the full records and the splits in a detail table under the associated full record. That part is easy.

Here is the fun part...
According to the business rules:
1) If a full record is assigned, then the associated splits should be unavailble for assignment
2) If a split record is selected, then the parent full record should be unavailable for assignment.

I think I can accomplish rule #1 when databinding the detail table. I need to check to see that a person has been assigned to the full record. If so, I can either prevent the detailtabledatabind entirely, or disable the assign button for each detail record.

I am unsure, however, as to how to approach rule #2. Is there a way to get at the parent record when doing some sort of ItemDataBound on the detail table? That way I can see if a detail record has been assigned and turn off the assign button in the parent record.

Thanks for any and all help!
Bruce
Bruce
Top achievements
Rank 1
 answered on 13 Oct 2009
2 answers
65 views
     I have an ajaxed grid, but I can't get the pager to show at all. I've tried everything I can find, setting 'AllowPaging' to True, 'AllowCustomPaging' to true, 'PagerAlwaysVisible' true, 'ShowFooter' true, and various combinations of the above in various parts of the grid (inside the grid tag, inside the mastertableview tag, etc.) but nothing! What's holding the pager back?
Michael H.
Top achievements
Rank 1
 answered on 12 Oct 2009
2 answers
142 views
Hello,

I have a problem with the tooltip positioning with some elements on my page.  I am using the TooltipManager and execute a method on the OnAjaxUpdate event.  This method will dynamically set the text of the tooltip based on the item and the client's access.  The text will either be one sentence long or one paragraph long.  If it is one sentence long it works fine, if it is one paragraph it does not position correctly.  I have Animation set to 'none'.  Before it was set to 'fade', this worked but it was slow and initially it was positioned wrong but after a second was positioned correctly.   How do I get this to position correctly with Animation set to 'none'.  Here is my sample code: 

<telerik:RadToolTipManager  ID="rttmTooltip"
                            runat="server"
                            Height="50px"
                            Width="300px"
                            ShowEvent="onMouseOver"  
                            HideEvent="LeaveToolTip"
                            Animation="None"
                            Position="MiddleRight"
                            RelativeTo="Element"
                            OffsetY="-3"  
                            OnAjaxUpdate="rttmTooltip_AjaxUpdate"
                            Skin="Vista"
                            AutoCloseDelay="200000" >
        <TargetControls>
            <telerik:ToolTipTargetControl IsClientID="false"  TargetControlID="dApples" value="Apples"/>
            <telerik:ToolTipTargetControl IsClientID="false"  TargetControlID="dBananas" value="Bananas"/>
            <telerik:ToolTipTargetControl IsClientID="false"  TargetControlID="dPears" value="Pears"/>
            <telerik:ToolTipTargetControl IsClientID="false"  TargetControlID="dOranges" value="Oranges"/>
        </TargetControls>
        </telerik:RadToolTipManager>

Thanks,

Michael
Michael
Top achievements
Rank 1
 answered on 12 Oct 2009
1 answer
110 views
I'm getting the following error in when I try to set the toolsfile as an embedded resource. The resource can be accessed by requesting the URL directly, so I know I have that configured correctly.

Below is the error message I'm getting. Any thoughts?

Edit: The embedded resource is located in an assembly with the server control that is loading the embedded resource:
  • A web site uses a custom server control with an encapsulated radeditor
  • The server control is contained in separate assembly
  • The server control sets the ToolsFile property to using the GetWebResource method

Heres's the ref. in assemblyinfo.vb:

 

<Assembly: WebResource(

"[AssemblyName].FullToolsFile.xml", "text/xml")>

 

I've tried creating the toolsfile.xml with and without the XML declaration. There is no difference in the error.
 

Server Error in '/Support.SyscomGM.com' Application.  
--------------------------------------------------------------------------------  
 
'~/WebResource.axd?d=aaW8Z0muXD8UCgD1F5rh6NrswGUH-n32h7QL8r5EKe4JkUGyDvia1dpgWW9Lmj2o0&t=633909254677368497' is not a valid virtual path.   
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.   
 
Exception Details: System.Web.HttpException: '~/WebResource.axd?d=aaW8Z0muXD8UCgD1F5rh6NrswGUH-n32h7QL8r5EKe4JkUGyDvia1dpgWW9Lmj2o0&t=633909254677368497' is not a valid virtual path.  
 
Source Error:   
 
 
Line 470:  
Line 471:           If Not String.IsNullOrEmpty(EditorToolsFile) Then  
Line 472:               HtmlEditor.ToolsFile = EditorToolsFile 
Line 473:           Else  
Line 474:  
   
 
Andrew Benson
Top achievements
Rank 2
 answered on 12 Oct 2009
2 answers
107 views

Guys,

I need to style content area so it looks like a page in a Word document (gray padding outside with white page in a middle). White space in middle needs to have a specific size. Let’s say 400X600. To accomplish this I created css for ContentAreaCssFile as follows


body {background-color#a5a5a5!important;} 

.PagePlaceholder

 

{background-image: url(images/pageBG.png); background-repeat:no-repeat;background-position: center top;

 

 

padding: 20px; margin:20px; }

 


The problem is that as soon as I set a height on PagePlaceholder class and click on that region in the editor It gets selected ( borders around it appear ) in IE 7 and 8. Work fine in FF. that selection makes it difficult to edit content that’s inside of PagePlaceholder div. can you please help me out here.

 
Thank you!

Orest
Top achievements
Rank 1
 answered on 12 Oct 2009
1 answer
116 views
The traditional listbox allows you to scroll the items with the mouse wheel whenever the mouse is hovered over it. How do I mimc that behavior here?

Thanks,
Andrew
Andrew Ryan
Top achievements
Rank 1
 answered on 12 Oct 2009
5 answers
124 views
I have a RadUpload control inside an UpdatePanel with UpdateMode set to conditional, and the RadUpload has a TargetPhysicalFolder specified.  I specify an image to upload, and then in the FileExists event save the name of the file to a label control (so I can write the location to a DB).  This works fine.

If I browse back to the page, and try to upload another file to in a sense change the uploaded file, the FileExists event does not fire again so I can't write the filename to the label and update it in the database.

[code]

<

 

asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">

 

 

<ContentTemplate>

 

 

<telerik:RadUpload ID="RadUploadLogo" runat="server" EnableAjaxSkinRendering="False"

 

 

EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False"

 

 

TargetPhysicalFolder="C:\Test"

 

 

EnableFileInputSkinning="False" CssClass="formfields" AllowedFileExtensions=".gif"

 

 

ControlObjectsVisibility="None" onfileexists="RadUploadLogo_FileExists">

 

 

</telerik:RadUpload></ContentTemplate></asp:UpdatePanel>

 

protected

 

void RadUploadLogo_FileExists(object sender, Telerik.Web.UI.Upload.UploadedFileEventArgs e)

 

{

lblUploadFileName.Text =

String.Format("C:\\Test\\{0}", e.UploadedFile.GetName());

 

}

[/code]

Is there a way to make the FileExists event fire again?

Samantha
Top achievements
Rank 1
 answered on 12 Oct 2009
2 answers
409 views
hello ,
i have a grid with item nested template can i rasise expand row on row click client event ?
Michael
Top achievements
Rank 2
 answered on 12 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?