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

I was trying to upload an image using the image manager and I received the following error message:

Cannot deserialize dialog paramaters. Please refresh the editor page.
Error Message:Invalid charachter in a Base-64 string

Has anyone else encountered this and if so do you know what it means or how to fix it?

Thanks,
James
James
Top achievements
Rank 1
 answered on 25 Aug 2010
6 answers
203 views
I can't seem to figure out how to associate my SQL DataSource to a ResourceControl in a customized advanced form template.  The examples online are not helping to figure this out.  Can you tell me what I'm doing wrong in this code:
<telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Vista" 
   DataKeyField="ID" DataSubjectField="subject" DataStartField="start" DataEndField="end"
   Height="650px" Width="375px" SelectedView="DayView"
   ShowFooter="true" RowHeight="20px"  ShowViewTabs="false"
   DayStartTime="08:00:00" DayEndTime="17:00:00"                        
   FirstDayOfWeek="Monday" LastDayOfWeek="Sunday"
   EnableDescriptionField="true"
   AppointmentStyleMode="Default"
   EnableResourceEditing="true"
   OnDataBound="RadScheduler1_DataBound"
   OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
   OnClientFormCreated="schedulerFormCreated"
   OnAppointmentDelete="RadScheduler1_AppointmentDelete"
   OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"
   OnAppointmentInsert="RadScheduler1_AppointmentInsert">
   <AdvancedForm Modal="false" />
   <TimelineView UserSelectable="false" />
   <AppointmentTemplate>
      <div class="rsAptSubject">
         <%# Eval("Subject") %>
      </div>
   </AppointmentTemplate>
   <TimeSlotContextMenuSettings EnableDefault="true" />
   <AppointmentContextMenuSettings EnableDefault="true" />
   <ResourceTypes>
      <telerik:ResourceType KeyField="CPK_CATEGORY" Name="Department" TextField="category" ForeignKeyField="DepartmentID" DataSourceID="dsTodoCategory" />
   </ResourceTypes>
   <AdvancedEditTemplate>
      <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit"
          Subject='<%# Bind("Subject") %>'
          Description='<%# Bind("Description") %>' 
          Start='<%# Bind("Start") %>'
      End='<%# Bind("End") %>'
      RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
      RoomID='<%# Bind("Room") %>'
      DepartmentID='<% Bind("Department") %>' />
    </AdvancedEditTemplate>
    <AdvancedInsertTemplate>
    <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert"
    Subject='<%# Bind("Subject") %>'
    Start='<%# Bind("Start") %>'
    End='<%# Bind("End") %>'
    Description='<%# Bind("Description") %>'
    RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
    RoomID='<%# Bind("Room") %>'
    DepartmentID='<% Bind("Department") %>' />
    </AdvancedInsertTemplate>
</telerik:RadScheduler>
  
In AdvancedForm.ascx:
<asp:Panel runat="server" ID="ResourceControls">
    <ul class="rsResourceControls">
       <li>
          <scheduler:ResourceControl runat="server" ID="ResRoom" Type="Room" Label="Room:" Skin='<%# Owner.Skin %>' />
       </li>
       <li>
          <scheduler:ResourceControl runat="server" ID="ResDepartment" Type="Department" Label="Department:" Skin='<%# Owner.Skin %>' />
       </li>
    </ul>
</asp:Panel>

I get this error when I compile:
Cannot create an object of type 'System.Object' from its string representation '<% Bind("Department") %>' for the 'DepartmentID' property. 

An example of associating a DataSourceID to a custom resource type would be most useful.

Thanks.  Dan
Dan
Top achievements
Rank 2
 answered on 25 Aug 2010
1 answer
222 views
Hi,

I am trying to set the SelectedValue of a RadComboBox that uses declarative databinding.  What I am finding is that the value is not set, as the combobox is not yet databound in the page load event.  This seems to differ with my experience with the standard asp.net dropdownlist, which is databound at that point.

Am I missing something here?  Is this expected behaviour?

Thanks.
Cori
Top achievements
Rank 2
 answered on 25 Aug 2010
