Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
287 views
Hi,
1.I am new to telerik RadScheduler
2.I was able to bind the dataset to RadScheduler its working fine.
3.How can I bind dataset to the <ResourceTypes> in code behind ?.

Thanks
Sabarish


sabarishbabu
Top achievements
Rank 1
 answered on 23 Jul 2009
1 answer
99 views
I am using a TabStrip control with the following definition:
            <telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="0" runat="server" MultiPageID="RadMultiPage1" 
                Width="100%" EnableEmbeddedSkins="False" Skin="" ScrollChildren="true">  
            </telerik:RadTabStrip> 
            <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">  
            </telerik:RadMultiPage> 
 

I am creating the tabs in code with user controls:
    Private lngCampaignId As SqlDecimal  
    Public Property CampaignId() As SqlDecimal  
        Get  
            Return lngCampaignId  
        End Get  
        Set(ByVal value As SqlDecimal)  
            lngCampaignId = value 
        End Set  
    End Property  
 
    Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load  
        Dim CCBll As New CampaignChildBLL  
        Dim CampaignChildTable As New CampaignChild_DB.CampaignChildDataTable  
        Dim CampaignChildRow As CampaignChild_DB.CampaignChildRow = Nothing 
        Dim tab As RadTab  
        Dim pageView As RadPageView  
 
        If Not Page.IsPostBack Then  
            'Retrieve child campaigns  
            CampaignChildTable = CCBll.GetCampaignChildByCampaignId(CampaignId)  
 
            For Each CampaignChildRow In CampaignChildTable  
                tab = New RadTab  
                tab.Text = CampaignChildRow.ChildCampaignName  
                tab.CssClass = "normaltab" 
                tab.SelectedCssClass = "selectedtab" 
                tab.HoveredCssClass = "hovertab" 
 
                RadTabStrip1.Tabs.Add(tab)  
 
                pageView = New RadPageView  
                pageView.ID = CampaignChildRow.ChildCampaignId  
                pageView.CssClass = "pageview" 
                RadMultiPage1.PageViews.Add(pageView)  
            Next  
        End If  
    End Sub  
 
    Protected Sub RadMultiPage1_PageViewCreated(ByVal sender As Object, ByVal e As RadMultiPageEventArgs) Handles RadMultiPage1.PageViewCreated  
        Dim CampaignId As String = e.PageView.ID  
        Dim c As New Campaign  
        Dim cd As New CampaignData  
        Dim success As Boolean  
        Dim ctl As Control  
 
        c.ID = CampaignId 
        success = cd.RetrieveCampaign(c)  
 
        'Load the appropriate template editing control  
        Select Case c.CampaignTemplateId  
            Case Campaign.CampaignTemplate.Feature  
                ctl = LoadControl("ctlFeaturedResource.ascx")  
                ctl.ID = CampaignId & "_ctl"  
                CType(ctl, ctlFeaturedResource).CampaignId = CampaignId  
                e.PageView.Controls.Add(ctl)  
 
            Case Campaign.CampaignTemplate.List  
                ctl = LoadControl("ctlFeaturedList.ascx")  
                ctl.ID = CampaignId & "_ctl"  
                CType(ctl, ctlFeaturedList).CampaignId = CampaignId  
                e.PageView.Controls.Add(ctl)  
 
                'Case Campaign.CampaignTemplate.PromoFeature  
                '    ctl = LoadControl("ctlPromoResource.ascx")  
                '    ctl.ID = CampaignId & "_ctl"  
                '    CType(ctl, ctlPromoResource).CampaignId = CampaignId  
                '    e.PageView.Controls.Add(ctl)  
 
            Case Campaign.CampaignTemplate.Broadcast  
                ctl = LoadControl("ctlTodaysBroadcast.ascx")  
                ctl.ID = CampaignId & "_ctl"  
                e.PageView.Controls.Add(ctl)  
 
            Case Campaign.CampaignTemplate.Substitute  
                ctl = LoadControl("ctlTodaysBroadcast.ascx")  
                ctl.ID = CampaignId & "_ctl"  
                e.PageView.Controls.Add(ctl)  
 
            Case Campaign.CampaignTemplate.Odyssey  
                ctl = LoadControl("ctlOdysseyBroadcast.ascx")  
                ctl.ID = CampaignId & "_ctl"  
                CType(ctl, ctlOdysseyBroadcast).CampaignId = CampaignId  
                e.PageView.Controls.Add(ctl)  
 
            Case Campaign.CampaignTemplate.Rotator  
                ctl = LoadControl("ctlProductRotator.ascx")  
                ctl.ID = CampaignId & "_ctl"  
                CType(ctl, ctlProductRotator).CampaignId = CampaignId  
                e.PageView.Controls.Add(ctl)  
        End Select  
    End Sub  
 

