| <Columns> | |
| <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton" | |
| EditImageUrl="~/Images/icons/Edit-small.gif"> | |
| </Columns> |
hi, i have a simple mvc page which uses ajax to display a set of records depending on the filter provided. this page works fine but whenever i try to add a telerik control (either a radcombobox or a radgrid) i get this error:
microsoft jscript runtime error: sys.mvc.asynchyperlink is null or not an object
and sometimes this one:
microsoft jscript runtime error: sys.webforms.pagerequestmanager is null or not an object
any help is appreciated.
thanks!
Hi,
I'm new to RadGrid so sorry if this is a silly question.
I have an application where I am adding 'custom columns' to a DataGrid. My custom column is a class i have created that derives from TemplateField.
I now need to freeze the first column of the DataGrid so i am trying to migrate from a standard gridview to a RadGrid.
My question is how can I programmatically add TemplateFields to a RadGrid?
Example code from my application:
// custom class that represents a column in a GridView
public class CustomColumnTemplate : TemplateField{ // code removed for brevity }
// custom class that represents the ItemTemplate for CustomColumnTemplate
public class BaseSetOfValuesColumn : ITemplate{ // code removed for brevity }
// code to add custom columns to GridView
CustomColumnTemplate sovCol = new CustomColumnTemplate();
sovCol .ItemTemplate = new SetofValuesColumn();
myGridView.Columns.Add(sovCol);
Protected Sub ItemsRequested(ByVal o As Object, ByVal e As RadComboBoxItemsRequestedEventArgs) Handles RCBClient.ItemsRequested
Try
RCBClient.Items.Clear()
Dim selectCommand As New SqlCommand("GetClients", myConnection)
selectCommand.CommandType = CommandType.StoredProcedure
selectCommand.Parameters.AddWithValue(
"@CN", e.Text)
Dim adapter As New SqlDataAdapter(selectCommand)
Dim DT As New DataTable()
adapter.Fill(DT)
RCBClient.DataTextField =
"Client"
RCBClient.DataValueField =
"ClientID"
RCBClient.DataSource = DT
RCBClient.DataBind()
Catch
End Try
End Sub
Protected Sub btnLoad_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLoad.Click
Using selectCommand As New SqlCommand("CreateClient", myConnection)
selectCommand.CommandType = CommandType.StoredProcedure
selectCommand.Parameters.AddWithValue(
"@CN", RCBClient.Text)
myConnection.Open()
Using reader As SqlDataReader = selectCommand.ExecuteReader
While reader.Read
Build_CustomerRep(reader(
"CID"))
Build_Facility(reader(
"CID"))
End While
End Using
myConnection.Close()
End Using
End Sub
.aspx
<tr><td>Client:</td>
<td><Telerik:RadComboBox ID="RCBClient" EnableEmbeddedSkins="false" Skin="Default" runat="server" ShowMoreResultsBox="False" EnableLoadOnDemand="True" OnItemsRequested="ItemsRequested" AutoPostBack="true" >
<CollapseAnimation Type="OutExpo" Duration="200"></CollapseAnimation>
</Telerik:RadComboBox>
</td>
<td><asp:Button runat="server" ID="btnLoad" Text="Create New" /></td>
</tr>
Error:
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. |
|
Version Information: Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074