Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
151 views
Hello everyone!

This is my case!

I have a rad menu inside a radtab, but the child items dosen't show! it's hide behind a div!

Here's the code: 

<asp:Content ID="Main" runat="server" ContentPlaceHolderID="MainContent">
    <asp:ScriptManager ID="srm" runat="server">
    </asp:ScriptManager>
    <center style="z-index: 0"> 


        <telerik:RadTabStrip runat="server" Skin="Black" ClickSelectedTab="True" AutoPostBack="True" 
            SelectedIndex="0" MultiPageID="rmpView" Align="Center" style="z-index: 1; position: relative !Important">
            <Tabs>
                <telerik:RadTab Text="Home" PageViewID="rpView1" Width="150px">
                    
                </telerik:RadTab>
                <telerik:RadTab>
                    <TabTemplate>
                    <center>
                        <telerik:RadMenu ID="RadMenu1" Skin="Black" runat="server" Width="150px">
                            <Items>
                                <telerik:RadMenuItem Text="Suas Lendas" Width="100%">
                                    <Items>
                                        <telerik:RadMenuItem Text="Jack Dempsey" >
                                        </telerik:RadMenuItem>
                                    </Items>
                                </telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenu>
                        </center>
                    </TabTemplate>
                </telerik:RadTab>
                <telerik:RadTab Text="Prodtos" PageViewID="RadPageView1" Width="150px" />
            </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="rmpView" runat="server" style="z-index:0">
            <telerik:RadPageView ID="rpView1" runat="server" Selected="True">
                <div style="border-radius: 1em; background-color: #DDDDDD; opacity: 0.65; width: 800px;
                    height: 300px; float: center;">
                    <div style="padding: 25px 5px 25px 5px;">
                        <center>
                            <video width="520" height="240" controls="controls">
                <source src="../videos/EVERLAST COMMERCIAL oficial.mp4" type="video/mp4" />
                </video>
                        </center>
                    </div>
                </div>
            </telerik:RadPageView>
            <telerik:RadPageView ID="RadPageView1" runat="server">
                gcitd
            </telerik:RadPageView>
        </telerik:RadMultiPage>
    </center>
    <br />
    <br />
    <asp:Label runat="server" ForeColor="White" Font-Size="Large" Font-Bold="true">Contato:</asp:Label>
    <div style="border-radius: 1em; background-color: #DDDDDD; opacity: 0.65; width: 800px;
        float: center; padding: 5px 5px 5px 5px">
        <asp:Label ID="Label1" runat="server">
                 
                    
        </asp:Label>
    </div>
</asp:Content>

               
Sorry about my bad english!
Thanks,
Eduardo.
Eduardo
Top achievements
Rank 1
 answered on 25 Apr 2012
2 answers
251 views
Hi there,

I have set up a Rad Editor and created a custom tool to handle the saving function.

I got all functionality working and the tool icon was displaying correctly with my own custom logo which was specified with the following css:
.reTool .SaveSubSection
{
   background-image: url(../Images/save_Icon.png) !important;
}

I then moved onto using a full tools.xml file using the ribbon bar feature. 

Here is a section showing my custom tool declaration:
<root>
    <modules>
        <module name="RadEditorStatistics" dockingZone="Bottom"/>      
    </modules>
    <tools name="Save" tab="Home">
        <tool name="SaveSubSection" shortcut="CTRL+S" showtext="false"/>
    </tools>
</root>

The button still produces the required functionality, however my custom logo does not show, it has been replaced with the "i" in a speech bubble icon.

How does my CSS have to change to get custom icons when using the rad ribbon bar within the Rad Editor?

Regards
Ryan
Ryan
Top achievements
Rank 1
 answered on 25 Apr 2012
1 answer
308 views
Hi,
   I am facing one issue related to RadCombobox MultiSelect Dropdown.
I want to avoid the Postback when i am not selecting any value.Currently when  I have closed the Drodpdown without selecting any value my screen is getting postback.Postback should occur when i have selected any value for that i have made Autopostback=true.
But with this when i am closing the combobox without selecting any value my screen is doing postback.
How to avoid the Postback on a screen when  i have not selected any value and closed the dropdown?
Please suggest what i should do?

Following is my code:

<

 

 

telerik:RadComboBox ID="ddStage" runat="server" CheckBoxes="true" OnSelectedIndexChanged="ddStage_SelectedIndexChanged"

 

 

 

