Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
146 views
Hi

I have a radgrid that has a GridBoundColumn with the ability to be searched. I want to include a list of links outside the grid that provides an alphabet for the user to search by.

This alphabet would be the equivalent to typing 'A' (for example) into the search box and clicking 'Starts With'. Correct me if I'm wrong but I think the best approach for this would be to somehow use javascript to simulate this action.

When the user clicks the 'A' link I want to find the search textbox and put an 'A' in it and do filterButton.click(). However, I cannot find the search button in the grid because it doesn't exist in the page. It gives me an error that it can't find the textbox I'm searching for.

Any suggestions welcome

Thanks
Corina
Top achievements
Rank 1
 answered on 22 Nov 2011
1 answer
90 views

My Editor background is using my site's background. Ugh.

http://www.telerik.com/help/aspnet-ajax/editor-content-area-appearance-problems.html
I want to override. I've looked this up and I find code-in-front but want to use codebehind. It should be something like this, but this says the EditorCssFile is not part of the collection.

myEditor.CssFiles.EditorCssFile = resolvePath & "Scripts/RadEditorStyleSheet.css"

 I found this link:
http://www.telerik.com/help/aspnet/editor/radeditor-telerik.webcontrols.radeditor-cssfiles.html
which recommends doing this:
RadEditor1.CssFiles = New String(2) {"~/styles/1.css", "~/styles/2.css"}

But this says "CssFiles" is read only. So it appears this page is obsolete?

How can I load this programmatically?

thanks!



Rumen
Telerik team
 answered on 22 Nov 2011
1 answer
64 views
Greetings,

I'm not sure if this is a reported bug yet or not, however, my company uses version the following version of Telerik Controls:

Telerik.Web.UI_2011_2_809

Currently we experience an issue with the following browser/operating system combo:  IE8 and Win7 Ultimate.

The issue is when using the RadEditor's image manager, when a user tries to upload an image, the Select button is missing.  If you click where it should be, it works.  Once more, once an image is picked, the text does not show up in the text box for it.  This issue does not show up in any other browser or operating system combo.  It was proven to be a bug due that it was on your site originally, however, it may have been corrected since the newer version has come out.  Just not sure if it is a bug still or not.  Thanks.

Kindest Regards,
Chad Johnson
Rumen
Telerik team
 answered on 22 Nov 2011
10 answers
181 views
Hi all:
   I use dockzone to load docks in. each dock is user control. I have a dropdownlist which user select and then it will load the existing dockstates

the issue now is that the dock order mess up after I switch dropdownlist  selection. example: for dropdownlist, it has value "a" and value "b". when I select value "A", it will load dockstate1 and then when I select value "b", it will load dockstate2 from database. now I select  value "A"  and the dockstate1 is loaded and docks are ordered correctly. then I change some dock's postion by drag and drop. every thing works fine and dock index saved to database with correct number. then I select value "b" so dockstate2 is loaded. Then  I reselect value  "a", the dockstate1 is reloaded from database with correct index but the dock orders are changed. they order with the Alphbetic instead of the previous order. I found the dock/state index  value changed after   RadDockLayout1.GetRegisteredDocksState()  is called. why the dock index change ? Please see rough codes

any suggestion?

Thanks
Helena
Protected Sub RadDockLayout1_LoadDockLayout(ByVal sender As Object, ByVal e As DockLayoutEventArgs) Handles RadDockLayout1.LoadDockLayout
        'Populate the event args with the state information. The RadDockLayout control
        ' will automatically move the docks according that information.
        'If isNeedReload Then
        Dim state As DockState
        Dim intIndex As Integer
  
            Dim serializer As Script.Serialization.JavaScriptSerializer = New Script.Serialization.JavaScriptSerializer()
            Dim stateList As List(Of DockState) = Me.RadDockLayout1.GetRegisteredDocksState()
              If Not stateList Is Nothing Then
                For Each state In stateList
                     e.Positions(state.UniqueName) = state.DockZoneID
                    e.Indices(state.UniqueName) = state.Index
                Next
            End If
        End If
    End Sub
  
  
  
  
