Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
185 views
Hi, when I try to add RadAjaxManager through a controls smarttag I always get an error message (please see attached file).The error message is from a german version of VS2010, it basically means "Error while calling "Add RadAjaxManager...AddAjaxManager method can not be found).

It does not happen with Q3-2011....

Any ideas?

Thanks in advance for your help

Best regards, Thomas
Radoslav
Telerik team
 answered on 12 Apr 2012
1 answer
93 views

Hi,
Is it possible to get teh value of filtered column on button click. generally when we input some text and select a filter option then itemcommand is triggered an dwe can get the value from gridcommandeventargs. But, is it possible to get the value of that filtered column on click of a seperate button above the grid?

OR is it possible to have filter options(liek what we have for a grid-basic filtering options) and a custom text filter using filtertemplate inside a gridboundcoulmn

TIA

Shinu
Top achievements
Rank 2
 answered on 12 Apr 2012
4 answers
146 views
Hello,

I see a weird message 'RadEditor - please enable JavaScript to use the rich text editor' in a grey textbox below the RadEditor in preview mode. The actual content of the RadEditor is also displayed as blank. Could someone please let me know the solution for the same?

Regards,
Sameer
Sameer
Top achievements
Rank 1
 answered on 11 Apr 2012
2 answers
80 views
Hi,

I need to rebind the detail table view in item command, i'm using the following code

e.Item.OwnerTableView.Rebind(); but in this command through can not find column error.

please help me for this issue.

Regards,
Yasar
GL
Top achievements
Rank 2
 answered on 11 Apr 2012
2 answers
109 views
Hello Am finding an issue with additional series in my Radchart. Please help me.
Am trying to develop a XY-Axis chart with single series.
For this for this chart am distributing two database columns with X(Client ID) and Y(Client Account Balance) Axis.
And I would like to see only one Client Account Balance series, Not client Id series.
Unfortunately, automatically My chart displaying two serieses,i.e Client Id and Client Account Balance.

This issue Screwing me from past two weeks, I did all trials to resolve this, But I didn,t

From Aspx Code, Am not giving any input in series collections.
Please see below code.
Please Help!


<

 

 

telerik:RadChart AutoLayout="True" Height="450px" ID="CapacityRadChart"

 

 

 

runat="server" Skin="WebBlue" Width="935px" OnClick="CapacityRadchartClick">

 

 

 

<ClientSettings EnableZoom="True" ScrollMode="Both"/>

 

 

 

<Appearance>

 

 

 

<FillStyle MainColor="249, 250, 251">

 

 

 

</FillStyle>

 

 

 

<Border Color="160, 170, 182" />

 

 

 

</Appearance>

 

 

 

<Legend>

 

 

 

<Appearance Dimensions-Margins="1%, 1%, 1px, 1px"

 

 

 

Dimensions-Paddings="1px, 1px, 1px, 1px"

 

 

 

Position-AlignedPosition="Top">

 

 

 

<ItemTextAppearance TextProperties-Color="102, 102, 102">

 

 

 

</ItemTextAppearance>

 

 

 

<FillStyle MainColor="216, 222, 227">

 

 

 

</FillStyle>

 

 

 

<Border Color="160, 170, 182" />

 

 

 

</Appearance>

 

 

 

</Legend>

 

 

 

<PlotArea>

 

 

 

<YAxis AutoScale="True" AxisMode="Extended">

 

 

 

<Appearance>

 

 

 

<MajorGridLines Color="227, 227, 227" />

 

 

 

<MinorGridLines Color="227, 227, 227" />

 

 

 

<TextAppearance AutoTextWrap="False"/>

 

 

 

</Appearance>

 

 

 

<AxisLabel>

 

 

 

<TextBlock>

 

 

 

<Appearance TextProperties-Color="140, 140, 140" Position-AlignedPosition="TopLeft">

 

 

 

</Appearance>

 

 

 

