<
asp:TextBox
ID
=
"TextBox2"
runat
=
"server"
Text='<%# Bind("Password") %>' Visible='<%# if (loggedInUser == admin) {true;} else {false;} %>' ></
asp:TextBox
>
CREATE TABLE Users
(
UserID int IDENTITY PRIMARY KEY
NOT NULL
,FirstName varchar(30) NOT NULL
,LastName varchar(30) NOT NULL
,WindowsLogin varchar(30) NOT NULL
,EmailAddress varchar(30)
,[Disabled] bit DEFAULT 0
,Administrator bit DEFAULT 0
)
GO
INSERT INTO Users(FirstName, LastName, WindowsLogin) VALUES('MyFirst', 'MyLast', 'MMyLast')
GO
CREATE TABLE Scenarios
(
ScenarioID int IDENTITY PRIMARY KEY NOT NULL
,Title varchar(30) NOT NULL
,Notes varchar(1000)
,UserID int REFERENCES Users(UserID) NOT NULL
,DateCreated datetime DEFAULT(GETDATE())
)
<telerik:RadGrid ID="RadGridScenarios" runat="server" AutoGenerateColumns="False" CellSpacing="0" DataSourceID="EntityDataSourceScenarios" GridLines="None" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" OnInsertCommand="RadGridScenarios_InsertCommand"> <MasterTableView DataKeyNames="ScenarioID" DataSourceID="EntityDataSourceScenarios" CommandItemDisplay="Top"> <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings> <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="Title" FilterControlAltText="Filter Title column" HeaderText="Title" SortExpression="Title" UniqueName="Title"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Notes" FilterControlAltText="Filter Notes column" HeaderText="Notes" SortExpression="Notes" UniqueName="Notes"> </telerik:GridBoundColumn> </Columns> <EditFormSettings> <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn> </EditFormSettings> </MasterTableView> <FilterMenu EnableImageSprites="False"></FilterMenu> </telerik:RadGrid>
TimeSlotContextMenuItemClicking(object sender, TimeSlotContextMenuItemClickingEventArgs e)
e.TimeSlot.Start;
e.TimeSlot.End;
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.
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
EditImageUrl
=
"images/edit.gif"
UpdateImageUrl
=
"images/update.gif"
InsertImageUrl
=
"images/update.gif"
CancelImageUrl
=
"images/delete.gif"
></
telerik:GridEditCommandColumn
>
<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