Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
448 views

My application and controls work fine on my local machine, the local dev server, and the remote dev server. I put the dlls in the bin directory and not the GAC to minimize the issues as the application goes through testing on different servers. I moved it to the next step - the link server and it stopped working. 

Server Error in '/' Application.


Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 1:  <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Key_statistics.aspx.cs" Inherits="Default3" %>
Line 2:  
Line 3: <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>Line 4:  
Line 5:  

Source File: /nchs/nhanes/bibliography/key_statistics.aspx    Line: 3

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Telerik.Web.UI' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082

I searched the forums and added httphandlers, updated, removed, and added version numbers, put "fresh" versions of the dlls in the server's bin directory, but nothing changed.
I followed Atana's blog post - http://blogs.telerik.com/AtanasKorchev/Posts/08-07-18/Web_Resources_demystified_Part_3_Troubleshooting.aspx
and Installed Firebug and when I browse the page, I get a 500 internal error, but nothing like the errors the blog post outlines...I attached a screenshot.

What to do next?
Thanks!
Jen
Pavlina
Telerik team
 answered on 04 Mar 2010
3 answers
331 views
Hi,

We're using Advanced binding, and I have a lot of anomalies with the NeedDataSource event.


The strange things I experience:  (EnableViewState="True")

-the event fires even if the Grid.Visible = false
-the event fires on every postback, with RebindReason = InitialLoad

I have EditMode = EditForms, but the event sequence is the following on every postback, for example the clickhandler of a button in the edit usercontrol
1. Page load
2. NeedDataSource
3. EditControl's PageLoad
4. Close_Click

As far as I know it should be
1. Page load
2. EditControl's PageLoad
3. Close_Click
4. NeedDataSource


I call Grid.MasterTableView.Rebind only in the click eventhandler of my Search button, but it doesn't fire the NeedDataSource event, because it's called a bit earlier, because of the postback...

I've read all the articles and forum threads regarding NeedDataSource, I have no idea what's wrong, it seems that the Grid can't use the Viewstate, but that's enabled at every possible location. Moreover I call TrackViewState on InitComplete, but this behaviour doesn't change.

What should I try?

thanks,


     Attila
Radoslav
Telerik team
 answered on 04 Mar 2010
1 answer
281 views
Hi, long time fan.  I'm just getting into the RadEditor and I'm wondering if you can help me with examples or ideas on the following:
1. Send MailMessage with embedded content - I know how to send embedded content with an alternate view, etc. but I'm wondering how I can enumerate all the embedded images in the editor's embedded content - hoping there's a collection where I can create contend IDs for a mail message.  Is that the right idea?  Or is this something the .NET Mail 3.5 supports, i.e. converts SRC=path.jpg to content ids automatically?

2. Can you send an example of how this would work?  All the examples use a fixed attachment or content ID.  I need to do this automatically.

3. Do I really need to resport to parsing the HTML and string.replace on SRC= everywhere?  Seems like sending RadEditor Mail is like the first thing people do with this editor. 

I'm hoping I can at least get at the embedded collection and string.replace without doing RegExpression pattern matching.

thanks
Marty


Rumen
Telerik team
 answered on 04 Mar 2010
1 answer
129 views
I have a linkbutton, when it is clicked i assign an objectdatasource to my RadGrid. I also assign the same objectdatasource to the same RadGrid in OnNeedDataSource event. At runtime when I click on a column name in the RadGrid the arrow changes to point up and down but the actual values are not sorted. Is the sorting lost somehow or the sorting never worked?
Pavlina
Telerik team
 answered on 04 Mar 2010
5 answers
226 views
Hi,
I am creating a grid at runtime with viewstate enabled. I have a few columns that I am adding to this grid, again, at runtime. The item template and edit item template both have custom templates (that implement ITemplate and IBindableTemplate). And I have textboxes in these columns.

After I present the entire grid in edit mode, upon save, the textbox controls within these columns are "lost" upon postback. I am not able to retrieve them using findcontrol. The custom column definitions are there (but not the textboxes) and also available are the edit item count (basically the number of rows that the grid has in edit). Once I get past this challenge, my hope is to use the built-in functionality to extract the values that changed while editing (exported in HashTable format).

So my question is how can I get the controls from the item collection upon postback (without getting it lost)?

Thanks in advance for any help you can provide.

Let me know if you need to see any other code samples.

