<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>
<div id="divfilter">
<br />
<uc1:UCDynamicFilter runat="server" ID="UCDynamicFilter1" />
<br />
</div>
<div id="divdatatable" runat="server" >
<br />
<telerik:RadButton ID="RadBtnExp" runat="server" Text="导出" OnClick="RadBtnExp_Click"></telerik:RadButton>
<telerik:RadGrid ID="RadGrid1" runat="server" ClientSettings-Scrolling-AllowScroll="true" AllowSorting="True" Height="500px"
AllowPaging="true" AllowAutomaticUpdates="True" PageSize="30" DataSourceID="SqlDataSourceSales" AutoGenerateColumns="false" >
<ClientSettings>
<Scrolling SaveScrollPosition="true" UseStaticHeaders="true" />
</ClientSettings>
<MasterTableView EditMode="EditForms" DataKeyNames="ID" >
<Columns>
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ></telerik:GridEditCommandColumn>
<telerik:GridBoundColumn UniqueName="ID" DataField="ID" HeaderText="ID" DataType="System.Int32" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="年月" DataField ="年月" HeaderText="年月" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName ="公司名称" DataField="公司名称" HeaderText="地区公司名称" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName ="营销中心项目名称和分期" DataField ="营销中心项目名称和分期" HeaderText="营销项目名称和分期" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="楼栋" DataField="楼栋" HeaderText ="楼栋" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="物业类型" DataField="物业类型" HeaderText="物业类型" ForceExtractValue="Always" DataType="System.Char" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName ="面积" DataField ="面积" HeaderText="面积(签订-退订)" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign ="Right" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="金额" DataField ="金额" HeaderText="金额(签订-退订)" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign ="Right" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="征收方式" DataField="征收方式" HeaderText="征收方式" ForceExtractValue="Always" DataType="System.Char" ></telerik:GridBoundColumn>
</Columns>
<EditFormSettings EditFormType="Template">
<FormTemplate>
<table id="Table1" style="border-collapse: collapse;">
<tr>
<td>地区公司名称</td>
<td><asp:Label ID="LabelCompany" runat="server" Text ='<%# Bind("公司名称")%>'></asp:Label> </td>
</tr>
<tr>
<td>营销中心项目名称和分期</td>
<td><asp:Label ID="LableProjectFq" runat="server" Text ='<%# Bind("营销中心项目名称和分期")%>'></asp:Label> </td>
</tr>
<tr>
<td>楼栋</td>
<td><asp:Label ID="LabelBuilding" runat="server" Text ='<%# Bind("楼栋")%>'></asp:Label> </td>
</tr>
<tr>
<td>物业类型</td>
<td>
<asp:DropDownList ID="RDDListbulidingtype" runat="server" DataSourceID="SqlDataSource1" DataValueField="物业类型" DataTextField="物业类型" SelectedValue ='<%# Bind("物业类型") %>' AppendDataBoundItems="true" >
<asp:ListItem Selected="True" Text="Select" Value="">
</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td> 面积</td>
<td><asp:Label ID="LabelArea" runat="server" Text ='<%# Bind("面积")%>'></asp:Label> </td>
</tr>
<tr>
<td> 金额</td>
<td><asp:Label ID="LabelAmount" runat="server" Text ='<%# Bind("金额")%>'></asp:Label> </td>
</tr>
<tr>
<td>征收方式</td>
<td>
<telerik:RadDropDownList ID="RDDListTax" runat="server" SelectedValue='<%# Bind("征收方式") %>' >
<Items >
<telerik:DropDownListItem Text="" Value="" />
<telerik:DropDownListItem Text="简易" Value="简易" />
<telerik:DropDownListItem Text="一般" Value="一般" />
</Items>
</telerik:RadDropDownList>
</td>
</tr>
<tr>
<td><asp:Button ID="btnUpdate" runat="server" Text="保存" CommandName="Update" /></td>
<td><asp:Button ID="btnCancel" runat="server" Text="取消" CommandName="Cancel" /></td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
</MasterTableView>
</telerik:RadGrid>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:myAsystemstring %>" SelectCommand="select * from 物业类型表" ></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSourceSales" runat="server" ConnectionString="<%$ ConnectionStrings:myAsystemstring %>"
SelectCommand="select * from 销售导入表 where 公司名称=@mycompanyname and 项目名称=@myprojectname and 年月=@mydate "
UpdateCommand ="update 销售导入表 set 物业类型=@buildingtype, 征收方式=@taxtype where ID=@ID">
<SelectParameters >
<asp:ControlParameter Name="mycompanyname" ControlID="UCDynamicFilter1" PropertyName="FilterCompanyName" />
<asp:ControlParameter Name="myprojectname" ControlID="UCDynamicFilter1" PropertyName="FilterProjectName" />
<asp:ControlParameter Name="mydate" ControlID="UCDynamicFilter1" PropertyName="FliterDate" />
</SelectParameters>
<UpdateParameters >
<asp:Parameter Name="buildingtype" Type="String" />
<asp:Parameter Name="taxtype" Type="String" />
<asp:Parameter Name="ID" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
There is not code behind revalent to this part. The RadScriptManager is in the Master Page.
I'm using Radgrid Control EditformTemplate and auto update (in my
case I don't need delete, insert and data validation ), but update
button doesn't work. I have check another thread work which says by using "Update" to commandName of button attribution it will be automatic. and demo which shows code behind only for validation. The update action now seems only return null values to database.
Thanks in advance.
Hello,
I have GridAttachmentColumn in a DetailTable of a RadGrid that is Ajaxified. I get following error when clicking 'Download':
"Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled."
This error does not happen if the GridAttachmentColumn is inside the main table. But unfortunately I can't have it in the main table, it has to be in DetailTable.
<
telerik:RadGrid
ID
=
"xx"
AutoGenerateColumns
=
"false"
AlternatingItemStyle-HorizontalAlign
=
"Left"
HeaderStyle-HorizontalAlign
=
"Left"
ItemStyle-HorizontalAlign
=
"Left"
ShowHeadersWhenNoRecords
=
"true"
EnableNoRecordsTemplate
=
"true"
runat
=
"server"
AllowFilteringByColumn
=
"false"
AllowPaging
=
"false"
EnableViewState
=
"true"
AllowSorting
=
"True"
GridLines
=
"None"
Skin
=
"WebBlue"
ShowFooter
=
"True"
ShowStatusBar
=
"True"
OnDetailTableDataBind
=
"xx"
>
<
GroupingSettings
CaseSensitive
=
"false"
/>
<
AlternatingItemStyle
BackColor
=
"gainsboro"
/>
<
ClientSettings
>
<
ClientEvents
OnCommand
=
"gridCommand"
></
ClientEvents
>
</
ClientSettings
>
<
MasterTableView
DataKeyNames
=
"xx"
PageSize
=
"5"
>
<
DetailTables
>
<
telerik:GridTableView
EnableHierarchyExpandAll
=
"true"
>
<
HeaderStyle
CssClass
=
"MostInnerHeaderStyle"
/>
<
ItemStyle
CssClass
=
"MostInnerItemStyle"
/>
<
AlternatingItemStyle
CssClass
=
"MostInnerAlernatingItemStyle"
/>
<
Columns
>
<
telerik:GridBoundColumn
Display
=
"true"
HeaderText
=
"xx"
DataField
=
"xx"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
Display
=
"true"
HeaderText
=
"xx"
DataField
=
"xx"
>
</
telerik:GridBoundColumn
>
<
telerik:GridAttachmentColumn
SortExpression
=
"xx"
DataSourceID
=
"SqlDataSource1"
MaxFileSize
=
"1048576"
HeaderText
=
""
AttachmentDataField
=
"document"
AttachmentKeyFields
=
"xx"
FileNameTextField
=
"xx"
DataTextField
=
"xx"
DataTextFormatString
=
"Download File"
UniqueName
=
"attachment"
>
</
telerik:GridAttachmentColumn
>
</
Columns
>
</
telerik:GridTableView
>
</
DetailTables
>
....
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock3"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function gridCommand(sender, args) {
var manager = $find('<%= RadAjaxManager.GetCurrent(Page).ClientID %>');
if (args.get_commandName() == "DownloadAttachment") {
manager.set_enableAJAX(false);
setTimeout(function () {alert(args.get_commandName());
manager.set_enableAJAX(true);
}, 0);
}
};
....
Parser Error Message: Could not load file or assembly 'DotNetNuke HttpModules' or one of its dependencies. The system cannot find th efile specified. (C:\sourceFiles\CFAB\MMS\web.config line 119)
I recently upgraded DotNetNuke from 4.9.2 to 5.1.0. I converted my Desktop module to a Web Application Project. Many of the Telerik controls work fine (RadGrid, for example), But I have two pages which produce the above error. One has a RadEditor. Both use Rad to open other windows. So I tried the Telerik.DNN.MOdules_2009_2_701_trial.zip. I installed this module into DNN, but got the same error.
My WAP module project is in under DesktopModules. It has references to DotNetNuke.dll, Telerik.Charting.dll and Telerik.Web.UI.dll. These all reside in the site's bin directory. The Visual Studio 2008 .sln file is in the module folder.
These pages are working fine in DotNetNuke 5.1 when compiled along with the DotNetNuke source. The problem only shows up when converting the module to a Web Application Project. I also have two other WAP based modules on the same site that are deployed and working fine. These do not contian Telerik controls.
pgp
We have a grid that requires horizontal scrolling due to the number of columns present. We also have Static Headers = true so the headers remain while vertical scrolling. When in Batch edit, with AllowKeyboardNavigation = true, the headers do not scroll horizontally with the data.
The width of the grid is set at 100% and each column is sized using headerstyle-width. itemstyle-width is not used anywhere.
When we remove the static headers, the headers scroll horizontally correctly, but of course, the headers scroll out of view when you vertically scroll.
Is there some way to get the horizontal scrolling to work properly with keyboard navigation and keep Static Headers?
Thanks
Chuck
Hi,
I want to prevent Cross-Frame scripting attack. Note that I am not asking about Cross-site Scripting attack, but Cross-Frame.
Security scan flags my website with Cross-Frame vulnerability. However I don't see IFRAME anywhere in the rendered markup. But I am positive this is related to Telerik controls. How do you prevent cross-frame attack, which I believe allows attacker to inject alternate content into an IFRAME on the page.
I have the following Telerik controls/Assemblies on page:
1) Telerik.Web.UI
2) RadScriptManager
3) RadAjaxManager
4) RadStyleSheetManager
5) RadMenu
6) RadComboBox
7) RadPanelBar
8) RadGrid
9) RadAjaxManagerProxy
I would like to know how to have OnBatchEditCellValueChanged even on my batch edit grid to fire on every key press of the edit UI. Off hand I'm trying to find a way to do it from the MAGIC place holder I have below, in the OnKeyPress event.
<telerik:GridTemplateColumn HeaderText="Amount" SortExpression="Amount" UniqueName="Amount"
HeaderStyle-Width="140px">
<ItemTemplate>
<asp:Label runat="server" ID="lblAmount" Text='<%# Eval("Amount", "{0:C}") %>'
</ItemTemplate>
<EditItemTemplate>
<span style="white-space:nowrap;">
<telerik:RadNumericTextBox Width="100%" runat="server" ID="rntAmount" Type="Currency" MaxLength="13"
NumberFormat-DecimalDigits="2" MinValue="0" ClientEvents-OnKeyPress="MAGIC" />
</span>
</EditItemTemplate>
</telerik:GridTemplateColumn>
So far I have played around with:
function MAGIC(sender, args){
var manager = rgMyRadGrid.get_batchEditingManager();
var cell = manager.get_currentlyEditedCell();
var cellValue = manager.getCellValue(cell);
manager.endUpdate(); //maybe this will auto fire the event? Didn't seem too...
manager.changeCellValue(cell, cellValue); //this could work, but is messy... cellValue is the 'old' value prior to key press and it highlights the text every key press.
}
I am looking to customize RadConfirm box, I want to have the buttons say ok cancel or yes no and no close button,
<input id="btnReadOnly" type="button" runat="server" onserverclick="btnReadOnly_Click" class="cursorPointerControl"
onclick="if (!ReadOnlyConfirmation()) return false;"
value="Click to make inspection read only." />
function ReadOnlyConfirmation()
{ return confirm('Are you sure you wish to make this record read-only?'); }
I would like to reuse the confirm box for other pages. I tried using a radwindow with my custom confirm page. However, I couldn't get it to return the value back to the button. Any help would be greatly appreciated.
I have a GridNumericColumn for a year column. It is showing a comma when I edit inline (see attached picture). How would I set the year to not show a comma please?
Thank you.