</TextBlock>

 

 

 

</AxisLabel>

 

 

 

</YAxis>

 

 

 

<XAxis AutoScale="True" DataLabelsColumn="RIID's" MaxValue="0" Step="0">

 

 

 

<Appearance>

 

 

 

<MajorGridLines Color="227, 227, 227" Width="0" />

 

 

 

<TextAppearance AutoTextWrap="True" />

 

 

 

</Appearance>

 

 

 

<AxisLabel>

 

 

 

<TextBlock>

 

 

 

<Appearance TextProperties-Color="140, 140, 140" Position-AlignedPosition="BottomRight">

 

 

 

</Appearance>

 

 

 

</TextBlock>

 

 

 

</AxisLabel>

 

 

 

</XAxis>

 

 

 

<Appearance>

 

 

 

<FillStyle FillType="Solid" MainColor="">

 

 

 

</FillStyle>

 

 

 

</Appearance>

 

 

 

</PlotArea>

 

 

 

<ChartTitle>

 

 

 

<Appearance>

 

 

 

<FillStyle MainColor = "">

 

 

 

</FillStyle>

 

 

 

</Appearance>

 

 

 

<TextBlock Text="Capacity Delay" >

 

 

 

<Appearance TextProperties-Color="102, 102, 102"

 

 

 

TextProperties-Font="Arial, 7pt" Position-AlignedPosition="Bottom">

 

 

 

</Appearance>

 

 

 

</TextBlock>

 

 

 

</ChartTitle>

 

 

 

</telerik:RadChart>

 





Aspx.VBfile Code:

CapacityMonthlyRadChart.DataSource = ds.Tables.Item(7)

CapacityMonthlyRadChart.DataBind()

CapacityMonthlyRadChart.Series(0).DataXColumn =

 

"ClientId"

 

CapacityMonthlyRadChart.Series(0).DataYColumn =

 

"ClientAccountBalance"

 




    
Rishi
Top achievements
Rank 1
 answered on 11 Apr 2012
2 answers
195 views

Hi Guys, I have been playing with this and can't figure it out.

 

The setup.  I have two comboboxes.  The first is a list of countries.  The second is a cascading box and displays States, dependent on the country selected in the first combo box.  Here is how I want it to work. 

1. When the page loads, the Countries Combobox (RadCombobox1) is visible and lists the countries.  The States Combobox (RadCombobox2) is not visible.

2. After the user selects a country, it fires the OnClientSelectedIndexChanged="fired" javascript function which in turn fires the RadComboBox2 requestItems event passing the countryID value.

 

3.  The RadComboBox2 requestItems event then populates the state list for Australia (Country ID 1), Canada (Country ID 7) or the USA (Country ID 45), or nothing if it is any other country.  Then I want the RadComboBox2 to be visible and dropped down if the country is Australia, Canada, or the USA, and if it is not then I want it to be visible but looking like a text box (RadComboBox2.ShowToggleImage = False

,RadComboBox2.ShowDropDownOnTextboxClick = False) so that they can type in their state.

 4.  All seems to work ok, except that the RadComboBox2.ShowToggleImage = False and RadComboBox2.ShowDropDownOnTextboxClick = False does not work unless there is a postback (such as clicking the button).

5.If I use RadAjaxManager (on RadCombobox1 to update RadCombobox2) then it doesn't work because the requiredfieldvalidator on name won't allow the postback unless a the name field is filled out.  This is a striped down version, in real life there will be many textbox inputs above and below the country and state comboboxes, and they will have requiredfieldvalidators.  Is there a way of turning these validators off for the RadAjaxManager postback?

 

 6. On another note, was there a simpler way of hiding RadComboBox2 when the page was first loaded instead of using a literal to insert javascript.  HideCombo does not work. If I change the visibility then it does not render, so that doesn't work.  If I use set_visibile(false) in the pageload()then it disappears on postback.