Protected Sub RadDockLayout1_SaveDockLayout(ByVal sender As Object, ByVal e As DockLayoutEventArgs) Handles RadDockLayout1.SaveDockLayout
        Dim strMethodName As String = Me.strClassName & "RadDockLayout1_SaveDockLayout"
        Try
  
     Dim stateList As List(Of DockState) = Me.RadDockLayout1.GetRegisteredDocksState()
                
//on stateList , the dock index changed ????
  
End sub              
  
  
    Protected Sub RadComBoxView_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles RadComBoxView.SelectedIndexChanged
        Dim strMethodName As String = Me.strClassName & "RadComBoxView_SelectedIndexChanged"
        Try
  
            If Not Me.RadComBoxView.SelectedItem Is Nothing Then
  
                'reset SystemUserWidgetID
                SystemUserWidgetID = -1
                Me.CurrentViewTypeID = Me.RadComBoxView.SelectedItem.Value
  
                'need to load WidgetState based on viewid
                Me.GetUserWidgetState()
               CreateWidgetStates()
  
End if                         
           End Sub
 
Slav
Telerik team
 answered on 22 Nov 2011
2 answers
93 views
Hi,

I have a radcombobox declared like this:
<telerik:RadComboBox ID="RadComboBox1" Runat="server" Width="300"
    AppendDataBoundItems="True">
    <ItemTemplate>
        <div class="item c1"><asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("URLImage") %>' /></div>
        <div class="item c2"><%# Eval("Imagename") %></div>
    </ItemTemplate>
</telerik:RadComboBox>

 and I'm populating whith this code:

RadComboBox1.DataSource = getimages()
Function getimages() As List(Of Fotos)
    Dim ofile, foto
    Dim ObjetoFSO = Server.CreateObject("Scripting.FileSystemObject")
    Dim ObjetoFolder = ObjetoFSO.GetFolder(Server.MapPath("../images/works"))
    Dim ofotos = New List(Of Fotos)
 
    For Each ofile In ObjetoFolder.Files
        foto = New Fotos()
        foto.Imagename = fichero.name
        foto.URLImage = ResolveUrl("~/Images/works/thumbs/" & ofile.name)
        ofotos.Add(foto)
    Next
 
      file= Nothing
    ObjetoFolder = Nothing
    ObjetoFSO = Nothing
 
    Return ofotos
End Function
Everything seems to be allright butI'm unable to select an item . The dropdown show the elements but in the displayed text I always have:
"SampleProject.WebForm13+Fotos"

Am I doing something wrong? Where is my mistake?

Thanks!
Perico
Top achievements
Rank 1
 answered on 22 Nov 2011
8 answers
157 views
I have a combo box with items that allow a user to select a built-in date range or specify a custom date range (see attached ff.jpg for example). When an Item is selected, I postback and perform various funciions depending on the selected date range. If the selected Item is "Custom dates..." or "Custom to date...", I display a tooltip server-side which allows users to enter a custom date range. Everything works fine... however, if the user enters a custom date range by selecting "Custom dates...", they cannot then go and alter their date range because they can't re-select "Custom Dates...". It is already selected. They have to choose another item in the list and then select "Custom dates...". Since the SelectedIndexChanged event is not fired if you select an item which is already selected, Is there some way to handle an item_clicked, or similar event instead of SelectedIndexChanged server-side? Ideally, I would retrieve the value of the item clicked in this event handler and only perform the necessary functions if it corresponds to the "Cusomt Dates..." or "Custom to date..." items. Otherwise, would perform my functionality in the SelectedIndexChanged server-side handler.
Dimitar Terziev
Telerik team
 answered on 22 Nov 2011
3 answers
321 views
I need control of the table columns widths when exporting to PDF from the RadEditor.   I followed instructions from http://www.telerik.com/help/aspnet-ajax/grid-pdf-export.html (on exporting HTML to PDF).  I followed the instructions under 'Exporting HTML Tables' to test controlling table widths.  I copied and pasted the following into my RadEditor and exported the PDF and it does not work.  I suspect that it may not be working because of the automatic corrections that RadEditor makes (I disabled 2 filters but it did not correct it). 