1 answer
134 views
I'm tryng to create an Image Gallery that uses a datalist to drill down through the subgallery structure, and at each level there is a RadRotator that should display the images in the current subgallery.  The problem is that when I add the logic that changes the datasource parameter that controls which subgallery's images are being displayed, it stops the RadRotator from rotating.

See code below:

Imports System.IO
  
Partial Class test
    Inherits System.Web.UI.Page
  
    Protected Sub thumbRotator_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles thumbRotator.DataBound
        If thumbRotator.Items.Count < 4 Then
            thumbRotator.RotatorType = Telerik.Web.UI.RotatorType.FromCode
        End If
    End Sub
  
    Protected Sub thumbRotator_ItemClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadRotatorEventArgs) Handles thumbRotator.ItemClick
        Dim thumbUrl As String = CType(e.Item.FindControl("thumbImage"), HtmlImage).Src
        Dim previewUrl As String = "~/App_Content/gallery/" & Path.GetFileName(thumbUrl)
        imagePreview.ImageUrl = previewUrl
    End Sub
  
    Protected Sub DataList1_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles DataList1.ItemCommand
        If e.CommandName = "Gallery" Then
            ObjectDataSource1.SelectParameters("GalleryID").DefaultValue = e.CommandArgument
            ObjectDataSource2.SelectParameters("GalleryID").DefaultValue = e.CommandArgument
            thumbRotator.DataBind()
        End If
    End Sub
  
End Class

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="thumbRotator">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="imagePreview" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <table>
        <tr>
            <td colspan="3">
                <asp:DataList ID="DataList1" runat="server" DataSourceID="ObjectDataSource1" 
                    DataKeyField="GalleryID" RepeatColumns="5">
                    <ItemTemplate>
                        <img src='<%# DataBinder.Eval(Container.DataItem, "ImageID", "thumbs/{0}") %>' runat="server" id="thumbImage" /><br />
                        <asp:LinkButton ID="LinkButton1" runat="server" Text='<%# Eval("Title") %>' CommandName="Gallery" CommandArgument='<%# Eval("GalleryID") %>' />
                    </ItemTemplate>
                </asp:DataList>
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                    SelectMethod="GetGalleriesByParent" TypeName="GalleryManager" >
                    <SelectParameters>
                        <asp:Parameter DefaultValue="0" Name="GalleryID" Type="Int32" />
                        <asp:Parameter Name="ShowParentGallery" Type="Boolean" DefaultValue="True" />
                    </SelectParameters>
                </asp:ObjectDataSource>
            </td>
        </tr>
        <tr>
            <td>
                <img src="gallery_scroll_left.png" id="gallery_scroll_left" />
            </td>
            <td style="vertical-align:middle; height: 140px;">
                <telerik:RadRotator ID="thumbRotator" runat="server" RotatorType="ButtonsOver" 
                        Width="572" Height="118px" ItemHeight="118" ItemWidth="145" FrameDuration="1" 
                        ScrollDirection="Left,Right" DataSourceID="ObjectDataSource2">
                    <ItemTemplate>
                        <div class="itemTemplate">
                            <img src='<%# DataBinder.Eval(Container.DataItem, "ImageUrl", "thumbs/{0}") %>' runat="server" id="thumbImage" />
                        </div>
                    </ItemTemplate>
                    <ControlButtons LeftButtonID="gallery_scroll_left" RightButtonID="gallery_scroll_right" />
                </telerik:RadRotator>
                <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetImagesByGallery" TypeName="GalleryManager">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="0" Name="GalleryID" Type="Int32" />
                    </SelectParameters>
                </asp:ObjectDataSource>
            </td>
            <td>
                <img src="gallery_scroll_right.png" id="gallery_scroll_right" />
            </td>
        </tr>
        <tr>
            <td colspan="3" style="text-align: center;">
                <asp:Image ID="imagePreview" runat="server" ImageUrl="no-image.png" />
            </td>
        </tr>
    </table>
    </form>
</body>
Fiko
Telerik team
 answered on 25 Aug 2010