Many thanks in advance.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Combopostback.aspx.vb" Inherits="Combobox_Combopostback" %>

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 <html xmlns="http://www.w3.org/1999/xhtml">

     <head runat="server">

         <title></title>

     </head>

     <body>

         <form id="form1" runat="server">

             <div>

                 <asp:ScriptManager ID="ScriptManager1" runat="server" />

                 <div>

                     Select a Country:

                     <telerik:RadComboBox ID="RadComboBox1" runat="server" Height="140px"

                                          Width="150px"

                                          Skin="Vista"                      

                                          EmptyMessage="Type an Country"

                                          markfirstmatch="true"

                                          EnableLoadOnDemand="True"

                                          OnItemsRequested="RadComboBox1_ItemsRequested"       

                                          OnClientSelectedIndexChanged="fired"

                                          />

                     <br />

                     State (select country first):

                     <telerik:RadComboBox ID="RadComboBox2" runat="server" Height="140px"

                                          Width="150px"

                                          Skin="Vista"

                                          EmptyMessage="Type your State"

                                          markfirstmatch="true"

                                          AllowCustomText="true"                                         

                                          />

                     <br />

 

                            Name: <asp:Textbox id="tbxFirstName" runat="server" />                

                            <asp:RequiredFieldValidator id="UsernameRequiredValidator" runat="server"

                                                         ControlToValidate="tbxFirstName" ForeColor="red"

                                                         Display="Static" ErrorMessage="Required" />

                <br />

                     <asp:Button ID="Button1" runat="server" Text="Button" />

                 </div>

                <script language="javascript" type="text/javascript">

                                         var countriesCombo;

                                         function pageLoad() {

                                             // initialize the global variables

                                             // in this event all client objects

                                             // are already created and initialized

                                             StatesCombo = $find("<%= RadComboBox2.ClientID %>");

                                             <asp:Literal ID="Literal1" runat="server"></asp:Literal>

                                         }

                     function fired(sender, eventArgs) {

                         var item = eventArgs.get_item();

                         StatesCombo.trackChanges()

                         StatesCombo.set_visible(true);

                         //For Australia (1), Canada (7), and the US (45) you will load in the states

                         if (item.get_value() == 1 || item.get_value() == 7 || item.get_value() == 45) {

                             StatesCombo.showDropDown();

                         }

                         else{

                             StatesCombo.hideDropDown();

                         }

                         StatesCombo.requestItems(item.get_value(), false);

                         StatesCombo.commitChanges()

                     }

                 </script>

             </div>

         </form>

     </body>

 </html>

 

Here is the codebehind

 

Imports System.Data.SqlClient

Imports System.Data

Imports System

Imports System.Configuration

Imports Telerik.Web.UI

