Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
213 views
Hi Team

i have Radcombobox

 

<telerik:RadComboBox ID="Test" runat="server" EmptyMessage="Select"

 

 

EnableLoadOnDemand="true" EnableVirtualScrolling="true" Filter="Contains"

 

 

onKeyDown="if(event.keyCode==13) event.keyCode=9;" ItemsPerRequest="20" ShowMoreResultsBox="true"

 

 

TabIndex="133" Width="200px">

 

 

</telerik:RadComboBox>

if i click Clear button i need to set like select in dropdown.
i used like but not working

 

Test.SelectedIndex = -1;
Test.Selectedvalue="";
Test.Selectedvalue=0;
not working ...

Give me the Solution as soon as possible..

Shinu
Top achievements
Rank 2
 answered on 08 Sep 2010
2 answers
201 views
Consider the following grid ...
<telerik:RadGrid ID="RadGrid1"
                 runat="server"
                 AutoGenerateColumns="false"
                 AllowMultiRowSelection="false">
    <MasterTableView>
        <Columns>
            <telerik:GridClientSelectColumn UniqueName="Select"
                                            Visible="true"></telerik:GridClientSelectColumn>
            <telerik:GridBoundColumn UniqueName="Name"
                                     DataField="Name"
                                     HeaderText="Name"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Email"
                                     DataField="Email"
                                     HeaderText="Email"></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <Selecting AllowRowSelect="true"/>
    </ClientSettings>
</telerik:RadGrid>
Running the page with this definition on it displays a grid with a select column. The select column's header has a checkbox in it. This is all good.

Now, consider the case where the above grid should only display the select column under programmer-defined conditions. Also consider that the grid should be limited to single row selection when the select column is not visible.

The following code sets up an example for this ...
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default5.aspx.cs" Inherits="Default5" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1"
              runat="server">
            <telerik:RadScriptManager ID="RadScriptManager1"
                                      runat="server">
            </telerik:RadScriptManager>
            <telerik:RadGrid ID="RadGrid1"
                             runat="server"
                             AutoGenerateColumns="false"
                             AllowMultiRowSelection="false">
                <MasterTableView>
                    <Columns>
                        <telerik:GridClientSelectColumn UniqueName="Select"
                                                        Visible="true"></telerik:GridClientSelectColumn>
                        <telerik:GridBoundColumn UniqueName="Name"
                                                 DataField="Name"
                                                 HeaderText="Name"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName="Email"
                                                 DataField="Email"
                                                 HeaderText="Email"></telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings>
                    <Selecting AllowRowSelect="true"/>
                </ClientSettings>
            </telerik:RadGrid>
            <asp:Button ID="Button1"
                        runat="server"
                        Text="Click"
                        OnClick="Button1_Click"/>
        </form>
    </body>
</html>
using System.Collections.Generic;
using System;
 
public class Contact
{
    public string Email { get; set; }
 
    public string Name { get; set; }
}
 
public partial class Default5 : System.Web.UI.Page
{
    protected void Button1_Click(object sender, EventArgs e)
    {
        bool currentValue = RadGrid1.Columns.FindByUniqueName("Select").Visible;
        RadGrid1.AllowMultiRowSelection = !currentValue;
        RadGrid1.Columns.FindByUniqueName("Select").Visible = !currentValue;
    }
 
    protected void Page_Load(object sender, EventArgs e)
    {
        List<Contact> contacts = new List<Contact>{
            new Contact{Name = "Stuart Hemming1", Email = "sejhemming@gmail.com"},
            new Contact{Name = "Stuart Hemming2", Email = "sejhemming2@gmail.com"},
            new Contact{Name = "Stuart Hemming3", Email = "sejhemming3@gmail.com"},
            new Contact{Name = "Stuart Hemming4", Email = "sejhemming4@gmail.com"},
            new Contact{Name = "Stuart Hemming5", Email = "sejhemming2@gmail.com"},
            new Contact{Name = "Stuart Hemming6", Email = "sejhemming@gmail.com"}
        };
        RadGrid1.DataSource = contacts;
        RadGrid1.DataBind();
    }
}

Run the page and you have a grid with 2 columns and a single button. Click the button to display the select column and to allow multirow selection. When the grid redraws, it does so with the select column displayed but no checkbox appears in the header.

Is this broken, or am I just missing something?

-- 
Stuart

Stuart Hemming
Top achievements
Rank 2
 answered on 08 Sep 2010
2 answers
84 views
'tis a minor thing, but do you think you could reorganise RadGrid | Client-side API | Subscribing to Client Events | Client Events so that the events are listed in alphabetical order?

-- 
Stuart
Stuart Hemming
Top achievements
Rank 2
 answered on 08 Sep 2010
3 answers
73 views
Hi,

I'm wonder if I can display two radtootipmanager controls together in the same time. Please, view the attached image to understand what I'm looking for.

Please, if you have any code or explaination, provide me with it.
I need an emergency help,

Regards,
Bader
Svetlina Anati
Telerik team
 answered on 08 Sep 2010
1 answer
59 views
Hi,

I'm wonder if it possible to display all radtootipmanager controls in the same time (It is very important for my application), for example, please view the attached image. The radtooltipmnager controls must be displayed together by openeing the page or by executing a method. Of course the user can close the tooltip manually and display it when he comes over it.
The question based on the following demos: 
http://demos.telerik.com/aspnet-ajax/tooltip/examples/imagemaptooltipmanager/defaultcs.aspx
or
http://demos.telerik.com/aspnet-ajax/tooltip/examples/usingwithimagemap/defaultcs.aspx

