Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
175 views
Hello - I've been fussing with this a bit and I just can't seem to figure out what's going on.

I'm using an ASP.NET AJAX Tool Kit TabContainer and on an initial non-visible tab, I have the scheduler control  The problem I'm experiencing is that initially the Scheduler only shows one hour on the day calendar.  As soon as I move forward or back days or switch view types, it resizes and shows full schedule.

Any thoughts of what I can try?

Thanks in advance

Kevin D. Wolf
Tampa, FL
Kevin Wolf
Top achievements
Rank 1
 answered on 05 Jun 2008
2 answers
150 views
I'm using RadControls for ASPNET AJAX Q1 2008 and I have discovered a problem with the RadGrid and lists of custom objects. Suppose that you define these classes:

Public 

Class Parent

Private _Cusip As String

Public

Property Cusip() As String

Get

Return _Cusip

End Get

Set(ByVal value As String)

_Cusip = value

End Set

End Property

Public Sub New()

End Sub

End 

Class

Public 

Class Child1

Inherits Parent

Public Sub New()

End Sub

End 

Class

 

Public

Class Child2

Inherits Parent

Public Sub New()

End Sub

End

Class


And suppose that you create a grid like this:

<

telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="false" AutoGenerateColumns="false"

 CellPadding="2" CellSpacing="1" BorderWidth="0px" Width="500px" ShowFooter="True" OnNeedDataSource="GetData" >

 <MasterTableView >

 <Columns>

 <telerik:GridBoundColumn

HeaderText="Cusip"

 DataField="Cusip"

 ReadOnly="True" />

 </Columns>

 </MasterTableView>

 </telerik:RadGrid>

And the GetData method is defined like this:

Protected Sub GetData(ByVal sender As Object, ByVal e As GridNeedDataSourceEventArgs)

 Dim list As New List(Of Parent)

Dim a As New Child1

Dim b As New Child1

Dim c As New Child2

a.Cusip = "a"

b.Cusip = "b"

c.Cusip = "c"

list.Add(DirectCast(a, Parent))

list.Add(DirectCast(b, Parent))

list.Add(DirectCast(c, Parent))

RadGrid1.DataSource = list

End Sub

When you try viewing the page, you get the error "Unable to cast object of type 'Child2' to type Child1'."  However, if you change the code so that you add a, then c, and finally b to the list, the grid displays properly.

The problem is that when you have a list of objects of different types in the data source, the RadGrid assumes that if the first two objects are of the same type, then all of the objects are of that type. It then tries to cast all of the objects in the list to object of the first type encountered. However, if the first two objects are of different types, then it does not try casting the remaining objects to the first type. This error occurs even though the list is declared to be a list of objects of the parent type and the objects are cast to the parent type before they are added to the list.

Is a fix for this problem available?

M
Top achievements
Rank 1
 answered on 05 Jun 2008
12 answers
239 views
Hi,
my grid has TableLayout="Fixed" and the columns are dynamically created.
Now I have a strange behaviour when setting in one Column (in the ItemCreated Handler):
gridItem["Column"].wrap=false
When the width of this Column is not set, the column does'nt wrap (as expected).
But when I set the width of this Column, wrap=false is ignored.
What to do?

Thanks for answering,
Andreas
Andreas Kaech
Top achievements
Rank 1
 answered on 05 Jun 2008
1 answer
214 views
Goal is to have a form with RadAjaxManager, but with one Button
which posts back normally and writes out an Excel file via Response.Write(...)
So, RadAjaxManager just needs to let this button be implemented without any Ajaxification.

Already looked at
http://www.telerik.com/community/forums/thread/b311D-bddbka.aspx


What didn't work
  • Added EnableEventValidation="false" to button
    <
    asp:Button ID="btnExportToExcel" runat="server" Text="Export to Excel" Width="96px" Enabled="False" EnableEventValidation="false" /></td>

  • Added RadScriptManager1.RegisterPostBackControl(btnExportToExcel) to Page_Load

    Protected
    Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
           RadScriptManager1.RegisterPostBackControl(btnExportToExcel)
    End Sub

Using Telerik AJAX Manager v2008.1.515.20

All the Ajaxification works great.  If I set RadAjaxManager1.EnableAJAX = False, it also works fine.

Any suggestions to make this button fire without AJAX?

Steve
Telerik team
 answered on 05 Jun 2008
4 answers
161 views
Hi,

EDIT: Sorry I put in datepicker on topic title when I meant Calendar.

Not sure how to do this,  it would be fantastic if I could get the 3 calendars on the left hand side of the demo to highlight if a appointment has been made.

I.e. if there was an appointment on the 4th June the calendars to the side would highlight to illustrate there is a appointment on that day.

I have been looking at the "special days" option in the calendar but I am unsure how to modify it to work in the fashion described above.

The scheduler is refereing to a SQL database and therfore the calendar would also need to refer to the same source.

Has anyone done this or can help?

Thanks in advance....
Peter
Telerik team
 answered on 05 Jun 2008
1 answer
125 views
Hi there.

I have a generic form templates that displays Database content (much like ASP.NET Dynamic Data). RadDateTimePicker still has some issues when compared to the other controls. If I loop over the control collection it identifies itself as an internal type RadDatePickingInput instead of RadDateTimePicker.

thanks,
Elmar
Missing User
 answered on 05 Jun 2008
1 answer
108 views
1.If I have a situation wherein I need to add columns to Appointments tables and use it to add further functionality. For ex: I need to add a column called
"urgency" and the user should update the Urgency field via update template. How do I make changes to the Appointment class and do I have access to the class to add my own members and methods?
2.I also need to add some non udpateable from UI fields but need those to be a part of the Appointment class so as to do something like e.Appointment.MyField etc. Please suggest.
Peter
Telerik team
 answered on 05 Jun 2008
4 answers
369 views
I set "AllowColumnResize" to True. If I resize a column nothing happens. I also tried "ResizeGridOnColumnResize" but nothing happens. Are there any secrets on that I can't see a difference to the Online Demo in my project?
Markus
Top achievements
Rank 1
 answered on 05 Jun 2008
1 answer
88 views
Hi,
     I have a RadEditor control positioned on a aspx form using absolute positioning. I need to programmatically move and resize it.

My problem is that the toolsbar menu does not move (reposition) itself to the new top/left position of the RadEditor.

Has anyone run into this issue and/or figured out a way to show/hide or move the toolsbar menu?

Thanks, Andy
Rumen
Telerik team
 answered on 05 Jun 2008
4 answers
166 views
Hi everyone,

I found an issue with the RadGrid Component. If I add a GridCalculatedColumn to the RadGrid, I can't write the sample of code you could find below anymore. In fact, e.Item.DataItem belongs to type DynamicCalss1 (see in debugger) but I can't use it for accessing to the methods of the Item.

protected void gridViewCtrl_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)  
{  
     if (e.Item.ItemType == Telerik.Web.UI.GridItemType.Item ||  
          e.Item.ItemType == Telerik.Web.UI.GridItemType.AlternatingItem)  
     {  
          ProductDataContract prod = e.Item.DataItem as ProductDataContract;  
          prod.DoSomething();  
     }  
} 

The only workaround I found is to not use this type of column, but it is really unconfortable to not use it.

I'm pretty sure there is another solution, so I will be very happy if you could help me.

Thanks.

Rosen
Telerik team
 answered on 05 Jun 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?