AutoPostBack="true"

 

 

 

EnableCheckAllItemsCheckBox="true" Localization-CheckAllString="All"

 

 

 

Localization-AllItemsCheckedString="All" DropDownWidth="200px"

 

 

 

Width="200px" Skin="Web20Ext" Font-Names="Helvetica" Font-Italic="false" EnableEmbeddedSkins="false" BackColor="White"

 

 

 

ForeColor="Black">

 

 

 

<Items>

 

 

 

<telerik:RadComboBoxItem Text="Await" Selected="True" Value="1" Font-Names="Helvetica" />

 

 

 

<telerik:RadComboBoxItem Text="InPgr" Value="2" Font-Names="Helvetica"/>

 

 

 

<telerik:RadComboBoxItem Text="Rej" Value="3" Font-Names="Helvetica"/>

 

 

 

<telerik:RadComboBoxItem Text="Appr" Value="4" Font-Names="Helvetica"/>

 

 

 

</Items>

 

 

 

</telerik:RadComboBox>

 

Kalina
Telerik team
 answered on 25 Apr 2012
2 answers
170 views
Hello,

In a RadGrid, I can have a column definition like the following:
<asp:BoundColumn .. DataField="County.CountyName" />

But I try this in a grid group by expression:
<tel:GridGroupByExpression DataField="County.CountyName" />
But this throws an exception.  Is there a way I can utilize these complex expressions for grouping?

Thanks.

Brian Mains
Top achievements
Rank 1
 answered on 25 Apr 2012
4 answers
426 views
I would just like to trigger a select on arrow up or arrow down, not just focus.  This loads an image into another object.

Please help.

Thanks.
Paul
Top achievements
Rank 1
 answered on 25 Apr 2012
1 answer
164 views
Hello,

I'm trying to automatically resize images when they're being uploaded. After reading on the forums for a while, I found out I can use a FileSystemContentProvider for this.

Here's what I've come up with:

public class TextEditor : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        radEditor.ImageManager.ContentProviderTypeName = typeof(MyResizer).AssemblyQualifiedName;
         
        radEditor.ImageManager.ViewPaths = new[] { "~/Images" };
        radEditor.ImageManager.UploadPaths = new[] { "~/Images" };
        radEditor.ImageManager.DeletePaths = new[] { "~/Images" };
    }
}
 
public class MyResizer : FileSystemContentProvider
{
    public MyResizer(HttpContext context, string[] searchPatterns, string[] viewPaths, string[] uploadPaths, string[] deletePaths, string selectedUrl,
                  string selectedItemTag) : base(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, selectedItemTag)
    {
    }
 
    public override string StoreFile(Telerik.Web.UI.UploadedFile file, string path, string name, params string[] arguments)
    {
        string result = base.StoreFile(file, path, name, arguments);
 
        using (System.Drawing.Image originalImage = Bitmap.FromStream(file.InputStream))
        {
            int originalWidth = originalImage.Width;
            int originalHeight = originalImage.Height;
 
            int newWidth = 500;
            int newHeight = originalHeight / originalWidth * newWidth;
 
            System.Drawing.Image resizedImage = ResizeImage(originalImage, newWidth, newHeight);
 
            string fileName = Path.Combine(path, name);
            resizedImage.Save(Context.Server.MapPath(fileName));
        }
 
        return result;
    }
     
    private Image ResizeImage(Image originalImage, int newWidth, int newHeight)
    {
        // Resize Image
    }
}

This works fine, but as you can see the new width of the image (500) is hard coded. How can I turn this into a parameter?

We access the page with the Editor on it like this: /TextEditor.aspx?textid=1&ImageWidth=500

How can we pass the ImageWidth parameter in the querystring to our implementation of the FileSystemContentProvider?

Regards,
Kristof
Rumen
Telerik team
 answered on 25 Apr 2012
1 answer
131 views
By default RadDateTimePicker taking Today date whenever select time from timepicker.

Expected Behavior:
Suppose today date is 23-Apr-2012.When we choose time(7:00 PM) for the first time it should selected as "XX-Apr-2012 7:00 PM" instead "23-Apr-2012 7:00 PM". 

Note: 'XX' could be any date.It is purely situational.

Can it possible to change default behavior to expected date ???

