Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) ' Fires when the application is started RegisterCacheEntry() End Sub''' <summary> ''' Register a cache entry which expires in 1 minute and gives us a callback. ''' </summary> ''' <remarks></remarks> Private Sub RegisterCacheEntry() ' Prevent duplicate key addition If HttpContext.Current.Cache(DummyCacheItemKey) IsNot Nothing Then Return End If HttpContext.Current.Cache.Add(DummyCacheItemKey, "Test", Nothing, DateTime.MaxValue, TimeSpan.FromMinutes(1), CacheItemPriority.NotRemovable, _ New CacheItemRemovedCallback(AddressOf CacheItemRemovedCallback)) End Sub ''' <summary> ''' Callback method which gets invoked whenever the cache entry expires. ''' We can do our "service" works here. ''' </summary> ''' <param name="key"></param> ''' <param name="value"></param> ''' <param name="reason"></param> Public Sub CacheItemRemovedCallback(ByVal key As String, ByVal value As Object, ByVal reason As CacheItemRemovedReason) Debug.WriteLine("Cache item callback: " & DateTime.Now.ToString()) ' Do the service works DoWork() ' We need to register another cache item which will expire again in one ' minute. However, as this callback occurs without any HttpContext, we do not ' have access to HttpContext and thus cannot access the Cache object. The ' only way we can access HttpContext is when a request is being processed which ' means a webpage is hit. So, we need to simulate a web page hit and then ' add the cache item. HitPage() End Sub ''' <summary> ''' Hits a local webpage in order to add another expiring item in cache ''' </summary> Private Sub HitPage() Dim client As New WebClient() client.DownloadData(DummyPageUrl) End Sub ''' <summary> ''' Asynchronously do the 'service' works ''' </summary> Private Sub DoWork() Debug.WriteLine("Begin DoWork...") Debug.WriteLine("Running as: " + WindowsIdentity.GetCurrent().Name) Dim RadWindowManager1 As New RadWindowManager 'Set the same height to all windows RadWindowManager1.Height = Unit.Pixel(250) 'Add shortcuts to radwindow manager clientside commands RadWindowManager1.Shortcuts.Add(New WindowShortcut("MinimizeAll", "ALT+F2")) RadWindowManager1.Shortcuts.Add(New WindowShortcut("RestoreAll", "ALT+F3")) 'Create a new window add it dynamically 'The window will inherit the default settings of parent WindowManager Dim newWindow As New RadWindow() newWindow.NavigateUrl = "www.google.com" 'Top and Left can be used in conjunction with the OffsetElementId (if no OffsetElementId is specified, the top left corner of the browser window is used newWindow.Top = Unit.Pixel(22) newWindow.Left = Unit.Pixel(0) 'Add the newly created RadWindow to the RadWindowManager's collection RadWindowManager1.Windows.Add(newWindow) 'Get a reference to the first window in the list Dim firstWindow As RadWindow = RadWindowManager1.Windows(0) 'alternative: 'Telerik.WebControls.RadWindow mywindow = RadWindowManager1.Windows["RadWindowServer"]; 'Set its navigate URl to be different firstWindow.NavigateUrl = "www.google.com" firstWindow.VisibleOnPageLoad = True Debug.WriteLine("End DoWork...") End Subvar oRadMenu = GetRadWindow().BrowserWindow.document.getElementById('RadMenu1');var item = oRadMenu.findItemByText(text);
protected void RadGridResult_ItemDataBound(object sender, GridItemEventArgs e)
{
//Format string to phone number.
if (e.Item is GridDataItem)
{
GridDataItem item = (GridDataItem) e.Item;
Object ob = item["ConfirmationLogPhone"].Text;
if (!Convert.IsDBNull(ob))
{
Int64 iParsedValue = 0;
if (Int64.TryParse(ob.ToString(), out iParsedValue))
{
TableCell cell = item["ConfirmationLogPhone"];
cell.Text =
String.Format(System.Globalization.CultureInfo.CurrentCulture, "{0:#-(###) ###-####}", new object[] { iParsedValue });
}
}
}
}
However, when I export the grid to excel, the number is display merely just a string (Ex: 12223334444). MS Excel even report error that "Number stored as text field" on every cell in the column.
>? RadListBox2.ClientChanges
Count = 2
[0]: {Telerik.Web.UI.ClientOperation<Telerik.Web.UI.RadListBoxItem>}
[1]: {Telerik.Web.UI.ClientOperation<Telerik.Web.UI.RadListBoxItem>}
Is there a way to access these items in a server side postback? Thanks
function OkClicked(sender, args) { document.getElementById("<%=btnConfirm.ClientID %>").set_enabled(false); }<telerik:RadButton ID="btnConfirm" runat="server" OnClick="btnConfirm_Click" Enabled="true"> <Icon SecondaryIconCssClass="rbOk" SecondaryIconRight="4" SecondaryIconTop="4" /></telerik:RadButton>document.getElementById("<%=btnConfirm.ClientID %>").disabled = true;Hello,
I've added 9900 + words to the default .TDF dictionary file using the Dictionary Configurator downloaded from another forum here at Telerik.
While testing some of the words, all medical in nature, I don't seem to have consistent suggestions.
For example I enter zygapophy and I should get zygapophyseal, zygapophyses, and zygapophysis as suggestions but I only receive the last two. In my dictionary I have the following entries:
zygapophyses:SKPF:SKPF
zygapophysis:SKPF:SKPF
zygapophyseal:SKPF:SKPF
I have a total of 159,596 words in the default .TDF file. Using the Custom Dictionary is not an option because of my security/network set up.
I loaded a list of words into a word document with a .TXT extension then used the Dictionary Configurator to load all of them to the existing .TDF list - this was successful. I used the DC to test this same scenario and it works perfectly but in my application I'm experiencing the issue I stated above - missing zygapophyseal from the suggestion list.
I assume the spell checker uses the second and third columns to help group words for the suggestion list, but in this case it seems not to work correctly.
Have any ideas/suggestions?
Thanks in advance,
Dan
PS. I'm using VS.Net 2008 and C#