Using the ASP.NET grid, I had a page that persisted client-side selection, using this example:
http://www.telerik.com/community/code-library/submission/b311D-khchg.aspx
After upgrading to the AJAX control, this page now errors, due to Javascript choking on:
function
GridCreated(){
grid = this;
var pageIndex = grid.CurrentPageIndex.toString();
...specifically, "grid.currentPageIndex is null or not an object".
Suggestions?
Bill
I have a radtreeview inside radcombobox. My treeview is populated on demand. This combobox resides inside formview which is by default in edit mode. And i have an objectdatsource that contains the select and update mode.
The problem with my update mode is, the selected value of combox always becomes 0 it doesn't change even when using combo.set_value("something");
In client side the value changes but not in server side even when trackChanges() and commitChanges() is applied.
The following link contains the type of solution but its not working, with my q1 2008 415 version. it has a special parameter called <telerik:AjaxComboValueParameter />. Wouldn't it be better if that parameter would be provided by Telerik instead of trying to code it.
http://www.telerik.com/community/code-library/submission/b311D-ttdgm.aspx
Following is my javascript file for setting the value of the combobox when selecting a treenode. My objectdatasource update parameter contains <asp:ControlParameter Name="parentId" Type="Int32" ControlID="cbo" PropertyName="SelectedValue" />. The name of my radcombox inside formview edit mode is cbo and treeview is radPortalsTree.
function radTreeViewPortalParent_OnClientNodeClicking(sender,eventArgs)
{
var comboBox=$find('<%=FormViewPortal.FindControl("cbo").ClientID%>');
var node=eventArgs.get_node();
var portalTree=$find('<%= radPortalsTree.ClientID %>');
if(portalTree.get_selectedNode().get_value()!=node.get_value())
{
comboBox.trackChanges();
comboBox.set_text(node.get_text());
comboBox.set_value(node.get_value());
var cboItem=comboBox.get_items().getItem(0);
cboItem.set_value(node.get_value());
comboBox.commitChanges();
}
comboBox.hideDropDown();
}

window[
"<%= RadAjaxManager1.ClientID %>"].ajaxRequest(srcElement);
the srcElement being the argument we are sending (usually a string).
Unfortunately with the upgrade to the q1 08 this is no longer working and just coming back with a javascript error saying that RadAjaxManager1 is null or not an object.
i have also tried -
var AjaxMan = Document.GetElementByID("<%= RadAjaxManager1.ClientID %>");
AjaxMan.ajaxRequest(srcElement);
Is there a new way to call the ajax request in javascript??
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn"/>
System goes to Edit mode well - I getting required events at server side (OnEdit, OnItemCommand).<
telerik:GridTemplateColumn UniqueName="EditColumn">
<ItemTemplate>
<asp:LinkButton ID="lbEdit" CommandName="ComEdit" runat="server" Text="Edit" />
<asp:LinkButton ID="lbUpdate" CommandName="ComUpdate" runat="server" Text="Update" Visible="false"/>
<asp:LinkButton ID="lbCancel" CommandName="ComCancel" runat="server" Text="Cancel" Visible="false"/>
</ItemTemplate>
</telerik:GridTemplateColumn>
Telerik.Web.UI.
GridDataItem dataItem = e.Item as Telerik.Web.UI.GridDataItem;