Thanks,
RN

    Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender  
        'grid to display the header  
 
        CreateHeaderGridStructure()  
 
        'grid to display the details (w/o header)  
        CreateDetailGridStructure()  
        grdDetail.Rebind()  
 
    End Sub 

    Private Function CreateDetailGridStructure() As Boolean  
        'get the column metadata to create the column input boxes.  
        Dim drTemplateDetails As IDataReader  
        Dim templateColumn As GridTemplateColumn  
 
        grdDetail.MasterTableView.Columns.Clear()  
        grdDetail.MasterTableView.DetailTables.Item(0).AutoGenerateColumns = False 
        grdDetail.MasterTableView.ExpandCollapseColumn.ItemStyle.Width = Unit.Percentage(4)  
 
        columnDefinitions = New System.Collections.Generic.List(Of GridColumnDefinition)  
        drTemplateDetails = 'Get the data here  
        While drTemplateDetails.Read()  
 
            templateColumn = New GridTemplateColumn()  
            templateColumn.DataField = <the column name> 
            templateColumn.UniqueName = <the column name>            templateColumn.ItemTemplate = New GridDetailTemplate(<the column name>, Me.ClientID, ControlType.Label)  
 
            If <if only viewable column with no edit> Then    
                templateColumn.EditItemTemplate = New GridDetailTemplate(columnDefinition.Name, Me.ClientID, ControlType.Label)  
                If columnDefinition.Type = GridColumnType.Hidden Then  
                    templateColumn.Display = False 
                End If  
            Else   
                'if the grid is in edit mode, then inEditMode = True 
                If inEditMode Then  
                    templateColumn.EditItemTemplate = New GridDetailTemplate(columnDefinition.Name, Me.ClientID, ControlType.PremiumTextBox)  
                Else  
                    templateColumn.EditItemTemplate = New GridDetailTemplate(columnDefinition.Name, Me.ClientID, ControlType.Label)  
                End If  
            End If  
            grdDetail.MasterTableView.Columns.Add(templateColumn)  
        End While  
 
    End Function 

    Private Sub grdDetail_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles grdDetail.PreRender  
 
 
        'If using itemtemplate/edititemtemplate, then use the following to set the grid in edit mode.  
        'todo: look to combine these following if logics into one  
        If inEditMode Then  
            If IsPostBack Then  
                For Each item As GridItem In grdDetail.MasterTableView.Items  
                    If TypeOf item Is GridEditableItem Then  
                        Dim editableItem As GridEditableItem = CType(item, GridDataItem)  
                        editableItem.Edit = True 
                    End If  
                Next  
                grdDetail.Rebind()  
            End If  
        End If  
End Function 

Public Class GridDetailTemplate  
    Implements ITemplate, System.Web.UI.IBindableTemplate  
 
    Private controlID As String  
    Private clientID As String  
    Private type As ControlType  
 
    'This is the only public constructor. Should also accept the kind of control that needs to be created  
    Public Sub New(ByVal controlID As String, ByVal clientID As String, ByVal type As ControlType)  
        MyBase.New()  
        Me.controlID = controlID  
        Me.clientID = clientID  
        Me.type = type  
    End Sub  
 
 
    Public Function ExtractValues(ByVal container As Control) As Collections.Specialized.IOrderedDictionary Implements IBindableTemplate.ExtractValues  
        Dim returnDictionary As Collections.Specialized.OrderedDictionary = New Collections.Specialized.OrderedDictionary()  
        Select Case type  
            Case ControlType.Label  
                returnDictionary.Add(controlID, (DirectCast(((DirectCast(container, Telerik.Web.UI.GridDataItem)).FindControl(controlID)), Label)).Text)  
 
            Case ControlType.PremiumTextBox  
                returnDictionary.Add(controlID, (DirectCast(((DirectCast(container, Telerik.Web.UI.GridDataItem)).FindControl(controlID)), TextBox)).Text)  
        End Select  
        Return returnDictionary  
    End Function  
 
    Public Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn  
        'create the control that we want  
        Dim control As New Control  
 
        Select Case type  
            Case ControlType.PremiumTextBox  
                Dim txtBox As TextBox  
                txtBox = New TextBox  
 
                'attributes should be added in the item databound event to be consistent  
                txtBox.Attributes.Add("onblur", "return validateInput(this);")  
                'txtBox.Attributes.Add("onchange", "return testInput(this);")  
                'txtBox.Attributes.Add("onchange", "return addNumbers('" + txtBox.ClientID + "')")  
                'should be in the textbox control  
                txtBox.MaxLength = 14 
                txtBox.Width = Unit.Pixel(100)  
                txtBox.Style.Add("text-align", "right")  
                'txtBox.ClientEvents.OnValueChanged = "calculateTtl" 
 
                'event handler to handle the databind event  
                control = txtBox 
                AddHandler control.DataBinding, AddressOf Me.TextBox1_DataBinding  
         End Select  
 
        'set the id to be an unique identifier for that row  
        control.ID = controlID 
 
        'add the control to the control collection  
        container.Controls.Add(control)  