Please, it is possible, can you explain to me how can I do that.
It is very apprecited to send me a modified code based on the above demos.

Regards,
Bader
Svetlina Anati
Telerik team
 answered on 08 Sep 2010
3 answers
95 views
  Hi,

The RadTreeView inside RadPane doesn't look good in IE 7,8, but it's fine in FireFox.
Please see the attached file.

Please give me suggestion.
Thanks in advance.

Regards,
Nyi Nyi

Yana
Telerik team
 answered on 08 Sep 2010
1 answer
135 views
HI,

I have a window with content template which contains a button. The button has office2007 theme(using decorator) and the window has sunset theme.
If i specify the style at design, everything is fine. But if I try to assign the theme during run time, for the first page_load the theme does not appear for the buttons. But on later page_load it works fine.

The problem does not seem to occur if the button and the window have the same theme.

I am using the visibleOnPageLoad=true to show the window from server side.

Is there a better way to do this? My requirement is that based on different conditions, I need the appearance of the button and the window to be changed.

Regards,
Saravanan
Fiko
Telerik team
 answered on 08 Sep 2010
1 answer
185 views
looking at http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multicolumncombo/defaultcs.aspx

in my db i have articles that are different types (e.g theory, video, documentation etc )

i want to display them in a multiple column combobox  so they are in there own columns (e.g theory, video, documentation etc )

is there an example of how to do this?
Peter
Telerik team
 answered on 08 Sep 2010
3 answers
180 views
All,

Is there a way to localize the labels within an auto-generated edit form? I would prefer not to have to use a web control to do this if at all possible. I have managed to assign resource file values to the grid headers easily enough, but I do not want to use the same value for the grid headers and the edit form.

Thanks,
jax
Bruce Parr
Top achievements
Rank 1
 answered on 08 Sep 2010
1 answer
127 views

Hello everyone.

I'm using a Window on my page that has a Rotator in it. The Rotator is bound to a LINQ data set. It worked fine,
but then I tried to put an AJAX Loading Panel to show a "loading" image while the rotator is bound and I get the following error:

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

I tried using a RadCodeBlock without luck.

Here is my code:

(Main .aspx page)

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script type="text/javascript">
    //<![CDATA[
        function openWin()
        {
            var oWnd = radopen("SCARLog.aspx", "RadWindow1");
        }
    //]]>
    </script>
</telerik:RadScriptBlock>

<telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false"
ReloadOnShow="true" runat="server" Skin="Hay" EnableShadow="true">
    <Windows>
        <telerik:RadWindow ID="RadWindow1" runat="server" Behaviors="Close" NavigateUrl="Log.aspx">
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>

(.aspx window page)
<body height="100%" scroll="no" style="overflow:hidden;" scrooltop="oTop" >
<form>
<title>Detail Log</title>

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" ></telerik:RadScriptManager>

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Panel1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadFormDecorator ID="RadFormDecorator1" DecoratedControls="All" runat="server" Skin="Hay" />

<asp:Panel ID="Panel1" runat="server" HorizontalAlign="Center" Height="275px">
<telerik:RadRotator ID="Rotator" runat="server" Skin="Hay" ScrollDirection="Up"
RotatorType="AutomaticAdvance" FrameDuration="3000" Width="300px" ItemWidth="302px" Height="100px" ItemHeight="100px">
<ItemTemplate>
    <div style="text-align:center">
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <asp:Label ID="lblDate" runat="server">Date: <%# DataBinder.Eval(Container.DataItem,"DateChanged") %></asp:Label>
        </telerik:RadCodeBlock>
    </div>
    <div style="text-align:center">
        <asp:Label ID="Label2" runat="server">User ID: </asp:Label>
        <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
            <asp:Label ID="lblUser" runat="server"><%# DataBinder.Eval(Container.DataItem, "UserID")%></asp:Label>
        </telerik:RadCodeBlock>
    </div>
    <div style="text-align:center">
        <asp:Label ID="Label3" runat="server">From status: </asp:Label>
        <telerik:RadCodeBlock ID="RadCodeBlock3" runat="server">
            <asp:Label ID="lblFrom" runat="server"><%# DataBinder.Eval(Container.DataItem, "FromStatus")%></asp:Label>
        </telerik:RadCodeBlock>
    </div>
    <div style="text-align:center">
        <asp:Label ID="Label4" runat="server">To status: </asp:Label>
        <telerik:RadCodeBlock ID="RadCodeBlock4" runat="server">
            <asp:Label ID="lblTo" runat="server"><%# DataBinder.Eval(Container.DataItem, "ToStatus")%></asp:Label>
        </telerik:RadCodeBlock>
    </div>
</ItemTemplate>
</telerik:RadRotator>
</asp:Panel>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="Center" EnableSkinTransparency="true">
    <asp:Image id="Image1" runat="server" ImageUrl="~/images/Loading.gif" ></asp:Image>
</telerik:RadAjaxLoadingPanel>

</form>

</body>

(.aspx.cs code)

if (!this.IsPostBack)
{
    System.Threading.Thread.Sleep(1000);
    Int32 Snum = Convert.ToInt32(Session["IDNumber"].ToString());
    using (Entity db = new Entity())
    {
        var data = from L in db.Log
        where L.IDNumber == Snum
        orderby L.DateChanged
        select new
        {
            L.DateChanged,
            L.FromStatus,
            L.ToStatus,
            L.UserID,
        };
        Rotator.DataSource = data;
        Rotator.DataBind();
    }
}

Pero
Telerik team
 answered on 08 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?