1 answer
105 views
Using v2009.3.1314.35 with VS2008, IE8.

  1. On a blank page I put a RadScriptManager, a RadAjaxManager, and a RadListBox, leaving everything set to the default skin. 
  2. I add ten items to the list box via the Build RadListBox smart tag, all with the default text
  3. Set AutoPostBack to true
  4. Hook into the SelectedIndexChanged event, but do not add any code to the handler.
  5. Configure the ajax manager so that the list box updates itself.

Then I run the page and watch the memory allocation for iexplore.exe.  It starts out around 12megs.  

Every time I click one of the items in the list box, the memory allocation increases, and I can pretty quicky grow it to 20 megs before my finger gets tired.

Known issue?


Kamen Bundev
Telerik team
 answered on 25 Aug 2010
1 answer
92 views
I have a class that has a property which is a collection of other objects (think Order with List<OrderDetail>). I want to populate the nested grid with the child objects (Order Detail) but I can't get to the parent object in the DetailTableBind event, and I can't find how to specify the property that contains the child data. The documentation is clear for requerying the database everytime to get the nested data, but that isn't always practical in the real world.
Tsvetina
Telerik team
 answered on 25 Aug 2010
2 answers
127 views
Im trying to migrate to RadControls "Prometheus" from the lastest version of 5. I use many RadGrid components inside ModalPopupExtender, and I could pass by with version 4 and 5 of the grid. Now with Prometheus it doent work anymore, the grid render with no height only the header and fotter show, but the body of the grid seams to render with height 0. Ive try many combinations of propertie settings and couldnt get it to work. After a rerender caused by any reason (like sorting or column reordering, window resizing, etc...) the grid renders correctly. Maybe if I could force a re-render I could go around this problem, but I havent been able to do that.
Anyone has any clue about this?
Jon
Top achievements
Rank 1
 answered on 25 Aug 2010
1 answer
218 views
Hello. Is there some way to save the selected tab and multiview index after a postback, so that the tab I was visiting is selected after a postback and not index 0? Thank you.
Veronica
Telerik team
 answered on 25 Aug 2010
7 answers
183 views

Hi.

I'm using GridDropDownColumn to display and edit values in grid:

1.<telerik:GridDropDownColumn DataField="MYFIELD" HeaderText="Entity" UniqueName="MYFIELD"
2.    DataSourceID="EntityDataSource" ListValueField="ID" ListTextField="NAME"
          EnableEmptyListItem="true">
4.</telerik:GridDropDownColumn>

and ObjectDataSource for show human-readable value of "MY_FIELD" column:
1.<asp:ObjectDataSource ID="EntityDataSource" runat="server" SelectMethod="GetEntityList" 
2.TypeName="..."/>

When i;n group grid by this column - in grid headers shown "ID" value:
"MYFIELD: 45".
How i may to show "NAME" field in groups header?

Pavlina
Telerik team
 answered on 25 Aug 2010
2 answers
195 views
I need to add whitespace between the <li> elements that get generated as part of the HTML output of the RadTagCloud and I can't figure out how to do it.  It's causing a problem in my design in IE 7.

I've attached a screenshots of the page in IE7 (not working - text "escapes" outside the yellow Frequently Searched Terms box) and IE8 (working - text is confined inside the yellow Frequently Searched Terms box).

Viewing the source of my page shows this is the HTML output of the cloud control:

<!-- 2010.2.713.40 --><ul class="rtcTagList">