End Function  
 
    Public Sub TextBox1_DataBinding(ByVal sender As Object, ByVal e As System.EventArgs)  
        Dim textbox As TextBox = CType(sender, TextBox)  
        Dim grid As GridDataItem = CType(textbox.NamingContainer, GridDataItem)  
        Dim item1Value As String = DataBinder.Eval(grid.DataItem, controlID).ToString  
        CType(grid.FindControl(controlID), TextBox).Text = item1Value 
    End Sub  
End Class 
Mira
Telerik team
 answered on 04 Mar 2010
6 answers
153 views
Hi,

I have a grid with alternating items with hover properties and with possibility to select.
When I select the second item (or every other second alternate item) then the UI is incomplete as in the picture, that is, only the first portion of the row is selected and the rest not. Any ideas?

Thanks,
Lektira
Radoslav
Telerik team
 answered on 04 Mar 2010
2 answers
156 views
Hi, 
  

  I am using hierarchy grid. It's one master table two details table. I need to align same column width in this three table. I had set both column for header style and itemstyle width. But it not fixed. when i am click expand button the master table width is automatically changed.  Please check the code and Screen shot, any one know the result let me know.

<telerik:RadGrid ID="RadGrid1"   
    OnItemCreated="RadGrid1_ItemCreated"   
    OnItemCommand="RadGrid1_ItemCommand"   
    OnDetailTableDataBind="RadGrid1_DetailTableDataBind" 
    OnItemDataBound="RadGrid1_ItemDataBound"   
    OnPreRender="RadGrid1_PreRender"    
    OnDeleteCommand="RadGrid1_DeleteCommand"    
    OnNeedDataSource="RadGrid1_NeedDataSource" 
    ShowStatusBar="true"   
    AutoGenerateColumns="False" PageSize="3" AllowSorting="True" AllowMultiRowSelection="False" 
    AllowPaging="True" GridLines="None" 
    HeaderStyle-CssClass="GridHeader_Outlook" AlternatingItemStyle-BackColor="#EEEEEE" 
    SelectedItemStyle-CssClass="SelectedItem" BorderColor="#BEBEBE" 
    runat="server" > 
    <ClientSettings>    
        <ClientEvents OnColumnResizing="ResizeAllColumns" />      
    </ClientSettings>    
    <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" /> 
    <SortingSettings  EnableSkinSortStyles="false" /> 
    <MasterTableView  Name="Master"   
        ClientDataKeyNames="ROOMID,TRANSLATEDCODE,ROOMTRANSLATEDID,ROOMNAME,ROOMSCORE,ROOMVALIDTILL" 
        DataKeyNames="ROOMNAME,ROOMID,LOCATIONID,TRANSLATEDCODE,ROOMTRANSLATEDID,ROOMSCORE,ROOMVALIDTILL" 
        AllowMultiColumnSorting="True"   
        Width="100%">   
        <DetailTables> 
            <telerik:GridTableView Width="100%" BorderColor="#BEBEBE"   
                runat="server" Name="Detail1" DataKeyNames="ZONENAME,TRANSLATEDCODE,ZONETRANSLATEDID, ZONEID,ROOMID,ZONESCORE,ZONEVALIDTILL" 
                ClientDataKeyNames="ZONENAME,ZONETRANSLATEDID,TRANSLATEDCODE, ZONEID,ROOMID,ZONESCORE,ZONEVALIDTILL" > 
                <PagerStyle Visible="false" /> 
                <ParentTableRelation> 
                    <telerik:GridRelationFields DetailKeyField="ROOMID" MasterKeyField="ROOMID" /> 
                </ParentTableRelation> 
                <DetailTables> 
                    <telerik:GridTableView  Width="100%" runat="server" BorderColor="#BEBEBE"   
                        Name="Detail2" DataKeyNames="ELEMENTNAME,TRANSLATEDCODE, ZONEID,ELEMENTID,ELEMENTTRANSLATEDID,ELEMENTSCORE,ELEMENTVALIDTILL" 
                        ClientDataKeyNames="ELEMENTNAME,TRANSLATEDCODE,ELEMENTTRANSLATEDID, ZONEID,ELEMENTID,ELEMENTSCORE,ELEMENTVALIDTILL">  
                       <ParentTableRelation> 
                            <telerik:GridRelationFields DetailKeyField="ZONEID" MasterKeyField="ZONEID" /> 
                       </ParentTableRelation> 
                       <PagerStyle Visible="false" /> 
                        <Columns> 
                            <telerik:GridBoundColumn HeaderText="ElementID" DataField="ELEMENTID" UniqueName="ELEMENTID"   
                                    SortExpression="ELEMENTID" ReadOnly="true" Visible="false">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Description" DataField="ELEMENTNAME" UniqueName="ELEMENTNAME"   
                                    SortExpression="ELEMENTNAME" ReadOnly="true">  
                            </telerik:GridBoundColumn> 
                              
                            <telerik:GridTemplateColumn> 
                                <HeaderTemplate> 
                                    <asp:Label ID="lblHeadElementRemarks" runat="server" Text="Remarks"></asp:Label> 
                                </HeaderTemplate> 
                                <ItemTemplate> 
                                    <asp:TextBox ID="radTxtRemarks" runat="server" ></asp:TextBox> 
                                </ItemTemplate> 
                                 <HeaderStyle Width="150px" /> 
                                <ItemStyle Width="150px" /> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Left" UniqueName="CbColumn" > 
                                <HeaderStyle HorizontalAlign="Center" /> 
                                <ItemTemplate > 
                                 
                                </ItemTemplate> 
                                 <HeaderStyle Width="150px" /> 
                                <ItemStyle Width="150px" /> 
                            </telerik:GridTemplateColumn> 
                              
                            <telerik:GridTemplateColumn > 
                                <HeaderStyle HorizontalAlign="Center"/>  
                                <HeaderTemplate> 
                                     <asp:Label ID="lblHeaderElementScore" Text="Score" runat="server"></asp:Label> 
                                </HeaderTemplate> 
                                <ItemTemplate> 
                                     <asp:Label ID="lblElementScore"  runat="server" Text="0"   ></asp:Label>%  
                                </ItemTemplate> 
                                 <HeaderStyle Width="40px" /> 
                                <ItemStyle Width="40px" /> 
                            </telerik:GridTemplateColumn> 
                        </Columns> 
                    </telerik:GridTableView> 
                </DetailTables> 
                <Columns> 
                    <telerik:GridBoundColumn HeaderText="ZoneID" DataField="ZONEID" UniqueName="ZONEID"   
                                    SortExpression="ZONEID" ReadOnly="true" Visible="false">  
                            </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn HeaderText="Description" DataField="ZONENAME" UniqueName="ZONENAME"   
                            SortExpression="ZONENAME" ReadOnly="true">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridTemplateColumn> 
                        <HeaderTemplate> 
                            <asp:Label ID="lblHeadZoneRemarks" runat="server" Text="Remarks"></asp:Label> 
                        </HeaderTemplate> 
                        <ItemTemplate> 
                            <asp:Label ID="lblZoneRemarks" runat="server"></asp:Label> 
                        </ItemTemplate> 
                        <HeaderStyle Width="150px" /> 
                        <ItemStyle Width="150px" /> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn> 
                        <HeaderTemplate> 
                            <asp:Label ID="lblHeadZoneRating" runat="server" Text="Rating"></asp:Label> 
                        </HeaderTemplate> 
                        <ItemTemplate> 
                            <asp:Label ID="lblZoneRating" runat="server"></asp:Label> 
                        </ItemTemplate> 
                        <HeaderStyle Width="150px" /> 
                        <ItemStyle Width="150px" /> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn  UniqueName="HeaderZoneScore">  
                        <HeaderStyle HorizontalAlign="Center"/>  
                        <HeaderTemplate> 
                             <asp:Label ID="lblHeaderZoneScore" Text="Score" runat="server"></asp:Label> 
                        </HeaderTemplate> 
                        <ItemTemplate> 
                             <asp:Label ID="lblZonesScore" runat="server" Text="0"  ></asp:Label>%  
                        </ItemTemplate> 
                        <HeaderStyle Width="40px" /> 
                        <ItemStyle Width="40px" /> 
                    </telerik:GridTemplateColumn> 
                </Columns> 
            </telerik:GridTableView> 
        </DetailTables> 
        <Columns> 
            <telerik:GridBoundColumn HeaderText="RoomID" DataField="ROOMID" UniqueName="ROOMID"   
                                    SortExpression="ROOMID" ReadOnly="true" Visible="false">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn HeaderText="Description" DataField="ROOMNAME" UniqueName="ROOMNAME"   
                    SortExpression="ROOMNAME" ReadOnly="true">  
      
            </telerik:GridBoundColumn> 
            <telerik:GridTemplateColumn> 
                <HeaderTemplate> 
                    <asp:Label ID="lblHeadRoomRemarks" runat="server" Text="Remarks"></asp:Label> 
                </HeaderTemplate> 
                <ItemTemplate> 
                    <asp:Label ID="lblRoomRemarks" runat="server"></asp:Label> 
                </ItemTemplate> 
                <HeaderStyle Width="150px" /> 
                <ItemStyle Width="150px" /> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn> 
                <HeaderTemplate> 
                    <asp:Label ID="lblHeadRoomRating" runat="server" Text="Rating"></asp:Label> 
                </HeaderTemplate> 
                <ItemTemplate> 
                    <asp:Label ID="lblRoomRating" runat="server"></asp:Label> 
                </ItemTemplate> 
                <HeaderStyle Width="150px" /> 
                <ItemStyle Width="150px" /> 
            </telerik:GridTemplateColumn> 
             
            <telerik:GridTemplateColumn  UniqueName="HeaderRoomScore">  
                <HeaderStyle HorizontalAlign="Center"/>  
                <HeaderTemplate> 
                     <asp:Label ID="lblHeaderScore" Text="Score" runat="server"></asp:Label> 
                </HeaderTemplate> 
                <ItemTemplate> 
                    <asp:Label ID="lblRoomScore" Text="0"   runat="server"></asp:Label>%  
                </ItemTemplate> 
                <HeaderStyle Width="40px" /> 
                <ItemStyle Width="40px" /> 
            </telerik:GridTemplateColumn> 
        </Columns> 
    </MasterTableView> 
