Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
276 views
Hello,

I was wondering if it was possible to display both an image button and text within my edit column on the Ajax rad grid? For example I have the following edit column in my grid:

                <Columns> 
                    <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"   
                    EditImageUrl="~/Images/icons/Edit-small.gif"
                </Columns> 


It displays my icon nicely, but I would like to have it also display the word 'Edit' off to the right of the image; so that it would be [Image] Edit
 I can't seem to get it to have both ways; is this possible?

Thanks,
Flea
Shinu
Top achievements
Rank 2
 answered on 30 Apr 2009
5 answers
197 views
Hi

How can I change the ButtonType and the column position of the delete and edit column generated by AutoGenerateEditColumn/AutoGenereateDeleteColumn? 

And where should i create the rest of the columns on codebehind? I want to implement a custom autogenerate columns method, where I check a config file for creating columns. Where should i implement this logic? I want to have access to the bound datasource, to check the date type of the bound properties vs my columns.

Thanks beforehand
Princy
Top achievements
Rank 2
 answered on 30 Apr 2009
1 answer
136 views
I have a hierarchical grid that uses NeedDataSource, and the entire page uses an AjaxManager. The second level of the grid has a GridButtonColumn and after it executes the SQL statement it needs to, it rebinds the grid. However, on rebind the row is no longer expanded. Is there a way to persist the expanded state?

Bill
Princy
Top achievements
Rank 2
 answered on 30 Apr 2009
24 answers
596 views

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!

 

 

Dallas Sehlhorst
Top achievements
Rank 1
 answered on 29 Apr 2009
1 answer
224 views

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);

Daniel
Telerik team
 answered on 29 Apr 2009
2 answers
378 views
I have a radcombobox that I want the user to either select from or type in a new item.  If the item is new I want them to click a button to add it to the list permanently.  The text is entered into the RadComboBox fine and then once the focus is removed from the RCB I get the error below.  Can some point me in the right direction. 

aspx.vb

 

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:

 

 

Server Error in '/' 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.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat) +717374
   Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value) +118

[InvalidCastException: Conversion from string "" to type 'Integer' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value) +721303
   Mistras_Admin_ClientSetup.RCBClient_SelectedIndexChanged(Object o, RadComboBoxSelectedIndexChangedEventArgs e) +87
   Telerik.Web.UI.RadComboBox.OnSelectedIndexChanged() +183
   System.Web.UI.Page.RaiseChangedEvents() +89
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2777

 


Version Information: Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074

John
Top achievements
Rank 1
 answered on 29 Apr 2009
7 answers
157 views
The InputManager is a great idea and works well for NumericTextBoxes and RadTextBoxes but not so well for dates. I have a form with quite a few DatePickers. I~27d like to use the InputManager to help cut down on the size the of the page ~28300 KB~21~29. Unfortunately~2c as far as I can tell~2c the InputManager will not let me take a bunch of textboxes and make them into equivalent DatePickers with all the same features of a DatePicker ~28especially the calendar button~29. Technically~2c I~27m sure I could spend a bunch of time mimicing the features of the DatePickers but is not worth the time.~3cbr /~3e
Thomas
Top achievements
Rank 1
 answered on 29 Apr 2009
3 answers
207 views
hello,
i have a problem with the RadTreeView for ASP.NET AJAX, in fact i got a Runtimeerror "Sys.ArgumentTypeException: The object with the type Telerik.Web.UI.RadTreeView can not be converted to the Type Telerik.Web.UI.RadTreeView" which seems strange to me.
This error is not reproducible, due to the fact that this error occours from time to time, when i do different operations on the website. for example i click ten times on a node and everything works fine, but on click later ther come the error.

the error occoured here:
Type.prototype.getBaseMethod = function Type$getBaseMethod(instance, name) {
    /// <summary locid="M:J#Type.getBaseMethod" />
    /// <param name="instance"></param>
    /// <param name="name" type="String"></param>
    /// <returns type="Function" mayBeNull="true"></returns>
    var e = Function._validateParams(arguments, [
        {name: "instance"},
        {name: "name", type: String}
    ]);
    if (e) throw e;
    if (!this.isInstanceOfType(instance)) throw Error.argumentType('instance', Object.getType(instance), this);
    var baseType = this.getBaseType();
    if (baseType) {
        var baseMethod = baseType.prototype[name];
        return (baseMethod instanceof Function) ? baseMethod : null;
    }

    return null;
}

i hope you can help me!
best regards,
hannes
Haris
Top achievements
Rank 1
 answered on 29 Apr 2009
3 answers
135 views
Hey,

I'm working with a RadPanelBar in a master page.   The menu is three levels deep and I'm using a datasource to populate the menu options.  The problem I'm having is when I go from menu option to menu option the menus collapse each time. I'd like to keep the menu expanded as the user goes from page to page.  I've tried "PersistStateInCookie" but sometimes it works and sometimes it does not.  Any Suggestions would be appreciated.

Thanks,
Larry
Larry
Top achievements
Rank 1
 answered on 29 Apr 2009
4 answers
181 views
OK here's what I have:

A nested RadGrid, on the nested grid an Edit form Template, on the template a RadDatePicker, which has a required field Validator attached to it. I also have 2 other Rad Text boxes with Validator controls.

Here's what is happening, I load the web page, click to view the second grid, click to add new, and the calendar popup doesn't work, no pop up, no error message nothing. If I try to submit the page, the validators fire and show the warnings, now the calendar control works OK.

Andy Ideas?

Andy
Georgi Krustev
Telerik team
 answered on 29 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?