| <ClientSettings> |
| <DataBinding Location="Default.aspx" SelectCountMethod="GetProductCount" SelectMethod="GetProducts"> |
| </DataBinding> |
| <Selecting AllowRowSelect="True" /> |
| </ClientSettings> |
| [WebService(Namespace = "Products")] |
| [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] |
| // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. |
| [System.Web.Script.Services.ScriptService] |
| public class Products : System.Web.Services.WebService { |
| [WebMethod] |
| public static IEnumerable GetProducts(int startRowIndex, int maximumRows) |
| { |
| var northwind = new NorthwindDataContext(); |
| var products = from p in northwind.Products |
| select new |
| { |
| ProductID = p.ProductID, |
| Name = p.ProductName, |
| CategoryName = p.Category.CategoryName, |
| Price = p.UnitPrice, |
| UnitsInStock = p.UnitsInStock |
| }; |
| return products.Skip(startRowIndex).Take(maximumRows); |
| } |
| [WebMethod] |
| public static int GetProductCount() |
| { |
| var northwind = new NorthwindDataContext(); |
| var count = northwind.Products.Count(); |
| return count; |
| } |
| } |
| function onNodeClicking(sender, args) { | |
| var treeNode = args.get_node(); | |
| var attribs = treeNode.get_attributes(); | |
| attribs.setAttribute("test", "54321"); | |
| attribs2 = treeNode.get_attributes(); | |
| alert(attribs2.getAttribute("test")); | |
| } |
| protected void Page_Load(object sender, EventArgs e) | |
| { | |
| if (!IsPostBack) { | |
| RadTreeView1.Nodes.Add(new Telerik.Web.UI.RadTreeNode("Node1")); | |
| RadTreeView1.Nodes.Add(new Telerik.Web.UI.RadTreeNode("Node2")); | |
| RadTreeView1.Nodes.Add(new Telerik.Web.UI.RadTreeNode("Node3")); | |
| RadTreeView1.Nodes[0].Attributes.Add("test", "1234"); | |
| RadTreeView1.Nodes[1].Attributes.Add("test", "1234"); | |
| RadTreeView1.Nodes[2].Attributes.Add("test", "1234"); | |
| } | |
| } | |
| protected void RadTreeView1_NodeClick(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e) { | |
| TextBox1.Text = e.Node.Attributes["test"]; | |
| } |
Hi,
I have a RadGrid inside an <asp:panel> in my page.
The grid has a GridButtonColumn that does some AJAX operation in the displayed page. here is definition in the grid:
<
radG:RadGrid ID="grdFavorites" runat="server" CssClass="RadGrid"
AllowPaging="True"
AllowSorting="True"
EnableAJAX="false" EnableAJAXLoadingTemplate="false"
AutoGenerateColumns="False"
Skin="None"
LoadingTemplateTransparency="7"
PageSize="100" Width="100%" GridLines="None"
OnItemCommand="grdFavorites_ItemCommand"
OnItemDataBound="grdFavorites_ItemDataBound" onfocus="this.blur();"
AllowMultiRowEdit="true"
OnNeedDataSource="grdFavorites_NeedDataSource">
<ClientSettings>
<ClientEvents OnRequestStart="RequestStart" />
</ClientSettings>
<MasterTableView
HeaderStyle-CssClass="RadGridHeader"
FooterStyle-CssClass="RadGridHeader"
ItemStyle-CssClass="RadGridItem"
AlternatingItemStyle-CssClass="RadGridAltItem"
Width="100%"
GridLines="none" DataKeyNames="Id" Style="cursor:pointer;"
AllowMultiColumnSorting="True"
BorderWidth="0">
<Columns>
.......
<radG:GridButtonColumn ItemStyle-Width="7%" ButtonType="ImageButton" ImageUrl="../Images/MyImage.gif"
HeaderText="Remove"
UniqueName="RemoveFavorites" CommandName="RemoveFromFavorites"
Reorderable="False" Resizable="False">
<ItemStyle Width="40px" />
<HeaderStyle Width="40px" />
</radG:GridButtonColumn>
</
Columns>
This works ok on IE (tested versions 6-7). However, in Firefox I get an error, It seems the error is on the imagebutton (see the below NET error).
Can anyone help out on this one? Is this a known issue? I can debug the code, but I think it is useless...
Thank you!
Server Error in 'xxx' Application.
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
|
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
|
[FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2755599 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +112 System.Web.UI.WebControls.ImageButton.LoadPostData(String postDataKey, NameValueCollection postCollection) +138 System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +12 System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +661 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1194 |
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

