I have a problem in my control to maintain scroll on postback.
<%
--<pages maintainScrollPositionOnPostBack="true" validateRequest="false" enableEventValidation="false" viewStateEncryptionMode="Never" enableViewStateMac="false" ></pages>
--
%>
| <telerik:RadPageView ID="RadPageView5" runat="server"> |
| <telerik:RadAjaxPanel ID="RadAjaxPanel5" runat="server"> |
| <telerik:RadPanelBar ID="RadPanelBar5" runat="server" Skin="WebBlue" Width="100%"> |
| <Items> |
| <telerik:RadPanelItem runat="server" Text="UPLOAD MY IMAGES" Font-Bold="true" Expanded="true"> |
| <Items> |
| <telerik:RadPanelItem Value="ProfilePics" runat="server"> |
| <ItemTemplate> |
| <div class="accordionContent" style="display: block;"> |
| <div class="boxContent"> |
| <div style="padding-left: 15px; padding-right: 15px;"> |
| <div class="c_left"> |
| ==> <uc8:ctrlFileUpload id="ctrlFileUpload" runat="server" /> |
| <%-- <uc8:ctrlUserProfile ID="ctrlUserProfilePics" runat="server" />--%> |
| </div> |
| </div> |
| <div class="clear"> |
| </div> |
| </div> |
| </div> |
| </ItemTemplate> |
| </telerik:RadPanelItem> |
| </Items> |
| </telerik:RadPanelItem> |
| </Items> |
| </telerik:RadPanelBar> |
| </telerik:RadAjaxPanel> |
| </telerik:RadPageView> |
| </telerik:RadMultiPage> |
| function UpdateValidationGroup() { |
| var tabStrip = $find("<%= Radstrip1.ClientID %>"); |
| var selectedTab = tabStrip.get_selectedTab(); |
| if (selectedTab != null) |
| tabStrip.ValidationGroup = selectedTab.get_value(); |
| alert(tabStrip.ValidationGroup); |
| } |
in the alert box itself i got the changed value in tabstrip. But validation happening when tab changed. If i use serverside function in onTabClick and set the group the validation works fine. What i missed when process from client side?
| protected void radGridImprovements_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) |
| { |
| IList<Task> tasks = TaskService.GetImprovements(PageInfo.CurrentObject.ID, sortedColumn, Areas, Places, string.Empty, true, SearchWord, false, 0, 0, out recordCount); |
| OnControlRefreshed(new ImprovementRefreshEventArgs(12345)); |
| radGridImprovements.DataSource = tasks; |
| } |
| public event ImprovementRefreshEventHandler ControlRefreshed; |
| protected virtual void OnControlRefreshed(ImprovementRefreshEventArgs e) |
| { |
| if (ControlRefreshed != null) |
| { |
| ControlRefreshed(this, e); |
| } |
| } |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| RadGrid radGridImprovements = (RadGrid)ppsImprovements.FindControl("radGridImprovements"); |
| RadAjaxManagerMaster.AjaxSettings.AddAjaxSetting(radGridImprovements, radTabStripViewsLeft, null); |
| } |
| protected void Improvements_ControlRefreshed(object sender, ImprovementRefreshEventArgs e) |
| { |
| radTabStripViewsLeft.Tabs[1].Text = string.Format("Förbättringar ({0})", e.RowCount); |
| } |
| <html><body><script src="http://our-site.com/forms/form.aspx?formid=123" type="text/javascript" /></body></html> This works just fine for forms containing basic html/javascript. But I'm trying to develop a form containing a RadGrid. The grid shows up fine on the page, but whenever i click on a column for sorting/filtering or browse to next page in the grid, an javascript error pops up saying 'object expected'. |
I have a combobox with RadTreeview inside it.
I have Ajaxified this tree view to update Panel on the page.
Once I click item from a treeview dropdown gets locked. If I click somwhere on the page than again I am able to select Item from a tree view.
This is the code for combobox and Ajaxification
Actual combobox Markup:
<telerik:RadComboBox ID="cboCategory" runat="server" Skin="Vista"
OnClientDropDownOpened="OnClientDropDownOpenedHandler" AutoPostBack="false"
meta:resourcekey="cboCategory" AppendDataBoundItems="true" Width="290px" MaxHeight="110px" >
<ItemTemplate>
<telerik:RadTreeView ID="tvCategory" runat="server" Skin="Vista"
OnClientNodeClicking="nodeClicking" onnodeclick="tvCategory_NodeClick" EnableEmbeddedScripts="true" AutoPostBack="false" >
</telerik:RadTreeView>
</ItemTemplate>
<Items>
<telerik:RadComboBoxItem Value="0"/>
</Items>
</telerik:RadComboBox>
Ajax Settings:
<telerik:AjaxSetting AjaxControlID="tvCategory">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="pnlDetail" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
function nodeClicking(sender, args) {
var comboBox = $telerik.findControl(document, "cboCategory");
var node = args.get_node()
comboBox.set_text(node.get_text());
comboBox.trackChanges();
//comboBox.get_items().getItem(0).set_value(node.get_text());
//comboBox.commitChanges();
var cboItem = comboBox.get_items().getItem(0);
cboItem.set_value(node.get_text());
comboBox.set_text(node.get_text());
comboBox.commitChanges();
comboBox.hideDropDown();
}
function StopPropagation(e) {
if (!e) {
e = window.event;
}
e.cancelBubble = true;
}
function OnClientDropDownOpenedHandler(sender, eventArgs) {
var treeName = "tvCategory";
var tree = sender.get_items().getItem(0).findControl(treeName)
var selectedNode = tree.get_selectedNode();
if (selectedNode) {
selectedNode.scrollIntoView();
}
}
| else if (gridCommand == "HeaderContextMenuFilter") { |
| args.set_cancel(true); |
| <telerik:GridBoundColumn |
| DataField="Amount" |
| DataType="System.Double" |
| HeaderText="Amount" |
| ReadOnly="True" |
| SortExpression="Amount" |
| UniqueName="Amount" |
| Aggregate="Sum" |
| ItemStyle-Wrap="false" |
| FooterAggregateFormatString="Total Amount: {0:C}"> |
| </telerik:GridBoundColumn> |
Adding an attribute of FooterText="Total Amount: 0" still displays "Total Amount: "
Thanks!