Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
72 views
Hi there,

Just a quick question about the image manager in the rad editor control. We have added around 20 images but the images at the bottom of the list are inaccessible because there are no scrollbars. Am I missing something? Is there a way to re-size the image manager window or get scroll bars in the image list?

Cheers,
Jane.
Rumen
Telerik team
 answered on 25 May 2008
1 answer
161 views

I have a dropdownlist in my EditFormTemplate. In the code for OnItemCreated  I have the following:

If TypeOf e.Item Is GridEditableItem And e.Item.IsInEditMode Then
    'create oDataTable
    Dim ddl As DropDownList = TryCast(e.Item.FindControl("ddOfficeID"), DropDownList)
    ddl.DataSource = oDataTable
    ddl.DataTextField = "OfficeName"
    ddl.DataValueField = "OfficeID"
    ddl.DataBind()
End If

In the code for OnUpdateCommand I have the following:

Dim editedItem As GridEditableItem = TryCast(e.Item, GridEditableItem)
Dim PersonnelID As String = editedItem.OwnerTableView.DataKeyValues(editedItem.ItemIndex)("PersonnelID").ToString()
'get other values...
Dim OfficeID As String = (TryCast(editedItem.FindControl("ddOfficeID"), DropDownList)).Text
strSQL = "UPDATE tPersonnel SET [OtherValues] = '" & OtherValues& "', [OfficeID] = " & OfficeID & " WHERE ([PersonnelID] = " & PersonnelID & ")"
'update database...

So far my dropdownlist is bound when the grid goes into edit mode and the database is updated when the Update button is clicked. 

My only problem is that when the edit form is loaded the dropdownlist does not reflect the original selected value. When I tried adding  SelectedValue='<%# Eval("OfficeID")%>'  to my dropdownlist, it generates the following error:

Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.

Since the dropdown is being bound on ItemCreated, I'm confused by that error. I've seen some other threads about this, but frankly they were over my head. Can someone explain in super simple terms how to set the selectedvalue? 
 
Thanks! 

Missing User
 answered on 25 May 2008
2 answers
167 views
I have columns in RadGrid.

I one column (HyperlinkColumn) I want to short DataTextField when it is longer than 50 characters for example.

I have this code:
  If (TypeOf (e.Item) Is GridDataItem) Then 
 
            'Get the instance of the right type 
            Dim dataBoundItem As GridDataItem = e.Item 
 
            'Check the formatting condition 
            If (dataBoundItem("wydarzenie_id").Text).Length > 6 Then 
                dataBoundItem("wydarzenie_id").Text = "asd" 
                'Customize more... 
            End If 
        End If 

But it doesn't work properly (I've put this code into Rad ItemDataBound event).

Can anyone help me?
Grzesiek
Top achievements
Rank 2
Iron
 answered on 25 May 2008
2 answers
91 views
Hi,

I have a context menu attached to a radGrid (V: 2008.1.515.20) using the OnRowContextMenu example given in the Knowledge Base. Everything works fine except for when there are no rows in the grid and I need the context menu to add rows to the grid.

I created another context menu that targets the radGrid and it works fine for the first time the page is loaded but as soon  as the grid is refreshed it doesn't work ( I have a tree that refreshes the grid every time a node is selected - like a file system).

How do I get a context menu to appear every time the grid is clicked, whether it contains rows or not? And why does the second context menu that targets the grid only work once.

Regards
Roger
Roger
Top achievements
Rank 1
 answered on 24 May 2008
1 answer
123 views
Hi all,
I've used RadEditor to insert text to my database. I have a custom edit page that I also uses RadEditor. But during data binding (I've used content='<%# Bind("MyContent" %>'), the line-break doesn't appear. Everything appeared as one long line.

I've check on the RadEditor before my insert and see that the line break tag are <br/>, but when insert to SQL database, the <br/> tag disappeard and replaced by squared symbols. Any help would be greatly appreciated.

Thanks,
Kenny.
Kenny
Top achievements
Rank 1
 answered on 23 May 2008
