Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
160 views
i want to call RadCombobox1_SelectedIndexChanged Event on page load from code behind with out using Java Script please its urgent....
Amit
Top achievements
Rank 1
 asked on 26 Apr 2012
3 answers
315 views
Hi

I am building the list of items in the itemcreated event, as suggested in a reply to another post, using this approach:

combo.Items.Add(New RadComboBoxItem(sb.ToString, MemberID))


This is working fine so far, but I would like to change the background color (or text color) of the item based on some criteria. (Such as Member not paid up!)

My question is how to add the relevant style attribute to the item I am adding . I was expecting to find something like...

combo.Items.AddAttribute( something here)

but I didn't find it the right approach anywhere in the docs. Sorry if it is there somewhere.

Can someone help me out?

Thanks

Clive


Princy
Top achievements
Rank 2
 answered on 26 Apr 2012
1 answer
86 views
Hello,
I'm getting stuck on a page where an ajaxified rad grid is used. On double clicking a row of record from the grid opens a group of inline telerik controls including a rad grid. I'm looking forward for some methods using which i can find this rad grid(inside edit form setting) in javascript for refreshing it after adding some bunch of records. Please help me on this.
Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 26 Apr 2012
1 answer
146 views
Hello, I've seemed to always have issues with ajaxing my pages using the AjaxManager.


In 2 of my pages, they are pretty straight forward. In one page I did get it to work, but now it appears it doesn't want to work at all. It's doing normal postbacks(reloading the page) which is screwing with the results.


On Page 1:
I have a grid that I am using a item template on to add a textbox:
<telerik:GridTemplateColumn FilterControlAltText="Filter Size_Small column"
    HeaderText="S" UniqueName="Size_Small" DataField="Size_Small">
    <ItemTemplate>
        <telerik:RadTextBox ID="txt_Small" runat="server" Width="25" MaxLength="4" Text="0" ></telerik:RadTextBox>
    </ItemTemplate>
</telerik:GridTemplateColumn>

I also have a standard label on the page named lbl_Brand.

For TESTING purposes, I put up a button (button1) and made the following code in it:

For Each item As GridDataItem In grid_Colors.MasterTableView.Items
    Dim txtbox As RadTextBox = item("Size_Small").FindControl("txt_Small")
    lbl_Brand.Text = item("ColorName").Text & " : Small: " & txtbox.Text
Next

As per this, it should display the ColorName(It works even though i didn't include code), and then it ALWAYS returns Small: 0. It's returning the DEFAULT value of that textbox.

So, I am trying to ajax it so it doesn't reload the page on me, here is the code:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                                    <ajaxsettings>
                                        <telerik:AjaxSetting AjaxControlID="Button1">
                                            <updatedcontrols>
                                                <telerik:AjaxUpdatedControl ControlID="lbl_Brand"
                                                    UpdatePanelRenderMode="Inline" />
                                            </updatedcontrols>
                                        </telerik:AjaxSetting>
                                    </ajaxsettings>
                                </telerik:RadAjaxManager>

As you can see, I have Button1 setup to update lbl_Brand which is what should display the value. However, this is causing the page to reload.


Is there a certain process to adding the ajaxmanager and using it? Like, does it's location in the html matter? Does it need to be in a certain framework? Etc.
TIM
Top achievements
Rank 1
 answered on 25 Apr 2012
2 answers
140 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
209 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
250 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
133 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
382 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
131 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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?