1) How do I disable this auto correction?
2) Is the html table below correct for controlling column widths in PDFs?

Please see source:

ASPX Page:
<%@ Page Language="VB" %>
 
<%@ 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">
 
<script runat="server">
 
    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        RadEditor1.ExportToPdf()
    End Sub
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        If IsPostBack = False Then
            RadEditor1.DisableFilter(Telerik.Web.UI.EditorFilters.DefaultFilters)
            RadEditor1.DisableFilter(Telerik.Web.UI.EditorFilters.ConvertToXhtml)
        End If
    End Sub
</script>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
      <telerik:RadEditor ID="RadEditor1" Runat="server"
        ContentFilters="DefaultFilters,PdfExportFilter"><ExportSettings Pdf-PageBottomMargin="10px" Pdf-PageFooterMargin="0px" Pdf-PageHeaderMargin="0px"
            Pdf-PageLeftMargin="10px" Pdf-PageRightMargin="10px"
            Pdf-PageTopMargin="10px" OpenInNewWindow="true" >
            <Pdf PageTopMargin="10px" PageBottomMargin="10px" PageLeftMargin="10px" PageRightMargin="10px" PageHeaderMargin="0px" PageFooterMargin="0px"></Pdf></ExportSettings><Tools><telerik:EditorToolGroup></telerik:EditorToolGroup></Tools><Content>
</Content></telerik:RadEditor>
    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
</div>
    </form>
</body>
</html>

Table example that I pasted directly off of help link:
<table width="300px">
   <colgroup>
       <col style="200px" />
       <col style="20px" />
   </colgroup>
   <tr>
       <td>Cell1</td>
       <td>Cell2</td>
   </tr>
</table>

After I paste the above HTML in the HTML section of the RadEditor, I clicked back to Design, then back to HTML and it changes the code to this:
<table style="width: 0px;" width="300px">
   <colgroup>
       <col style="">
       <col style="">
   </colgroup>
   <tbody><tr>
       <td>Cell1</td>
       <td>Cell2</td>
   </tr>
</tbody></table>

Rumen
Telerik team
 answered on 22 Nov 2011
1 answer
170 views
I have an image within the itemtemplate of a RadListView. I'm populating several of the controls within the template on the ItemDataBound event for the ListView with the Entity Framework. I'm new to the Entity Framework so need some help in figuring out how to populate the RadBinaryImage control.

The method I have for retrieving the image is this:

public static byte[] GetAccommodationMainImage(int accomID)
{
    byte[] image = null;
 
    using (var myEntity = new MyEntity1())
    {
        var photoRecord = (from accom in myEntity.WTO_Photos
                           where accom.accom_id == accomID
                           && accom.in_use_as_main == true
                           select accom).First();
        image = photoRecord.image;
    }
 
    return image;
}
Kevin
Top achievements
Rank 2
 answered on 22 Nov 2011
4 answers
177 views
I have 4 appointments that I am loading from a custom datasource(datatable) into the RadScheduler control.

When the page first loads the AppointmentDataBound event occurs 4 times. (once for each appointment)

When I change VIEWS (from MONTH to WEEK or vice versa) that the AppointmentDataBound event occurs 8 times.
Double.

Am I doing something wrong?  Is this by design?
Is there anything that I can do to stop it from doing this?

Thanks in advance for any guidance.
Ivana
Telerik team
 answered on 22 Nov 2011
6 answers
343 views
Hi !!
The scenario is this:

RadComboBox with LoadOnDemand="True".
The user starts inputing some text, and the combo load the results when the ItemRequestTimeout is reached.
The input text is still in the combo, even before the combo load the results, so the user can continue to input more text, or change parts of it, etc. The combo keeps making the searches and everything works perfect.

The problem is that when I enable the CheckBoxes="True", everytime the combo makes a search to load the results, it clear the user's inputed text, and the user cannot keep inputing more text.

Can i keep the user's text in the combo with CheckBoxes = true ?

Thank's
Kalina
Telerik team
 answered on 22 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?