1 answer
109 views
I'm planning to move my application from old radcontrols to the asp.net ajax one.

However, going through my code, I hit a roadblock with one existing feature of the radajaxservicemanager synchronous call (PerformAsyncronousRequests="false"). I can't figure out how to do this with the scriptmanager webservice proxy call.

This is a critical feature for my application, the web page must wait when the webservice GetValue(element) method is being called to return a value.

Can anyone suggest a replacement for the old synchronous radajaxservice manager call? Or sometype of workaround that works with asp.net ajax?

Also, anyone knows how to selectively define which calls should be async and which one is sync? Some of the webservices methods can be asynchronous, but they're all synchronous at the moment. This one is  not necessary, but will be great if I can figure it out.

Thanks!
HHalim
Top achievements
Rank 2
 answered on 23 May 2008
3 answers
195 views
Hi,

I have a rad grid that:

<

telerik:RadGrid...
AutoGenerateEditColumn="True"
AutoGenerateDeleteColumn="True"

<

MasterTableView...
AutoGenerateColumns="True"

That means i do not have any columns in aspx because i bind the grid to the datasource in "DropDownList1_SelectedIndexChanged" event.

How to:
1- Change "Edit,Delete" column index?
ex: Make Delete column the last one.
 
2- Convert "Edit,Delete" column "ButtonType"  to "ImageButton"?

hazzoom
Top achievements
Rank 1
 answered on 23 May 2008
0 answers
192 views
Hello!

I've got an Asp.Net textbox (top at image) and RadInput control (bottom).
http://img395.imageshack.us/my.php?image=radcl8.jpg

As you can see in Asp.Net textbox I have padding from left, in RadInput not although the CSS class is the same for both,

.txt_box { 
    padding: 3px 5px; 
    border: 1px solid #CCCCCC; 
    background: url(../images/homepage19.gif) repeat-x left top; 
} 

Can anyone help me and explain if I'm able to have padding from left in RadInput?

Edit:
Ok, I solve the problem:
<EnabledStyle CssClass="txt_box" PaddingLeft="4px" /> 
Grzesiek
Top achievements
Rank 2
Iron
 asked on 23 May 2008
6 answers
508 views
Since the GridTemplateColumn does not have a databind event I guess I need to use the 

protected void OnItemDataBoundGrid(object sender, Telerik.Web.UI.GridItemEventArgs e)

for the rad grid

So I need something like

protected void OnItemDataBoundGrid(object sender, Telerik.Web.UI.GridItemEventArgs e)

{

if (e.Item is GridDataItem)

{

GridDataItem item = (GridDataItem)e.Item;

GridTemplateColumn gtc = (GridTemplateColumn)item["gtc1"].FindControl("idontknow");

}

}


I need to change the text in the header.

I originall had the text here

<telerik:GridTemplateColumn HeaderText="CLICK HERE TO SORT" SortExpression="CostToDate" UniqueName="gtc2">

<HeaderTemplate>

<asp:LinkButton ID="lblCostYear" CommandName="Sort" runat="server" OnDataBinding="OnBindCostYearHeader"></asp:LinkButton>

</HeaderTemplate>

But if I put the text in the linkbutton the automatic sorting doesnt take effect
help

matt
Top achievements
Rank 1
 answered on 23 May 2008
1 answer
115 views
I have a DNN module using Scheduler.  In my imports I have:

Imports

Telerik.Web.UI

    Protected Sub RadScheduler1_AppointmentCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.AppointmentCreatedEventArgs) Handles RadScheduler1.AppointmentCreated  
        If (e.Appointment.Visible _  
    AndAlso Not IsAppointmentRegisteredForTooltip(e.Appointment)) Then 
            RadToolTipManager1.TargetControls.Add(e.Appointment.ClientID, True)  
        End If 
 
    End Sub 

I get the error msg the name IsAppointmentRegisteredForTooltip is not declared.  What's missing?
Thank you.
Karl
Peter
Telerik team
 answered on 23 May 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?