Partial Class Combobox_Combopostback

    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If Not Page.IsPostBack Then

            ' Fill the Countries combo.

            LoadCountries()

            'Hide the state combo box, this literal puts it in the javascript page load only for the first time the page is opened

            Literal1.Text = "StatesCombo.set_visible(false);"

        ElseIf Not Page.IsCallback Then

             LoadStates(RadComboBox1.SelectedValue)

             Literal1.Text = ""

         End If

     End Sub

 

    Protected Sub LoadCountries()

         Dim connection As New SqlConnection(ConfigurationManager.ConnectionStrings("LocalDBTest1").ConnectionString)

         'This is a simple table that has two fields, Country, and CountryID

         Dim adapter As New SqlDataAdapter("SELECT * FROM Country ORDER By Country", connection)

         Dim dt As New DataTable()

         adapter.Fill(dt)

         RadComboBox1.DataTextField = "Country"

         RadComboBox1.DataValueField = "CountryID"

         RadComboBox1.DataSource = dt

         ' Insert the first item.

         Dim item1 As New RadComboBoxItem()

         item1.Text = "Type your Country"

         item1.Value = 0

         RadComboBox1.Items.Add(item1)

         RadComboBox1.DataBind()

     End Sub

 

    Protected Sub LoadStates(ByVal countryID As String)

         Dim connection As New SqlConnection(ConfigurationManager.ConnectionStrings("LocalDBTest1").ConnectionString)

         ' This table has 3 fields, StateName, StateID, and CountryID, depending on the countryID passed into the sub it loads the states for that country.

         Dim adapter As New SqlDataAdapter("SELECT * FROM State WHERE CountryID=@CountryID ORDER By StateName", connection)

         adapter.SelectCommand.Parameters.AddWithValue("@CountryID", countryID)

         Dim dt As New DataTable()

         adapter.Fill(dt)

         RadComboBox2.DataTextField = "StateName"

         RadComboBox2.DataValueField = "StateID"

         RadComboBox2.DataSource = dt

         '********** I want these two items to fire when RadComboBox2.ItemsRequested fires, but they only fire after a postback (such as when the button is pressed)

         If countryID = 1 Or countryID = 7 Or countryID = 45 Then

            RadComboBox2.ShowToggleImage = True

            RadComboBox2.ShowDropDownOnTextboxClick = True

         Else

             'This is to enable them to enter their state

             RadComboBox2.ShowToggleImage = False

             RadComboBox2.ShowDropDownOnTextboxClick = False

         End If

         '******************************************

         Dim item2 As New RadComboBoxItem()

         item2.Text = "Type your State"

         item2.Value = 0

         RadComboBox2.Items.Add(item2)

         RadComboBox2.DataBind()

     End Sub

 

    Protected Sub RadComboBox1_ItemsRequested(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles RadComboBox1.ItemsRequested

     End Sub

 

    Protected Sub RadComboBox2_ItemsRequested(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles RadComboBox2.ItemsRequested

         LoadStates(e.Text)

     End Sub

 

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

         Response.Write("Postback Event")

     End Sub

 

End Class

 

 

 

 

Ian
Top achievements
Rank 1
 answered on 11 Apr 2012
4 answers
317 views
Hi all,

I have a RadAjaxLoadingPanel in MasterPage as below :
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" IsSticky="true" Skin="Default" CssClass="modalBackground">       
    <div class="updateProgress">           
        <asp:Image ID="imgLoading" runat="server" ImageUrl="~/Styles/Images/ajax-loader2.gif" />
        <span class="updateProgressMessage">Loading...</span>
    </div>
</telerik:RadAjaxLoadingPanel>

And here is its CSS :
.modalBackground
{
    background-color: Gray;
    filter: alpha(opacity=60);
    opacity: 0.60;
}
.updateProgress
{
    border-width: 1px;
    border-style: solid;
    background-color: #FFFFFF;
    position: absolute;
    width: 250px;
    height: 50px;
}

In Content Page :

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
..............
</telerik:RadAjaxManager>

The sample link is http://www.telerik.com/help/aspnet-ajax/ajax-center-loadingpanel.html.
In this link RadAjaxManager is on MasterPage but in my Web app each page has its own RadAjaxManager.

How can I set this LoadingPanel in the center screen for all pages ?

Regards,
Phuc


Aaron Jessen
Top achievements
Rank 1
 answered on 11 Apr 2012
1 answer
146 views
<PagerStyle Mode="NextPrevAndNumeric" CssClass="GridPagerStyle_customized" PageButtonCount="10" Position="TopAndBottom" AlwaysVisible="True" PagerTextFormat="V&#228;lj sida: <a onclick='javascript:openPreviousPage();'><img src='../Images/newimages/left_singel_arrow.png' style='cursor:pointer;' title='Previous' /></a> {4} <a onclick='javascript:openNextPage();'><img src='../Images/newimages/right_singel_arrow.png' style='cursor:pointer;' title='Next' /></a> &amp;nbsp;&amp;nbsp; Visar sida {0} av {1}, post {2} till {3} av {5}">
</PagerStyle> 

Note: i have added my own Next And Previous Button image in PagerTextFormat. now i want to hide the Default Buttons for Next and Previous Page. 
Eyup
Telerik team
 answered on 11 Apr 2012
1 answer
62 views
Hello their,

i am new user of Rad telerik control tool kit, I found it's really very cool tool box. and very nice features are provided by Telerik Team.

and I am facing a problem on Update_Command On Rad Telerik Grid control Using Entity Frame Work with LINQ or Lambda Query

Passing through Parameter Value.

Please, help for the same, my mail ID is mailme.neeleshonnet@rediffmail.com.

Thanks in advance.

Tsvetina
Telerik team
 answered on 11 Apr 2012
2 answers
104 views
I have the following simple grid that keeps track of a Do Not Call list.  I want to ensure that the phone number that gets put in the database is a 10 digit number with not spaces, dashs.  Example 1234567890.  Not 123 456-7890 Not (123) 456-7890.

Any help would be great.

<asp:SqlDataSource ID="sqlDNC" runat="server"
    ConnectionString="<%$ ConnectionStrings:ECC_Outbound_ConnectionString %>"
    SelectCommand="SELECT * FROM [DoNotCallList] ORDER BY [ID] DESC"
        DeleteCommand="DELETE FROM [DoNotCallList] WHERE [ID] = @ID"
        InsertCommand="INSERT INTO [DoNotCallList] ([PhoneNumber], [Date_Modified]) VALUES (@PhoneNumber,Getdate())"
        UpdateCommand="UPDATE [DoNotCallList] SET [PhoneNumber] = @PhoneNumber, [Date_Modified] = Getdate() WHERE [ID] = @ID">
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="PhoneNumber" Type="String" />
            <asp:Parameter Name="Date_Modified" Type="DateTime" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="PhoneNumber" Type="String" />
            <asp:Parameter Name="Date_Modified" Type="DateTime" />
            <asp:Parameter Name="ID" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0"
    DataSourceID="sqlDNC" GridLines="None" AllowPaging="True" AllowSorting="True"
        AutoGenerateColumns="False" Width="600px" AllowAutomaticInserts="True" AllowAutomaticDeletes="true"
        AllowAutomaticUpdates="True" PageSize="25" AllowFilteringByColumn="True"
        AutoGenerateDeleteColumn="True">
<GroupingSettings CaseSensitive="false"/>
<MasterTableView DataSourceID="sqlDNC" AllowSorting="False"
            DataKeyNames="ID" CommandItemDisplay="Top">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridTemplateColumn UniqueName="TemplateColumn"  AllowFiltering="False" >
            <EditItemTemplate>
                <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Update" Text="Update"></asp:LinkButton>
                 <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="false" CommandName="Cancel"
                    Text="Cancel"></asp:LinkButton>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="false" CommandName="Edit"
                    Text="Edit"></asp:LinkButton>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
 
        <telerik:GridBoundColumn DataField="PhoneNumber"
            FilterControlAltText="Filter PhoneNumber column" HeaderText="PhoneNumber"
            SortExpression="PhoneNumber" UniqueName="PhoneNumber" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
            ShowFilterIcon="false" FilterControlWidth="150px">
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn DataField="Date_Modified"
            DataType="System.DateTime" FilterControlAltText="Filter Date_Modified column"
            HeaderText="Date Modified" SortExpression="Date_Modified"
            UniqueName="Date_Modified"  AllowFiltering="False" >
            <EditItemTemplate>
                <asp:Label ID="Date_ModifiedLabel" runat="server"
                    Text='<%# Eval("Date_Modified") %>'></asp:Label>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="Date_ModifiedLabel" runat="server"
                    Text='<%# Eval("Date_Modified") %>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
    </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
 
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>
</asp:Content>
Eyup
Telerik team
 answered on 11 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?