Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
230 views

Hi guys, I am having trouble doing something I thought would be simple.

The scenario:
1. A combobox on a page with autopostback set to true and a sub in the codebehind that I want to fire whenever the combobox changes.
Protected Sub cmbxHerbicide_SelectedIndexChanged(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles cmbxHerbicide.SelectedIndexChanged
Dim con As New S
.............
..............
End Sub

2. On page load I grab a querystring and use it to change the combobox.
cmbxHerbicide.SelectedValue = Request.QueryString("ActiveID")

Ok, when I run this the combobox is changed as expected but the sub does not fire.
So I thought I would try:

cmbxHerbicide.SelectedValue = Request.QueryString("ActiveID")
cmbxHerbicide_SelectedIndexChanged(e, e)

This produces an error.
Unable to cast object of type 'System.EventArgs' to type 'Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs'

How do I get around this? 

I had expected that if I had AutoPostback set to true, and I changed the selection then the SelectedIndexChanged would fire.

What event args do I need to send?

Cheers

Ian
PS. The sub fires fine if I manually change the combobox.  The reason I am doing it in this way is that sometimes I want to run the code from a value pulled from a querystring, but once the user is on the page they can then go and select other values.  A worst case scenario is that I duplicate lots of code, I don't want to do that, the simple solution is to change the selection and call the sub.

Ian
Top achievements
Rank 1
 answered on 01 Aug 2012
0 answers
97 views
I am using an EditCommandColumn to Edit/Update/Insert records but when I use custom images instead of the default text, there is an unnecessary line break between the Update/Cancel images in Edit Mode as well as the Insert/Cancel images in Insert Mode. If I leave the default they display side by side. I am not specifying a header or item width and even if I do, I get the same results. The column widths are adjusting as necessary when I am using text. I can't seem to find any properties in the column to set any sort of image display layout.

<telerik:GridEditCommandColumn  ButtonType="ImageButton" EditImageUrl="images/edit.gif" UpdateImageUrl="images/update.gif" InsertImageUrl="images/update.gif" CancelImageUrl="images/delete.gif"></telerik:GridEditCommandColumn>

Any ideas?
License
Top achievements
Rank 1
 asked on 01 Aug 2012
1 answer
214 views
Hello,

I am finding the behavior of the HideOnBlur property a little difficult to understand.  If I add a RadMaskedTextBox to a page, apply a mask, and set the HideOnBlur property to true it works as I would expect.  When the control doesn't have focus the prompting characters and mask characters are hidden.  However, if I fill the .Text property with a value programatically, say in page load, then everything including the value I supplied is hidden until focus is given to the control and focus is switched off of the control and the onblur event is fired.

This results in a page loading and data that was supplied to the control doesn't show up.  Then you click inside the control and if you remove focus or start typing the supplied text appears.  Should I be supplying text to the RadMaskedTextBox in a different manner then using the .Text property of the control?

Thank you,
Jeremy

EDIT: Sorry...  this should be in the ASP.NET AJAX > General Discussions...  I didn't realize I was in the sub forum.
Jeremy
Top achievements
Rank 2
 answered on 01 Aug 2012
0 answers
64 views
Hi,

I have a load-on-demand RadTabStrip inside a Window that is set to a fixed width and height (the window, that is).  My problem is that the last PageView attached to the RadMultiPage that is referenced by the RadTabStrip is a summary page that may overflow to the bottom of the RadWindow based on what the user selects under previous tabs, but the RadWindow does not display a scroll bar to reflect this.  I can only view the content that is at the bottom of the RadWindow by clicking on my mouse's scroll wheel.  I have tried to fix this by setting the height of that last RadPageView both client and server-side, and I can tell that it is in fact set to that height - but still no scroll bar.  Is there a way I can accomplish this?

Thank you.
Condorito
Top achievements
Rank 1
 asked on 01 Aug 2012
2 answers
164 views
Hi Telerik team,

I have a number of columns in my radgrid and when i try to move a particular column to another position, it actually swaps the columns instead of just placing the column of my choice in the place that i desire. Is there a way i can avoid that swap. I hope i made sense.

Thanks,
Chandra
Chandra
Top achievements
Rank 1
 answered on 01 Aug 2012
2 answers
118 views
I am using RadEditor with the MS Word spelling provider.  I used the instructions at http://www.telerik.com/community/forums/aspnet-ajax/spell/enabling-ms-word-spell-checking.aspx to get it working.

It is spell-checking, but it does not seem to be using the en-US.tdf file in my ~/App_Data/RadSpell/ directory.  The special words (medical terms) I added to the dictionary are still flagged as misspellings.  Also, I can rename the file, and it still does spell-checking.

Here is my markup:
<telerik:RadEditor runat="server" ID="edNotes" Height="200" Width="98%" ContentAreaMode="Iframe" EditModes="Design" 
	EnableResize="true" ToolsFile="~/App_Data/ToolsFile.xml" SpellCheckSettings-CustomDictionarySuffix="Custom"
   	SpellCheckSettings-DictionaryLanguage="en-US" SpellCheckSettings-DictionaryPath="~/App_Data/RadSpell/" 
	SpellCheckSettings-SpellCheckProvider="MicrosoftWordProvider" SpellCheckSettings-AllowAddCustom="true" />

I have the following in my Page_Load routine:
	edNotes.SpellCheckSettings.SpellCheckProviderTypeName = typeof(Telerik.Web.UI.WordSpellCheckProvider).AssemblyQualifiedName;
Is the MS Word provider supposed to use en-US.tdf, or does it use the dictionary that Word/Office uses? I tested that and it does not seem to be using the Word dictionary. Also, I need to get the Custom dictionary file working as well. Please comment on that as well. Thanks, - Tim
Rumen
Telerik team
 answered on 01 Aug 2012
1 answer
139 views
When using radeditor a 404 error is displayed in the popup for adding an image or creating a link.

The error only happens on the server and works fine on localhost.

Also, when the popup is displayed it appears behind the rad menu.
Rumen
Telerik team
 answered on 01 Aug 2012
1 answer
72 views
Hello everyone,
I have a problem with my Headercontextmenu, can somebody please help me?
This is my situation:
I have a hierarchical RadGrid with a detailtable. On my RadGrid I enabled a headercontextmenu with an additional control to add a new item in my RadGrid.
So I want a headercontextmenu on the detailtable; now when I click on my "add new record" - button in the headercontextmenu of the detailtable it adds a new item in my mastertable.
How can I check on which level the button was clicked?
Or can I add an additional headercontextmenu only for my detailtable?

Thanks in advance,
regards esmyy


Eyup
Telerik team
 answered on 01 Aug 2012
1 answer
98 views
I have set of controls inside of a list view in which I want to be disabled until a certain checkbox is checked.
My current code looks like this:
protected void chckRSMCA_CheckedChanged(object sender, EventArgs e)
{
            CheckBox checkboxRS = (CheckBox)sender;
            RadTextBox Id = (RadTextBox)rlvListView.FindControl("txtRSFarmIdMCA");
            RadTextBox Address = (RadTextBox)rlvListView.FindControl("txtRSSvrAddressMCA");
 
            if (checkboxRS.Checked)
            {
                Id.Enabled = true;
                Address.Enabled = true;
            }
            else
            {
                Id.Enabled = false;
                Address.Enabled = false;
            }
}

However, with this code I get null reference exception when it tries to set the Enabled setting.
Josh
Top achievements
Rank 1
 answered on 01 Aug 2012
1 answer
105 views
Hello,
i am install the Asp.net Ajax Q2 2012
when i start the demo and click on  grid its how me error related to sql server

Server Error in '/RadControls_AspNetAjax' Application.

The user instance login flag is not supported on this version of SQL Server. The connection will be closed.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Data.SqlClient.SqlException: The user instance login flag is not supported on this version of SQL Server. The connection will be closed.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


and i have already install Sqlserver 2008,sql server 2008r2,and sqlserver 2012 
so why this error come in this demo 
thanks

Slav
Telerik team
 answered on 01 Aug 2012
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?