And using the following css:
.normaltab  
{  
    background: url('../Images/bookstore_activetab.jpg') no-repeat;  
    font-family: Verdana, Arial, Helvetica, sans-serif;  
    font-size: 11px;  
    text-align:left;  
    width: 175px;  
    height: 28px;  
    color: #5b3b23;  
    padding-top: 10px !important;  
}  
 
.selectedtab  
{  
    background: url('../images/bookstore_inactivetab.jpg') no-repeat;  
}  
 
.hovertab  
{  
    color: #ad9d91;  
}  
 
.pageview  
{  
    background-color: #EBF5F6;  
}  
 

My problem is that when I have ScrollChildren on, my tabs disappear.  I believe that it is because I am not using a standard skin.  Can you tell me what other css styles I need to define in order to use ScrollChildren with my custom tab css.

Thanks.
Dan
Yana
Telerik team
 answered on 23 Jul 2009
1 answer
402 views
Hi,

I have a grid and a date range parameter and need to send those date parameter values through the DataNavigateUrlFormat.  How can I do this without hardcoding those values and using the date parameter values (dynamic values)

Example: In the column mentioned below I want to pass “From Date” and “To Date” values as part of the query string.

   <telerik:GridHyperLinkColumn DataNavigateUrlFields="EmailCampaigns" UniqueName="EmailCampaigns"

     DataNavigateUrlFormatString="EmailTrackingBreakup.aspx?MailType={0}&amp;FrmDt=01/01/2009&amp;ToDt=05/31/2009" DataTextField="EmailCampaigns"

     HeaderText="Email Campaigns" SortExpression="EmailCampaigns">

     <HeaderStyle HorizontalAlign="Left" />

     <ItemStyle HorizontalAlign="Left" />

   </telerik:GridHyperLinkColumn>                              


Thanks,

Nikolay Rusev
Telerik team
 answered on 23 Jul 2009
2 answers
297 views
Hi,

I have bumped into a small issue regarding sending a JSON object to AjaxManager from client side javascript.

I'm trying to send this string representation of a JSON object:
{'cmd':'Rebind','data':[{'newid':5},{'newname':'test'}]} 

Client side script calling ajaxRequest() thus:
function refreshView(args) { 
    var ajxmgr_id = '<%= RadAjaxManager.GetCurrent(Page).ClientID %>'
    var oAjxMgr = $find(ajxmgr_id); 
    var jsonArgs = JSON.stringify(args); 
    oAjxMgr.ajaxRequest(jsonArgs); 
 
where "args" is the JSON object.

Error message received when passing this JSON object:
Sys.WebForms.PageRequestManagerServerErrorException: Type System.String not supported for deserializing a matrix.

This is the full error message I receive (excuse the Norwegian :P )
Detaljer om feil på webside 
 
Brukeragent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2) 
Tidsstempel: Fri, 17 Jul 2009 13:10:31 UTC 
 
 
Melding: Sys.WebForms.PageRequestManagerServerErrorException: Typen System.String støttes ikke for deserialisering av en matrise. 
Linje: 6 
Tegn: 62099 
Kode: 0 
URI: http://localhost/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_scrmgr_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3ann-NO%3a0d787d5c-3903-4814-ad72-296cea810318%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.2.701.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3ann-NO%3a7e598a31-3beb-49a1-914c-5f530240f0ea%3a16e4e7cd%3a86526ba7%3aed16cbdc%3a11a04f7e%3af7645509%3a24ee1bba%3a1e771326%3aa7e79140%3a4cacbc31%3ae524c98b%3a874f8ea2%3a19620875%3a33108d14%3abd8f85e4%3a596d7b53%3a8674cba1%3aef347303%3ab7778d6c%3ac08e9f8a%3aa51ee93e%3a59462f1%3a63b115ed%3a1569bb5f%3adc7e0bd%3a1c565fc%3ac408cfaa 
 

