Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
107 views
My implementation prevents me from using the traditional OnFileUploaded event since there are several instances of this control and each needs to be tied to a ticketID that is contained in a hidden field. I was able to get a reference to the uploader object that is relevant to the button that fired the event like this:

$(".SubmitFiles").click(function () {
       var uplodrID = $(this).closest(".AddAttachment").find(".Uploader").attr("ID");
       var upldrObj = $find(uplodrID); //this is the telerik asyncupload control
   });

At least, I'm pretty sure it is because I can see all of the relevent settings and such inside of it during debug. Now, what I want to do is send this control into a webmethod in the page codebehind so that I can interate through all the files and send them to a database. I tried to do so like this:

PageMethods.ProcessUpload(upldrObj);

And of course I enabled pagemethods in the ScriptManager. What is happening is ...well nothing. The page doesn't throw and error, but its also  not showing that it is actually getting through to the webmethod. I set the webmethod to throw an exception if it ever got that far, but it never does. When I step through debug, the debug finishes before it ever gets to the webmethod:

[WebMethod()]
public static void ProcessUpload(RadAsyncUpload upld)
{
    throw new Exception("Stub");
}

Can anyone help? I'm sure I'm missing something minor
Genady Sergeev
Telerik team
 answered on 12 Apr 2012
9 answers
188 views

Delete confirmation with RadAjaxLoadingPanel is not working ???

<asp:Button ID="btnDel" runat="server" Text="delete" OnClick="OnDeleteNom" OnClientClick="javascript:return confirm('delete item?')" />

code behind

protected void OnDeleteNom(object sender, EventArgs e)
{
//??? 
never comes here
}
 
Thanks,
Mehmedov

Nurietin
Top achievements
Rank 1
 answered on 12 Apr 2012
0 answers
86 views
Dear team,

I have nearly tried everything to manage to fill a combobox with java script. I got a component where I retrieve 2 strings which I want to show in the combobox.
The problem is, that I always get a null value for cmbSource.

Any ideas?

// edit: I also tried it with a listbox. Same problem.

 

cmbSource = $get('< %= listBoxSource.ClientID %>');

always returns null...


 

<script type="text/javascript">
            $(document).ready(function () {
                var cmbSource = $find('<%= comboboxSource.ClientID %>');
                init(cmbSource); // function to fill in the values
            });
 </script>
 
// in a table, embedded in a asp Panel
 <telerik:RadComboBox ID="comboboxSource" runat="server" Width="35%" />
 
 
// in java script
 
function init(comboboxSource) {
        var comboItem = new Telerik.Web.UI.RadComboBoxItem();
        comboItem.set_text("test");
        comboboxSource.get_items().add(comboItem);
        comboboxSource.commitChanges();
}
Endof
Top achievements
Rank 1
 asked on 12 Apr 2012
1 answer
99 views
Hi,

I'm using rad grid with client side data binding and so far everything works fine except for issues with paging. Paging works fine but there is a problem with Page size.  With the page size drop down menu jumping from 10 to 20 or 20 to 50 data is not displaying correctly once the page size exceeds the number set in the pageSize property. I attached a screen shot to give you an idea. The page size property is set to 10 and my data grid is displaying 20 results. You can see where the first 10 displays correctly but the second 10 does not. If I set the page size property to 20 then everything is fine. I tried setting the page size property(tableView.set_pageSize(20)) on the client side but that didn't work. Any suggestions? I'll really appreciate it.

Thanks,
Ron
Maria Ilieva
Telerik team
 answered on 12 Apr 2012
4 answers
170 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
90 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
141 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
78 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
100 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
184 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?