</telerik:RadGrid> 

Kumar Ramasany
Top achievements
Rank 1
 answered on 04 Mar 2010
1 answer
162 views
Hi,
I have my RadAjaxPanel on top of my page. When the page is post pack, the RadAjaxLoadingPanel is shown at the top of the page (at the center of the RadAjaxPanel).
I would like to have the RadAjaxLoadingPanel shown at the center of the page instead of center of RadAjaxPanel.
How do i achieve this?
Thanks!
Dimo
Telerik team
 answered on 04 Mar 2010
1 answer
227 views
I have a grid with a few columns at a set width. When the window is resized smaller the columns that don't have a column size are hidden.
Is there anyway to have them not get smaller than a certain width?
Dimo
Telerik team
 answered on 04 Mar 2010
3 answers
214 views

1) How can you validate a textbox to look exactly as they do when using the input manager? 


This doesn't give me the same look that the input manager does:
<telerik:RadTextBox ID="txt_Make" Runat="server" Skin="Windows7"  
                        Width="170px"
                    </telerik:RadTextBox> 
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Required!" ControlToValidate="txt_Make" Display="Dynamic" SetFocusOnError="True"></asp:RequiredFieldValidator> 

I want them to look exactly like the inputmanager:
<telerik:RadInputManager ID="AppInputManager" runat="server" Skin="Windows7"
                  <telerik:TextBoxSetting ErrorMessage="Required!"
                      <TargetControls> 
                          <telerik:TargetInput ControlID="txt_FirstName" /> 
                          <telerik:TargetInput ControlID="txt_LastName" /> 
                          <telerik:TargetInput ControlID="txt_Address" /> 
                          <telerik:TargetInput ControlID="txt_City" /> 
                      </TargetControls> 
                    <Validation IsRequired="True" ValidationGroup="Application"></Validation> 
                  </telerik:TextBoxSetting> 
</telerik:RadInputManager> 




The input manager displays the icon and the message in red INSIDE the control, the validator does not.

I cant use an input manager for some of the fields because they are only required based on user input.  I tried adding an entire new input manager for these fields, but then they always try to get validated - even when hidden.  And I don't want to do a postback - I don't think I can enable and disable the input managers client-side.


Dimo
Telerik team
 answered on 04 Mar 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?