Hi,
Is there any Telerik web control similar to wincontrol RadBrowseEditor.
In RadrowseEditor, we can dynamically set the file path in the Textarea of RadBrowseEditor through code.
In AsyncUpload , I could not find simiar functionality.
please suggest.
Thanks
Swarupa
Is it possible to insert a session variable in an SQLDataSource like so:
="SELECT * FROM Companies WHERE CompanyID = <%session(CurrentCompID)%>"
Hello,
so im trying to add a button to the first cell in the Filtermenu with a 'Clear all filters' functionality. However i cant seem to get a handle on the first cell.
Here's some testing that i've tried so far with various examples i've found over the internet.
Private Sub Grid_OnItemCreated(sender As Object, e As GridItemEventArgs)
If e.Item.ItemType = GridItemType.FilteringItem Then
Dim clearFilterButton = New RadButton() With {.ButtonType = RadButtonType.StandardButton,
.Height = 22,
.Width = 22,
.Text = "Clear Filter",
.ToolTip = "Clear all filters"}
AddHandler clearFilterButton.Click, AddressOf ClearFilterButton_Click
Dim grid As RadGrid = CType(sender, RadGrid)
Dim firstcell = grid.Controls(0)
firstcell.Controls.Add(clearFilterButton)
End If
End Sub
Private Sub ClearFilterButton_Click(sender As Object, e As EventArgs)
For Each grid As RadGrid In Controls.All().OfType(Of RadGrid)()
grid.MasterTableView.FilterExpression = String.Empty
grid.Rebind()
Next
End Sub
I cant seem to get it to do anything at all tho. Even just trying to hide the Filtermenu does not seem to do anything. And yes the event is firing, it is triggered in the basepage load. Is this the way to add a button to a filtermenu? Or is there a better way?
Regards
Hi,
While user tabbing through the toolbar.and then press enter or spacebar on any of the toolbar icon's to select(like bold,italic or underline),focus is moving to RadEditor.Instead focus should remain on the toolbar's icon which ever user selected.
Thanks
Geeta
I am trying to to use the AsyncUpload so that when a user chooses a file to upload via ajax it is sent to the server and put into a collection object with existing attachments associated with my form. Using a sample from the demos and documentation I have it doing, this, but I have an issue that when it uploads I want to clear the pending upload screen. Essentially I want to clear the UploadedFiles items when it does the ajax routine. However no matter what I do it won't work. I get an enumeration error when I use the clear method. Any help on this would be appreciated. Again all I want is when the upload file is selected an ajax call posts it back, it's added to a collection and then upload control is cleared so they can add more.
ASP.NET
<
telerik:RadAsyncUpload
ID
=
"rulAttachments"
runat
=
"server"
RenderMode
=
"Lightweight"
AutoAddFileInputs
=
"false"
Localization-Select
=
""
MaxFileSize
=
"5000000"
OnClientFilesUploaded
=
"OnClientFilesUploaded"
OnFileUploaded
=
"rulAttachments_FileUploaded"
></
telerik:RadAsyncUpload
>
Javascript
function
OnClientClickingUpload(sender) {
//sender.set_autoPostBack(false);
$telerik.$(
".ruFileInput"
).click();
}
(
function
(global, undefined) {
var
demo = {};
function
OnClientFilesUploaded(sender, args) {
$find(demo.ajaxManagerID).ajaxRequest();
}
function
serverID(name, id) {
demo[name] = id;
}
global.serverID = serverID;
global.OnClientFilesUploaded = OnClientFilesUploaded;
})(window);
//<![CDATA[
serverID(
"ajaxManagerID"
,
"<%= RadAjaxManager.GetCurrent(Page).ClientID %>"
);
//]]>
C#
protected
void
rulAttachments_FileUploaded(
object
sender, FileUploadedEventArgs e)
{
if
(rulAttachments.UploadedFiles.Count > 0)
{
byte
[] content;
using
(Stream str = e.File.InputStream)
{
content =
new
byte
[str.Length];
str.Read(content, 0, content.Length);
}
SelectedInventoryRequest.Attachments.Add(
new
BLL.FileAttachment { Id =
""
, Description = e.File.FileName, FileData = content, NewFile =
true
, FilePath = ConfigurationManager.AppSettings[
"DocumentumInProcessPath"
+ ConfigurationManager.AppSettings[
"CurrentRegion"
]] +
"/"
+ SelectedInventoryRequest.InventoryRequestID.ToString() });
rulAttachments.UploadedFiles.RemoveAt(0);
BindAttachments();
}
}
<telerik:RadScheduler runat="server" DataEndField="EndDate" DataKeyField="TaskID" DataStartField="StartDate" DataSubjectField="Title" Skin="Web20" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" SelectedView="WeekView" OverflowBehavior="Expand" DataSourceID="SqlDataSource1" ID="scheduler"> |