Usually for validation, it involves allowed file types but just want to ask how to validate file size only? Thanks.
I also noticed when setting the error message, first it's like checking if message is about file type then else it becomes error regarding file size as show below:
function getErrorMessage(sender, args) {
var fileExtention = args.get_fileName().substring(args.get_fileName().lastIndexOf('.') + 1, args.get_fileName().length);
if (args.get_fileName().lastIndexOf('.') != -1) {//this checks if the extension is correct
if (sender.get_allowedFileExtensions().indexOf(fileExtention) == -1) {
return ("This file type is not supported.");
}
else {
return ("This file exceeds the maximum allowed size of 500 KB.");
}
}
else {
return ("not correct extension.");
}
}
<
telerik:RadDatePicker
ID
=
"RadDateEffectiveDate"
runat
=
"server"
Culture
=
"English (United States)"
MinDate="<%# DateTime.Today.Date %>">
</
telerik:RadDatePicker
>
RadDateEffectiveDate.MinDate = DateTime.Today
Hello,
I am trying to create a RadGrid in Batch edit mode. In each row, I have a GridbuttonColumn that opens a RadWindow using JavaScript function.
Data in the popup must be savec in the datasource of the RadGrid as they are represented by hidden columns. To do this, the save button in the popup must update the datasource.
What I need to do here is to save changes made on the RadGrid to the datasource each time I click on the GridButtonColumn.
Thanks,
Abbas
Hi Team,
I am using RadGrid, and the original implementation is good.
However, my project manager wants to change the design to--> "showing the filter row without providing data source when first time the page is loading".
That means, when users visit this page and the page is loading, I will skip the data binding step, but need to show the filter row in MasterTableView.
My RadGrid is like the following one in ASPX page:
<telerik:RadGrid ID="RadGridHotels" runat="server" AllowPaging="True" AllowCustomPaging="True"
AllowSorting="True" AllowFilteringByColumn="True" EnableLinqExpressions="True"
Width="100%" EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="false" Skin="Bootstrap" AutoGenerateColumns="False"
GridLines="None" OnNeedDataSource="RadGridHotels_NeedDataSource" OnItemCreated="RadGridHotels_ItemCreated"
OnPreRender="RadGridHotels_PreRender" OnItemDataBound="RadGridHotels_ItemDataBound" OnItemCommand="RadGridHotels_ItemCommand">
<MasterTableView IsFilterItemExpanded="True" EditMode="InPlace" CommandItemDisplay="None"
DataKeyNames="Id" ClientDataKeyNames="Id" PagerStyle-AlwaysVisible="True"
OverrideDataSourceControlSorting="true" AllowNaturalSort="false" AllowCustomSorting="True"
PageSize="50">
<Columns>
<telerik:GridBoundColumn DataType="System.Int32" ItemStyle-CssClass="UseHand first-column" HeaderText="Id"
DataField="Id" UniqueName="Id" AutoPostBackOnFilter="true"
SortExpression="Id" ShowFilterIcon="false" CurrentFilterFunction="EqualTo">
<HeaderStyle Font-Bold="True" CssClass="rgHeader rgSortable" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Display Name" ItemStyle-CssClass="UseHand clickElement column" FilterControlWidth=""
UniqueName="DisplayName" DataField="DisplayName" AutoPostBackOnFilter="true"
CurrentFilterFunction="Contains" ShowFilterIcon="false" SortExpression="DisplayName">
<HeaderStyle Font-Bold="True" CssClass="rgHeader rgSortable" /></telerik:GridBoundColumn>
</Columns>​
</MasterTableView>
</telerik:RadGrid>​
Please advise.
Thank you.
Hi,
I have a RadGrid which is set to always run in batch edit mode. I have four RadDropDownList controls in the grid and would like the fourth RadDropDownList to be set to True if the first three are all set to True. I would prefer to do this using AJAX or something since I don't want the page to load each time one of the RadDropDownList values is changed.
If I set AutoPostBack = true on the RadDropDownList, once I click off the row the selected value in the RadDropDownList disappears and is just set as a blank value.
The 'OverallPass' is the one that needs to be updated.
I have only set AutoPostBack = True for the first RadDropDownList in this example.
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AllowSorting
=
"True"
AutoGenerateColumns
=
"False"
DataSourceID
=
"SqlDataSource1"
AllowFilteringByColumn
=
"True"
MasterTableView-EditMode
=
"Batch"
OnBatchEditCommand
=
"RadGrid1_BatchEditCommand"
AllowPaging
=
"true"
PageSize
=
"20"
>
<
GroupingSettings
CaseSensitive
=
"false"
/>
<
mastertableview
datakeynames
=
"RulCode"
datasourceid
=
"SqlDataSource1"
AutoGenerateColumns
=
"False"
CommandItemDisplay
=
"TopAndBottom"
CommandItemSettings-ShowAddNewRecordButton
=
"false"
EditMode
=
"Batch"
AllowNaturalSort
=
"true"
>
<
BatchEditingSettings
EditType
=
"Row"
OpenEditingEvent
=
"Click"
/>
<
Columns
>
<
telerik:GridTemplateColumn
FilterControlWidth
=
"60%"
ReadOnly
=
"true"
DataField
=
"PerCode"
FilterControlAltText
=
"Filter PerCode column"
HeaderText
=
"PerCode"
UniqueName
=
"PerCode"
SortExpression
=
"PerCode"
DataType
=
"System.String"
>
<
HeaderStyle
Width
=
"70px"
HorizontalAlign
=
"Left"
/>
<
ItemTemplate
><%# Eval("PerCode") %> </
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
FilterControlWidth
=
"60%"
ReadOnly
=
"false"
DataField
=
"SL"
FilterControlAltText
=
"Filter SL column"
HeaderText
=
"S+L"
UniqueName
=
"SL"
SortExpression
=
"Team"
DataType
=
"System.String"
>
<
HeaderStyle
Width
=
"70px"
HorizontalAlign
=
"Left"
/>
<
ItemTemplate
><%# Eval("SL") %></
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadDropDownList
AutoPostBack
=
"true"
Width
=
"55px"
runat
=
"server"
DataTextField
=
"OptionValue"
ID
=
"txtSL"
DataSourceID
=
"SqlDataSource3"
DataValueField
=
"OptionValue"
>
</
telerik:RadDropDownList
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
FilterControlWidth
=
"60%"
ReadOnly
=
"false"
DataField
=
"Reading"
FilterControlAltText
=
"Filter Reading column"
HeaderText
=
"Reading"
UniqueName
=
"Reading"
SortExpression
=
"Reading"
DataType
=
"System.String"
>
<
HeaderStyle
Width
=
"70px"
HorizontalAlign
=
"Left"
/>
<
ItemTemplate
><%# Eval("Reading") %></
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadDropDownList
Width
=
"55px"
runat
=
"server"
DataTextField
=
"OptionValue"
ID
=
"txtReading"
DataSourceID
=
"SqlDataSource3"
DataValueField
=
"OptionValue"
>
</
telerik:RadDropDownList
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
FilterControlWidth
=
"60%"
ReadOnly
=
"false"
DataField
=
"Writing"
FilterControlAltText
=
"Filter Writing column"
HeaderText
=
"Writing"
UniqueName
=
"Writing"
SortExpression
=
"Writing"
DataType
=
"System.String"
>
<
HeaderStyle
Width
=
"70px"
HorizontalAlign
=
"Left"
/>
<
ItemTemplate
><%# Eval("Writing") %></
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadDropDownList
Width
=
"55px"
runat
=
"server"
DataTextField
=
"OptionValue"
ID
=
"txtWriting"
DataSourceID
=
"SqlDataSource3"
DataValueField
=
"OptionValue"
>
</
telerik:RadDropDownList
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
FilterControlWidth
=
"60%"
ReadOnly
=
"false"
DataField
=
"OverallPass"
FilterControlAltText
=
"Filter OverallPass column"
HeaderText
=
"Overall Pass"
UniqueName
=
"OverallPass"
SortExpression
=
"OverallPass"
DataType
=
"System.String"
>
<
HeaderStyle
Width
=
"70px"
HorizontalAlign
=
"Left"
/>
<
ItemTemplate
><%# Eval("OverallPass") %></
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadDropDownList
Enabled
=
"false"
Width
=
"55px"
runat
=
"server"
DataTextField
=
"OptionValue"
ID
=
"txtOverallPass"
DataSourceID
=
"SqlDataSource3"
DataValueField
=
"OptionValue"
>
</
telerik:RadDropDownList
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
<
CommandItemSettings
RefreshImageUrl
=
"../assets/img/refresh32.png"
/>
</
mastertableview
>
<
ClientSettings
AllowKeyboardNavigation
=
"true"
>
<
ClientEvents
OnBatchEditCellValueChanged
=
"BatchEditCellValueChanged"
OnCommand
=
"OnGridCommand"
/>
<
Resizing
AllowColumnResize
=
"True"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
We seem to have a very similar issue to the one reported here:
Q2 2010 (Version 2011.2.713)
Problem: RadAsyncUpload sometimes fail to upload the files to the target folder.
except the version we are using is 2013.1.417.45 in which the issue is supposed to be fixed. The challenge is that the problem is not consistent. We're able to upload video files usually without a problem but at the same time we have many users, dozens a day, that get an error during the postback portion of the upload when the temporary file is not found. We tried using the custom handler fix as described in that earlier version problem solution but that doesn't seem to affect the issue. The users seem to be using a variety of browsers and systems so we haven't been able to isolate a pattern.
We'd even be okay not having the temporary files delete at all and we'll manually delete them daily if that is possible.
Is there any potential solution to this?
thanks
Hi,
Once the advance form is loaded on the page that needs to re-adjust itself to be able to see all the control regardless the screen resolution.
My form is "kinda" big as it contains controls on it so It would be good to be able to scroll down the screen while typing on it and trying to reach out other controls on it.
I am running the following script onLoad - However it sometimes doesn't allow me to scroll it down or to see the Close button at the top at least.
1.
window.setTimeout(
2.
function
() {
3.
var
oWnd = GetRadWindow();
4.
oWnd.SetWidth(document.body.scrollWidth + 4);
5.
oWnd.SetHeight(document.body.scrollHeight + 70);
6.
7.
}, 400);