Thanks,
Pradeep
Eyup
Telerik team
 answered on 25 Apr 2012
3 answers
296 views

I get 5 steps forward and then hit a brick wall with the RADGrid.

I have a page with a MultiView, encapsulating two views. View1 displays View2 when a particular LinkButton is pressed. On View2, I have a RADGrid. Within it I am dynamically creating a ButtonColumn of LinkButtons. The issue is that when a LinkButton is selected from one of the rows, I need the MultiView to change back to View1. Problem is, because the LinkButton is inside the RADGrid, it execute as an Asynchronous PostBack, and even though my code changes the CurrentView of the MultiView, the change doesn't get applied. I was thinking that what I needed was to designate all the LinkButtons inside that particular column as requiring a full Synchronous PostBack when clicked.

I tried the following, but it didn't work:
  Note: ButtonColumnsRequiringFullPostBack is a simple String Array holding the Unique Column Names of any columns with LinkButtons that I want to make as Synchronous Postback.

Private Sub gridMain_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles gridMain.ItemCreated
     If (e.Item.GetType() Is GetType(GridDataItem)) Then
          '***************************************
          ' Initialize Variables
          '***************************************
          Dim objDataItem As Telerik.Web.UI.GridDataItem = e.Item
 
          For Each strUniqueColumn As String In Me.ButtonColumnsRequiringFullPostBack
               With Telerik.Web.UI.RadScriptManager.GetCurrent(Me.Page)
                    .RegisterPostBackControl(objDataItem(strUniqueColumn).Controls(0))
               End With
          Next
     End If
End Sub

Now I don't get any error with this code...but it doesn't work either. I click the LinkButton inside the RADGrid, and it still executes Asynchronously...leaving the user on the same View2 page.

P.S. I am looking for a Server-Side solution, not a Client-Side one. Also I want to avoid wrapping the entire page in an UpdatePanel if avoidable. I think doing so may end up breaking a lot of the other functionality and I rather not spend days fixing the entire page to work AJAX style.

Any suggestions?



Marin
Telerik team
 answered on 25 Apr 2012
3 answers
243 views
Hi,

I am trying to build a functionality in my asp.net page where when a user changes the values of any controls on the page and then if they try to navigate away without saving their changes, it would display a pop up message. The pop up message would confirm that if they navigate away their changes will be discarded. But i am unable to do that so for the raddatetimepicker control as i cannot find a function that would fire after it's value is changed from the current value that is populated from the database? e.g. after the page loads, if datetimepicker control has a value of 23 April 2010 and then the user changes that value, i need to fire a function preferably a client side function that would set the changed value flag to one and then i can notify the user that they have unsaved changes on the page.could you please help? i have used this function "datePicker.ClientEvents.OnDateSelected = "SetUnsavedDataFlag('1');"" but it does not fire.
Antonio Stoilkov
Telerik team
 answered on 25 Apr 2012
1 answer
101 views
Hello,

I have an aspx page with a RadComboBox an a silverlight object in it : 
<telerik:RadComboBox ID="cbListeTypesDonnees" runat="server" SkinID="cbMiddleComboBox" />
 
<div id="silverlightControlHost">
        <object data="data:application/x-silverlight-2," type="application/x-silverlight-2"
                              width="600px" height="500px" id="moduleSL">
               <param name="source" value="../../ClientBin/Genius.UI.Modules.DonneesExogenes.xap" />
               <param name="onError" value="onSilverlightError" />
                <param name="background" value="white" />
                 <param name="minRuntimeVersion" value="4.0.50401.0" />
                 <param name="autoUpgrade" value="true" />
                  <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration: none">
                       <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight"
                                     style="border-style: none" />
                  </a>
              </object>
</div>


I want access to the RadComboBox when I am in my silverlight code : 
public partial class MainPage : UserControl
    {
 
 private void _serviceClient_GetAllValeursDonneeExogeneCompleted(object sender, GetAllValeursDonneeExogeneCompletedEventArgs e)
        {
            if (HtmlPage.Document.GetElementById("cbListeTypesDonnees") != null)
            {
                
            }
        }

Unfortunately, this code doesn't work, my cbListeTypesDonnees is always null. 
It works when my combobox is not a telerik control. 
How can I get the RadComboBox from Silverlight ? 

Thank you ! 
Christophe Bienaime
Top achievements
Rank 1
 answered on 25 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?