| <telerik:RadGrid ID="grdCodeLists" runat="server" |
| GridLines="None" AllowPaging="true" PageSize="10" |
| AllowSorting="true" AllowFilteringByColumn="false" |
| AutoGenerateColumns="false" ShowGroupPanel="false" |
| AllowMultiRowEdit="false" AllowAutomaticDeletes="false" |
| AllowAutomaticInserts="false" AllowAutomaticUpdates="false" |
| OnNeedDataSource="grdCodeLists_NeedDataSource" |
| OnInsertCommand="grdCodeLists_InsertCommand" |
| OnUpdateCommand="grdCodeLists_UpdateCommand" |
| OnDeleteCommand="grdCodeLists_DeleteCommand"> |
| <ClientSettings |
| EnableRowHoverStyle="true" |
| AllowKeyboardNavigation="true"> |
| <Selecting AllowRowSelect="true" /> |
| <KeyboardNavigationSettings |
| EnableKeyboardShortcuts="true" |
| AllowActiveRowCycle="true" |
| FocusKey="Y" RebindKey="R" InitInsertKey="I" /> |
| <ClientEvents OnRowSelected="RowSelected" /> |
| </ClientSettings> |
| <SortingSettings |
| SortedAscToolTip="Click to sort descending..." |
| SortedDescToolTip="Click to sort ascending..." |
| EnableSkinSortStyles="true" /> |
| <PagerStyle |
| AlwaysVisible="true" |
| Mode="NextPrevAndNumeric" |
| Position="Bottom" /> |
| <MasterTableView |
| TableLayout="Fixed" |
| EditMode="InPlace" |
| CommandItemDisplay="None" |
| DataKeyNames="CodeListID" |
| AllowNaturalSort="false"> |
| <SortExpressions> |
| <telerik:GridSortExpression FieldName="CodeListName" SortOrder="Ascending" /> |
| </SortExpressions> |
| <Columns> |
| <telerik:GridBoundColumn HeaderText="Code List ID" DataField="CodeListID" MaxLength="4" UniqueName="colID" /> |
| <telerik:GridBoundColumn HeaderText="Code List Name" DataField="CodeListName" SortExpression="CodeListName" |
| SortDescImageUrl="~/Images/icon_arrowDown.gif" SortAscImageUrl="~/Images/icon_arrowUp.gif" |
| MaxLength="8" UniqueName="colName" /> |
| <telerik:GridBoundColumn HeaderText="Code List Description" DataField="CodeListDescription" MaxLength="16" UniqueName="colDescription" /> |
| <telerik:GridEditCommandColumn HeaderText="Edit" HeaderStyle-HorizontalAlign="Center" |
| HeaderStyle-Width="65" ButtonType="ImageButton" EditImageUrl="~/Images/icon_edit.gif" |
| UniqueName="colEdit" ItemStyle-HorizontalAlign="Center" /> |
| <telerik:GridButtonColumn HeaderText="Delete" HeaderStyle-HorizontalAlign="Center" |
| HeaderStyle-Width="65" ConfirmText="Delete Code List?" ConfirmDialogType="RadWindow" |
| ConfirmTitle="Delete Code List" ButtonType="ImageButton" CommandName="Delete" |
| UniqueName="colDelete" ImageUrl="~/Images/icon_delete.gif" ItemStyle-HorizontalAlign="Center" /> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
foreach (GridViewRow gvr in gvCustomerList.Rows)
{
sIen += gvr.Cells[0].Text +
",";
}
The problem I have is that each time I navigate through the page, my asp page reload itself and doesn't use ajax method.
Could you please tell me what I am missing here?
Please see the code below
'Format Code Block'(<asp:ObjectDataSource ID="dslogo" runat="server"
OldValuesParameterFormatString="original_{0}"
SelectMethod="ListImages"
TypeName="logosBLL.logo" >
</asp:ObjectDataSource>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="SushiPanel">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="SushiPanel" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Black">
</telerik:RadAjaxLoadingPanel>
<telerik:RadListView ID="RadListView1" runat="server" DataSourceID="dslogo"
ItemPlaceholderID="PlaceHolder1" AllowPaging="true">
<LayoutTemplate>
<div class="sushibar">
<asp:Panel ID="SushiPanel" runat="server">
<div class="sushi">
<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
</div>
<telerik:RadDataPager ID="RadDataPager1" runat="server" PageSize="10" Skin="Black">
<Fields>
<telerik:RadDataPagerButtonField />
</Fields>
</telerik:RadDataPager>
</asp:Panel>
</div>
</LayoutTemplate>
<ItemTemplate>
<div class="category">
<asp:Image runat="server" ID="imglogo2" Height="70px" Width="70px" ImageUrl='<%# Eval("logopath") %>' />
</div>
</ItemTemplate>
<SelectedItemTemplate>
<div class="selected">
<asp:Image runat="server" ID="imglogo2" Height="70px" Width="70px" ImageUrl='<%# Eval("logopath") %>' />
</div>
</SelectedItemTemplate>
</telerik:RadListView>
)
And also I get the following warning in my project:
Warning 6 Reference to type 'System.Web.UI.WebControls.IPageableItemContainer' claims it is defined in 'd:\Visual Studio 2010\Projects\wave10\wave10\bin\System.Web.Extensions.dll', but it could not be found c:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q1 2010\Bin35\Telerik.Web.UI.dll wave3
Many thanks in advance
Kamal
Hi,
We have a page with many (>15) radEditors. We would like to make sure that our output is XHTML compliant. However, if we use the default behavior and apply the content filters upon submit, we observe a long delay before the page actually begins to submit, because the time it takes to execute the filters on all of the editors is long. We have attempted to optimize this performance by disabling unneeded filters and following the guidance provided on your site, but the performace is still not what it needs to be for our application.
One possible solution we are investigating is to apply the filters on the blur event of the radEditors. We have tried to implemented code like this:
| function RadEditor_OnClientLoad(editor, args) { |
| var designElement = editor.get_contentArea(); |
| var htmlElement = editor._getTextArea(); |
| var jQueryWrappedSet = $([designElement , htmlElement]); |
| jQueryWrappedSet .bind('blur', { editorId: editor.get_id() }, function(event) { onBlur(event.data.editorId); }); |
| } |
| function onBlur(id) { |
| var editor = $find(id); |
| if (editor.get_mode() == 2) |
| editor.set_mode(1); |
| else |
| setTimeout(function() { editor.set_html(editor.get_html(true)); }, 0); |
| } |
So what this code does is, in the radEditor onClientLoad event, get references to the design and html elements of the editor, and then use jQuery to attach an event handler to their blur events.
In the blur events we then apply the content filters. If the editor is in html mode, we apply the filter by switching the editor to design mode. If the editor is in design mode, we apply the fitlers by using the set_html function as documented here:
http://www.telerik.com/community/forums/aspnet-ajax/editor/run-custom-content-filter-on-load.aspx
(Note that for simplicity sake in this prototype code it assumes that the filters are currently on. When we actually implement this, the ContentFilters property will be set to "None" in the markup, and then in the blur event handler we will programmically turn on the filters, apply them, and then disable them so that they will not be applied on page submit.)
There is problem with this solution. Consider the case where editor "A" has focus, and then you click to set the focus to editor "B". The problem is that in this case, both the set_mode and the set_html methods that are executed in the blur event of editor "A" set the focus back from editor "B" to editor "A". This in turn fires the blur event of editor B, and you get an infinite loop.
Is there any way to invoke the set_mode and set_html methods on a radEditor without have the focus set back to that editor? Or, more generally, is there a better way to apply content filters to the content of a radEditor when the editor loses its focus?
Thank you so much for your assistance!!!
Joe