or

| Public Class GridImageItemColumn |
| Inherits GridTemplateColumn |
| Public Class GridImageItemTemplate |
| Implements ITemplate |
| Public column As GridImageItemColumn = Nothing |
| Public Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn |
| Dim image as New Image() |
| image.ID = Me.column.UniqueName |
| container.Controls.Add(image) |
| AddHandler image.DataBinding, AdressOf image_DataBinding |
| End Sub |
| Private Sub image_DataBinding(ByVal sender As Object, ByVal e As EventArgs) |
| Dim dataItem As GridDataItem = CType(CType(sender, Control).NamingContainer, GridDataItem) |
| If dataItem IsNot Nothing Then |
| Dim image As Image = CType(sender, Image) |
| image.CssClass = "t_img" |
| Dim value As String = DataBinder.Eval(dataItem.DataItem, Me.column.DataField).ToString() |
| If Not String.IsNullOrEmpty(value) Then |
| image.ImageUrl = "~/images/" & value & ".png" |
| End If |
| End Sub |
| End Class |
| Public Sub New() |
| Dim template As New GridImageItemTemplate() |
| template.column = Me |
| Me.ItemTemplate = template |
| End Sub |
| Me.RadToolTipManager1.TargetControls.Add(target.ClientID, (TryCast(e.Item, GridDataItem)).GetDataKeyValue("ID").ToString(), True) |
Hi Guys,
I publish my web app to several server. But one of my installation returns ajax exceptions. I check the system date and it's correct.
You can find the fiddler detail and ie error message below.
-------------------------IE error message ..
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.2)
Timestamp: Tue, 5 Apr 2011 08:26:16 UTC
Message: ASP.NET Ajax client-side framework failed to load.
Line: 44
Char: 34
Code: 0
----------------------- Fiddler message
| URL | http://pc:80/sharestore/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=sm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a3f7f575c-f971-4b26-8881-745c41ac5a2c%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2011.1.329.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a9f6c9f10-1e09-4cc8-989d-ef8c903e2042%3a16e4e7cd%3a86526ba7%3a874f8ea2%3af7645509%3a24ee1bba%3ae330518b%3a1e771326%3ac8618e41%3ae4f8f289%3a6a6d718d%3a7165f74%3af46195d3%3aaa288e2d%3a11a04f7e%3a5836 |
|---|
<telerik:RadWindow ID="DemoLessionWindow" Skin="Web20" runat="server" VisibleStatusbar="false" BackColor="Black" VisibleTitlebar="true" OffsetElementID="offsetElement" Width="1028" Height="690" Behaviors="Close" KeepInScreenBounds="false" Modal="true" ShowContentDuringLoad="false" ></telerik:RadWindow><tel:GridTemplateColumn HeaderText="Assign To" UniqueName="AssignTo" AllowFiltering="false"> <ItemTemplate> <tel:RadComboBox id="rcAssignTo" runat="server"> <ItemTemplate> <uc:CaseworkerList ID="ucCaseworkerList" runat="server" DisplayMode="CaseTransferAssign" OnAssignToCaseworker="ucCaseworkerList_AssignToCaseworker" /> </ItemTemplate> </tel:RadComboBox> </ItemTemplate></tel:GridTemplateColumn>/// <summary>Handles rgActiveCases' ItemDataBound event by getting the CaseProgramUser/// and AgencyProgram keys, finding the CaseworkerList control embedded in/// the GridTemplateColumn's combobox, and calling its load method.</summary>////// <param name="sender">Source of the event.</param>/// <param name="e"> Grid item event information.</param>protected virtual void rgActiveCases_ItemDataBound(object sender, GridItemEventArgs e){ if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem) { var item = e.Item as GridDataItem; var cpuKey = (int)item.GetDataKeyValue(Constants.EntityKeys.CASE_PROGRAM_USER_KEY); var apKey = (int)item.GetDataKeyValue(Constants.EntityKeys.AGENCY_PROGRAM_KEY); var dropDown = item.FindControl("rcAssignTo") as RadComboBox; if (dropDown != null) { var nestedView = dropDown.FindControl("ucCaseworkerList") as CaseworkerList; if (nestedView != null) { nestedView.LoadCaseworkerList(apKey, cpuKey); } } }}
<telerik:RadGrid ID="HeadCountRadGrid" runat="server" Skin="Sunset_Custom" GridLines="Both" AutoGenerateColumns="false" Width="100%" EnableEmbeddedSkins="false" AllowSorting="false" OnNeedDataSource="HeadCountRadGrid_OnNeedDataSource" > <MasterTableView BorderStyle="None" BorderWidth="0px" GroupsDefaultExpanded="true" GroupLoadMode="Client" > <GroupByExpressions> <telerik:GridGroupByExpression> <SelectFields > <telerik:GridGroupByField FieldName="Section" HeaderValueSeparator=" " HeaderText=" " /> </SelectFields> <GroupByFields> <telerik:GridGroupByField FieldName="Section" SortOrder="None" /> </GroupByFields> </telerik:GridGroupByExpression> </GroupByExpressions> <Columns> <telerik:GridBoundColumn DataField="Group" ItemStyle-HorizontalAlign="Right" HeaderText="" ItemStyle-Width="250" HeaderStyle-Width="270"/> <telerik:GridBoundColumn DataField="NumberOfStudents" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Center" HeaderText="Number of Students" /> </Columns> </MasterTableView> </telerik:RadGrid>