As you can see the JSON object has a nested array in it ('data':[...]). Are there limitations to the complexity of the JSON strings I can pass to ajaxRequest()?

The problem is circumvented by simplifying the JSON object to a flat structure; i.e.:
{'cmd':'Rebind','newid':5,'newname':'test'

With same client side script above, there are no errors and everything works fine.

Is it possible to pass complex nested JSON objects as strings or can I only send flat structured {"key", "value", ...} type objects?

I'm using the lastes RadControls for ASP.NET Ajax (2009.2.701.35)

regards,
Ernst
Nikolay Rusev
Telerik team
 answered on 23 Jul 2009
1 answer
162 views
Hi, i need chage  font size EmptyMessage
Shinu
Top achievements
Rank 2
 answered on 23 Jul 2009
1 answer
877 views

I used from the training book the delete command.  The problem that I am having is when I try to delete a record in the RadGrid, I get the following error:

Object referance not set to an instance of an object

The weird thing is I got it from the Telerik RadControls Ajax book and besides that I have no clue.  See attached code:

Imports System.Data.SqlClient  
Imports Telerik.Web.UI  
 
Partial Class EmployeeFamily  
    Inherits System.Web.UI.Page  
 
 
    Protected Sub RadGrid1_DeleteCommand(ByVal source As ObjectByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.DeleteCommand  
 
        Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)  
        Dim MemberFamilyID As String = item.OwnerTableView.DataKeyValues(item.ItemIndex)("MemberFamilyID").ToString()  
        Try 
            'Delete command execute  
            SqlDataSource1.DeleteCommand = "DELETE FROM MemberFamilyInfo Where MemberFamilyID = '" + MemberFamilyID + "'" 
        Catch ex As Exception  
            RadGrid1.Controls.Add(New LiteralControl("Unable to delete MemberFamily. Reason: " + ex.Message))  
            e.Canceled = True 
        End Try 
 
 
 
    End Sub 
End Class 
 
Shinu
Top achievements
Rank 2
 answered on 23 Jul 2009
1 answer
387 views
I have an updateable radgrid for which I would like to use a static combo box as an edit control.
How do I bind the edit control to the grid column, and how will it be displayed when not in edit mode?

<

 

MasterTableView Width="100%" EditMode="InPlace"

 

<

 

telerik:GridDropDownColumn DropDownControlType="RadComboBox"

 


 

<telerik:RadComboBox ID="RadComboBox1" runat="server">

 

 

<Items>

 

 

<telerik:RadComboBoxItem Value="3" Text="Excellent" />

 

 

<telerik:RadComboBoxItem Value="2" Text="Good" />

 

 

<telerik:RadComboBoxItem Value="1" Text="Fair" />

 

 

<telerik:RadComboBoxItem Value="0" Text="Poor" />

 

 

<telerik:RadComboBoxItem Value="4" Text="N/A" />

 

 

</Items>

 

 

</telerik:RadComboBox>

 

Shinu
Top achievements
Rank 2
 answered on 23 Jul 2009
2 answers
44 views
Hey!

I've got a custom skin for a Panel Bar with each item's background image
as well as rollover image set in the skin file in CSS. However, what I need
is to set the images dynamically because each item is a product category
that has its own background image. I understand there's different ways
of doing this - and I'm also cautious of performance... Any advice and
examples much appreciated!!
Joe
Top achievements
Rank 1
 answered on 23 Jul 2009
2 answers
54 views
Hi! I have a problem. I'm using the RadGrid Control with Auto-Generate Columns at runtime, but i need adjust the every column to width the field ,How can I adjust the columns automatically?
Thanks for your help!

Bryan..



Brygom
Top achievements
Rank 1
 answered on 23 Jul 2009
2 answers
98 views
Hi,

when setting the filter attribute of the comboboxcontrol to one of the available types, i got a problem with assigned images.
The images where not shown in the generated dropdownbox. Not setting the filter shows all assigned images as wished.

Is this a known or volitional issue, or is this a bug?
I would like to see the images there, why is it not possible?

Or am i just doing something wrong?

Thanks for a short reply.
Mark P
Top achievements
Rank 1
 answered on 23 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?