<li class="rtcTagItem"><a href="/issues/1/agriculture-food-nutrition.aspx" rel="tag" title="Agriculture, Food, Nutrition" style="font-size:10px;">Agriculture, Food, Nutrition</a></li><li class="rtcTagItem"><a href="/issues/2/commerce-industry.aspx" rel="tag" title="Commerce &amp; Industry" style="font-size:11px;">Commerce & Industry</a></li><li class="rtcTagItem"><a href="/issues/3/culture-media.aspx" rel="tag" title="Culture &amp; Media" style="font-size:10px;">Culture & Media</a></li><li class="rtcTagItem"><a href="/issues/4/education-labor.aspx" rel="tag" title="Education &amp; Labor" style="font-size:13px;">Education & Labor</a></li><li class="rtcTagItem"><a href="/issues/5/energy.aspx" rel="tag" title="Energy" style="font-size:11px;">Energy</a></li><li class="rtcTagItem"><a href="/issues/6/environment-natural-resources.aspx" rel="tag" title="Environment &amp; Natural Resources" style="font-size:13px;">Environment & Natural Resources</a></li><li class="rtcTagItem"><a href="/issues/7/government-operations-budget.aspx" rel="tag" title="Government Operations &amp; Budget" style="font-size:11px;">Government Operations & Budget</a></li><li class="rtcTagItem"><a href="/issues/8/health-human-services.aspx" rel="tag" title="Health &amp; Human Services" style="font-size:15px;">Health & Human Services</a></li><li class="rtcTagItem"><a href="/issues/9/immigration.aspx" rel="tag" title="Immigration" style="font-size:11px;">Immigration</a></li><li class="rtcTagItem"><a href="/issues/10/international-relations-trade.aspx" rel="tag" title="International Relations &amp; Trade" style="font-size:20px;">International Relations & Trade</a></li>

</ul><input id="ctl00_ctl00_ctl00_cphBody_cphContent_cphContent_fsProfile_cldTerms_ClientState" name="ctl00_ctl00_ctl00_cphBody_cphContent_cphContent_fsProfile_cldTerms_ClientState" type="hidden" />

As you can see, the <li> elements are all jammed together with no carriage returns, spaces, tabs, nothing, which is not standard.  At a minimum, you'd write an unordered list like this:

<ul>
<li>item 1</li>
<li>item 2</li>
</ul>

If I view source of my page, copy all the HTML and put it in a new static HTML page with carriage returns between the <li> elements as I indicated in the example above, the page displays correctly in both IE7 and IE8. So I ultimately need the HTML output of the TagCloud to look like this:

<!-- 2010.2.713.40 --><ul class="rtcTagList">

<li class="rtcTagItem"><a href="/issues/1/agriculture-food-nutrition.aspx" rel="tag" title="Agriculture, Food, Nutrition" style="font-size:10px;">Agriculture, Food, Nutrition</a></li>
<li class="rtcTagItem"><a href="/issues/2/commerce-industry.aspx" rel="tag" title="Commerce &amp; Industry" style="font-size:11px;">Commerce & Industry</a></li>
<li class="rtcTagItem"><a href="/issues/3/culture-media.aspx" rel="tag" title="Culture &amp; Media" style="font-size:10px;">Culture & Media</a></li>
<li class="rtcTagItem"><a href="/issues/4/education-labor.aspx" rel="tag" title="Education &amp; Labor" style="font-size:13px;">Education & Labor</a></li>
<li class="rtcTagItem"><a href="/issues/5/energy.aspx" rel="tag" title="Energy" style="font-size:11px;">Energy</a></li>
<li class="rtcTagItem"><a href="/issues/6/environment-natural-resources.aspx" rel="tag" title="Environment &amp; Natural Resources" style="font-size:13px;">Environment & Natural Resources</a></li>
<li class="rtcTagItem"><a href="/issues/7/government-operations-budget.aspx" rel="tag" title="Government Operations &amp; Budget" style="font-size:11px;">Government Operations & Budget</a></li>
<li class="rtcTagItem"><a href="/issues/8/health-human-services.aspx" rel="tag" title="Health &amp; Human Services" style="font-size:15px;">Health & Human Services</a></li>
<li class="rtcTagItem"><a href="/issues/9/immigration.aspx" rel="tag" title="Immigration" style="font-size:11px;">Immigration</a></li>
<li class="rtcTagItem"><a href="/issues/10/international-relations-trade.aspx" rel="tag" title="International Relations &amp; Trade" style="font-size:20px;">International Relations & Trade</a></li>

</ul><input id="ctl00_ctl00_ctl00_cphBody_cphContent_cphContent_fsProfile_cldTerms_ClientState" name="ctl00_ctl00_ctl00_cphBody_cphContent_cphContent_fsProfile_cldTerms_ClientState" type="hidden" />


Is it possible to do this?  If so, how?
Rachael
Top achievements
Rank 1
 answered on 25 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?