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. |
[FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2725283 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +102 System.Web.UI.WebControls.ImageButton.LoadPostData(String postDataKey, NameValueCollection postCollection) +134 System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +11 System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +673 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2967 |
| Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load |
| cn = New SqlConnection(ConStr) |
| ds = New DataSet |
| dv = New DataView |
| Dim ad As New SqlDataAdapter("select * from mytable", cn) |
| ad.Fill(ds, "codeid") |
| dv.Table = ds.Tables("codeid") |
| RadGrid.DataSource = dv |
| End Sub |
| Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click |
| Dim lpos As Integer |
| dv.Sort = "codeid" |
| lpos = dv.Find(btnSearch.Text) |
| 'here we want to set current row to lpos |
| RadGrid.Rebind() |
| End Sub |
But when it comes to setting the data set's index we found the property was read only.
RadGrid2.SelectedItems.Item(0).DataSetIndex = 4
Property 'DataSetIndex' is 'ReadOnly'.
Is there another property we have to use instead to achieve the same effect of getting the grid to scroll down to the right place in the dataset position the user searched for?
self.opener.AddSelectedOilGrade(selValue,selText);
In the parent page I am trying to find the item existing or not and then selecting this item. Below is the code.var
combo = $find("<%= cboOilinUse.ClientID %>");
var item = combo.findItemByText(strText);
if(item)
{item.select();}
else
{
var comboItem = new Telerik.Web.UI.RadComboBoxItem();
comboItem.set_text(strText);
comboItem.set_value(strValue);
comboItem.select();}
I have refered to the example given in the below URL.
http://www.telerik.com/help/aspnet-ajax/combo_clientsidebasics.html
But this is returning NULL(var comboItem = new Telerik.Web.UI.RadComboBoxItem();).
Please let me know if anything is going wrong.
I am unable to Render page from the wesite designed using Telerik ASP.Net Ajax contol.
We are using Vs2008
Deplyed in Separate server which is under fire wall protection.
Firewall restricts the page stating Microsoft Security Bulletin MS07-027
For testing I will send you my sample test code
<%
@ Page Language="C#" AutoEventWireup="true" CodeBehind="GridTest.aspx.cs" Inherits="Test.WebUI.GridTest" %>
<%
@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head runat="server">
<title>Test Page</title>
</
head>
<
body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="None">
<HeaderContextMenu EnableTheming="True">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</HeaderContextMenu>
<MasterTableView>
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn UniqueName="column" DataField="Name" HeaderText="Name">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="column1" DataField="Age" HeaderText="Age">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="column2" DataField="Place" HeaderText="Place">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<FilterMenu EnableTheming="True">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</FilterMenu>
</telerik:RadGrid>
</div>
</form>
</
body>
</
html>
Code behind file
using System;
using System.Collections.Generic;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Xml.Linq;
namespace Test.WebUI
{
public partial class GridTest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
List<TestData> ltdata = new List<TestData>();
ltdata.Add(
new TestData { Name = "Test1", Age = "34", Place = "London" });
ltdata.Add(
new TestData { Name = "Test2", Age = "34", Place = "London" });
ltdata.Add(
new TestData { Name = "Test3", Age = "34", Place = "London" });
ltdata.Add(
new TestData { Name = "Test4", Age = "34", Place = "London" });
RadGrid1.DataSource =
from r in ltdata
select r;
RadGrid1.DataBind();
}
}
public class TestData
{
public string Name { get; set; }
public string Age { get; set; }
public string Place { get; set; }
}
}
Designer genetated file
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Test.WebUI {
public partial class GridTest {
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// ScriptManager1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.ScriptManager ScriptManager1;
/// <summary>
/// RadGrid1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Telerik.Web.UI.RadGrid RadGrid1;
}
}
Note :We are be render/view the page in intranet.