<
telerik:RadAsyncUpload
Width
=
"225px"
TargetFolder
=
"~/Temp/TempUploadFiles"
ID
=
"upFiles"
runat
=
"Server"
InputSize
=
"20"
AllowedFileExtensions
=
"jpeg,jpg,gif,tif,png,bmp,pdf"
OnFileUploaded
=
"RadAsyncUpload1_FileUploaded"
OnClientFileUploading
=
"upFiles_onClientFileUploading"
OnClientFileUploaded
=
"upFiles_onClientUploadFinished"
OnClientFileUploadFailed
=
"upFiles_onClientUploadFailed"
OnClientFileDropped
=
"upFiles_onClientUploadDropped"
OnClientFileUploadRemoved
=
"upFiles_onClientUploadRemoved"
OnClientValidationFailed
=
"OnClientValidationFailed"
HttpHandlerUrl
=
"~/UserControls/CustomHandlers/UploadHandler.ashx"
MaxFileInputsCount
=
"1"
TemporaryFileExpiration
=
"5"
DisableChunkUpload
=
"true"
><
FileFilters
><
telerik:FileFilter
Extensions
=
"jpeg,jpg,gif,tif,png,bmp,pdf"
/></
FileFilters
>
</
telerik:RadAsyncUpload
>
public class UploadHandler : AsyncUploadHandler, System.Web.SessionState.IRequiresSessionState
{
protected override IAsyncUploadResult Process(UploadedFile file, HttpContext context, IAsyncUploadConfiguration configuration, string tempFileName)
{
// Populate the default (base) result into an object of type SampleAsyncUploadResult
CustomAsyncUploadResult result = CreateDefaultUploadResult<
CustomAsyncUploadResult
>(file);
//do some processing here...
base.Process(file, context, configuration, tempFileName);
return result;
}
}
<
Configuration
>
...
<
httpHandlers
>
<
add
path
=
"ChartImage.axd"
type
=
"Telerik.Web.UI.ChartHttpHandler"
verb
=
"*"
validate
=
"false"
/>
<
add
path
=
"Telerik.Web.UI.SpellCheckHandler.axd"
type
=
"Telerik.Web.UI.SpellCheckHandler"
verb
=
"*"
validate
=
"false"
/>
<
add
path
=
"Telerik.Web.UI.DialogHandler.aspx"
type
=
"Telerik.Web.UI.DialogHandler"
verb
=
"*"
validate
=
"false"
/>
<
add
path
=
"Telerik.RadUploadProgressHandler.ashx"
type
=
"Telerik.Web.UI.RadUploadProgressHandler"
verb
=
"*"
validate
=
"false"
/>
<
add
path
=
"Telerik.Web.UI.WebResource.axd"
type
=
"Telerik.Web.UI.WebResource"
verb
=
"*"
validate
=
"false"
/>
<
add
path
=
"UserControls/CustomHandlers/UploadHandler.ashx"
type
=
"Telerik.Web.UI.WebResource"
verb
=
"*"
validate
=
"false"
/>
</
httpHandlers
>
<
httpModules
>
<
add
name
=
"RadUploadModule"
type
=
"Telerik.Web.UI.RadUploadHttpModule"
/>
<
add
name
=
"RadCompression"
type
=
"Telerik.Web.UI.RadCompression"
/>
<
add
name
=
"RoutingModule"
type
=
"System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
</
httpModules
>
...
<
system.webServer
>
<
handlers
>
<
remove
name
=
"ChartImage_axd"
/>
<
remove
name
=
"Telerik_Web_UI_SpellCheckHandler_axd"
/>
<
remove
name
=
"Telerik_Web_UI_DialogHandler_aspx"
/>
<
remove
name
=
"Telerik_RadUploadProgressHandler_ashx"
/>
<
remove
name
=
"Telerik_Web_UI_WebResource_axd"
/>
<
add
name
=
"ChartImage_axd"
path
=
"ChartImage.axd"
type
=
"Telerik.Web.UI.ChartHttpHandler"
verb
=
"*"
preCondition
=
"integratedMode"
/>
<
add
name
=
"Telerik_Web_UI_SpellCheckHandler_axd"
path
=
"Telerik.Web.UI.SpellCheckHandler.axd"
type
=
"Telerik.Web.UI.SpellCheckHandler"
verb
=
"*"
preCondition
=
"integratedMode"
/>
<
add
name
=
"Telerik_Web_UI_DialogHandler_aspx"
path
=
"Telerik.Web.UI.DialogHandler.aspx"
type
=
"Telerik.Web.UI.DialogHandler"
verb
=
"*"
preCondition
=
"integratedMode"
/>
<
add
name
=
"Telerik_RadUploadProgressHandler_ashx"
path
=
"Telerik.RadUploadProgressHandler.ashx"
type
=
"Telerik.Web.UI.RadUploadProgressHandler"
verb
=
"*"
preCondition
=
"integratedMode"
/>
<
add
name
=
"Telerik_Web_UI_WebResource_axd"
path
=
"Telerik.Web.UI.WebResource.axd"
type
=
"Telerik.Web.UI.WebResource"
verb
=
"*"
preCondition
=
"integratedMode"
/>
<
add
name
=
"UserControls/CustomHandlers/UploadHandler_ashx"
verb
=
"*"
preCondition
=
"integratedMode"
path
=
"UserControls/CustomHandlers/UploadHandler.ashx"
type
=
"Telerik.Web.UI.WebResource"
/>
</
handlers
>
<
validation
validateIntegratedModeConfiguration
=
"false"
/>
</
system.webServer
>
...
</
Configuration
>
function
_findVisibleEditableColumn(col)
{
return
!col.get_readOnly() && col.get_visible();
}
grid.add_batchEditClosed(
function
(sender, args)
{
var
lastVisibleEditableColumn = _.findLast(gridColumnsSortedByDisplayIndex, _findVisibleEditableColumn);
if
(lastVisibleEditableColumn && lastVisibleEditableColumn.get_uniqueName() == args.get_columnUniqueName())
grid.raise_batchEditRowClosed(args);
});
get_readOnly:
function
(){
return
(
typeof
(
this
._data.ReadOnly)!=
"undefined"
)?
true
:
false
;
}
function
_findVisibleEditableColumn(col)
{
return
!col.get_readOnly() && col.get_visible() && col._data.Editable;
}
<
telerik:RadGrid
ID
=
"grdHeirarchyLoadTest"
AutoGenerateColumns
=
"false"
OnColumnCreated
=
"RadGrid1_ColumnCreated"
ExpandCollapseColumn-CollapseImageUrl
=
"~/images/arrow_expanded.gif"
ExpandCollapseColumn-ExpandImageUrl
=
"~/images/arrow_collapsed.gif"
runat
=
"server"
>
<
MasterTableView
HierarchyLoadMode
=
"Conditional"
ExpandCollapseColumn-ButtonType
=
"ImageButton"
>
<
Columns
>
<
Telerik:GridBoundColumn
DataField
=
"Test"
HeaderText
=
"Test"
/>
</
Columns
>
<
NestedViewTemplate
>
Test content
</
NestedViewTemplate
>
</
MasterTableView
>
</
telerik:RadGrid
>
protected
void
RadGrid1_ColumnCreated(
object
sender, GridColumnCreatedEventArgs e)
{
if
(e.Column
is
GridExpandColumn)
{
(e.Column
as
GridExpandColumn).ButtonType = GridExpandColumnType.ImageButton;
(e.Column
as
GridExpandColumn).ExpandImageUrl =
"~/images/arrow_collapsed.gif"
;
(e.Column
as
GridExpandColumn).CollapseImageUrl =
"~/images/arrow_expanded.gif"
;
}
}
<Scrolling AllowScroll="true"/> in ClientSettings. I am also using Ajax on it. The Scrolling Functionality is normally working fine but It doesn't work, When I try to drag an Item and Move it Up and Down to drop on something on the Same TreeList. All the functionality is working fine when I don't have many items in the list, I just need to get this scrolling thing done, If I have many items to display. I tried many solutions online but all those seems to work with Silverlight. Can you please help me with this? I wish I could have an event likeAllowAutoScrollOnDragDrop which I use on RadGrid everytime.
Thanks in Advance, Narender<ClientSettings AllowAutoScrollOnDragDrop="true" > <Scrolling AllowScroll="true" /> </ClientSettings>
Hi,
I've created a simple application which usesz RadGrid to connectt o my Windows Azure SQL Database. When I run the site localy all the editing features of RadGrid work great.
But when I deploy to WA Web Sites when I click on the edit buton i.e. the loading panel just shows for a second and disappears.
I've attached the debugger from VS 2013 and the error I'm getting is:
Unhandled exception at line 15, column 16485 in http://my_app_name.azurewebsites.net/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:c9cbdec3-c810-4e87-846c-fb25a7c08002:ea597d4b:b25378d2;Telerik.Web.UI:en-US:9d967110-0dc5-4d20-a086-c7556058bb3c:16e4e7cd:f7645509:22a6274a:ed16cbdc:88144a7a:58366029
0x800a139e - JavaScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
Any suggestions how to fix it?
<
asp:Button
ID
=
"Save"
runat
=
"server"
Font-Names
=
"Tahoma"
Text
=
"Save"
OnClick
=
"Save_Click"
CssClass
=
"savebutton"
></
asp:Button
>
</
div
>
<
telerik:RadTreeView
ID
=
"RadTreeView1"
runat
=
"server"
DataTextField
=
"SecNameFr"
DataValueField
=
"AccessId"
DataFieldID
=
"SecId"
CheckBoxes
=
"true"
DataFieldParentID
=
"SecIdRef"
CheckChildNodes
=
"true"
Font-Names
=
"tahoma"
RenderMode
=
"Classic"
Skin
=
"Office2010Blue"
>
<
DataBindings
>
<
telerik:RadTreeNodeBinding
Checkable
=
"true"
CheckedField
=
"HasAccess"
/>
</
DataBindings
>
</
telerik:RadTreeView
>
protected void Save_Click(object sender, EventArgs e)
{
List<
RadTreeNode
> dss = RadTreeView1.CheckedNodes.ToList();
Dictionary<
int
, bool> accessIdDic = new Dictionary<
int
, bool>();
foreach (RadTreeNode item in RadTreeView1.Nodes)
{
if (item.Checked)
accessIdDic.Add(Convert.ToInt32(item.Value), item.Checked);
}
}