Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
85 views
Hello,
I've tried to activate radcompression on my IIS7 server and SL application (4.0 SL), I got this exception

{System.Xml.XmlException: Unexpected end of file. Following elements are not closed: RelatesTo, Header, Envelope.
   at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String arg1, String arg2, String arg3)
   at System.Xml.XmlExceptionHelper.ThrowUnexpectedEndOfFile(XmlDictionaryReader reader)
   at System.Xml.XmlBufferReader.ReadUniqueId()
   at System.Xml.XmlBinaryReader.ReadElementContentAsUniqueId()
   at System.ServiceModel.Channels.RelatesToHeader.ReadHeader(XmlDictionaryReader reader, AddressingVersion version, String actor, Boolean mustUnderstand, Boolean relay)
   at System.ServiceModel.Channels.MessageHeaders.ReadBufferedHeader(XmlDictionaryReader reader)
   at System.ServiceModel.Channels.MessageHeaders.Init(MessageVersion version, XmlDictionaryReader reader, IBufferedMessageData bufferedMessageData)
   at System.ServiceModel.Channels.BufferedMessage..ctor(IBufferedMessageData messageData)
   at System.ServiceModel.Channels.BinaryMessageEncoderFactory.BinaryMessageEncoder.ReadMessage(ArraySegment`1 buffer, BufferManager bufferManager, String contentType)
   at System.ServiceModel.Channels.HttpInput.DecodeBufferedMessage(ArraySegment`1 buffer, Stream inputStream)}

from the AuthenticationService.svc as far as it calls the IsLoggedIn method... if I disable the compression everithing works fine...any suggestion?

I'm using 2012.1.215.40 version of dll...any suggestion?
Martin
Telerik team
 answered on 05 Mar 2012
3 answers
135 views
How do I put multiple unique RadHtmlField controls on a single Page Layout in a MOSS 2007 Publishing?
Stanimir
Telerik team
 answered on 05 Mar 2012
1 answer
149 views
I trust there is a really obvious answer here, and I'm just looking write through it. One of the great things about this forum is someone will probably tell me. 

We have a date data entry implementation which works with a RadMaskedTextBox, and ASP.NET image control, and a single DatePicker on a master page. It took some work and is far from perfect, but it's much better than the RadDateInput with built-in Date Picker for data entry, so all that's good. This implementation involves storing a reference to each RadMaskedTextBox in a Javascript array so it can be accessed by index. Now I need to extend this implementation to some date entry on some existing grids.

So far I have the functionality working fine on Edit (will paste code below), but I can't make it work on Insert, because I can't figure out how to get the GridDataItem which is the relevant RadMaskedTextBox on the client-side.

On the server (and this all works fine for Edit and Insert):
protected void LeaseRenewalRadGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is Telerik.Web.UI.GridEditableItem)
    {
        GridEditableItem editableItem = (GridEditableItem)e.Item;
        RadMaskedTextBox startDateTextBox;
        if (e.Item.IsInEditMode)
        {
            if (e.Item.OwnerTableView.IsItemInserted)
            {
                Image startDateCalendarImage = (Image)editableItem.FindControl("RenewalInsertStartDateCalendarImage");
                if (startDateCalendarImage != null)
                {
                    startDateCalendarImage.Attributes.Add("onclick", "ShowGridDatePopup('Insert','Start','" + editableItem.ItemIndex + "');");
                }
 
                Image endDateCalendarImage = (Image)editableItem.FindControl("RenewalInsertEndDateCalendarImage");
                if (endDateCalendarImage != null)
                {
                    endDateCalendarImage.Attributes.Add("onclick", "ShowGridDatePopup('Insert','End','" + editableItem.ItemIndex + "');");
                }
 
                startDateTextBox = (RadMaskedTextBox)editableItem.FindControl("RenewalInsertStartDateRadMaskedTextBox");
            }
            else
            {
                Image startDateCalendarImage = (Image)editableItem.FindControl("RenewalStartDateCalendarImage");
                if (startDateCalendarImage != null)
                {
                    startDateCalendarImage.Attributes.Add("onclick", "ShowGridDatePopup('Edit','Start','" + editableItem.ItemIndex + "');");
                }
 
                Image endDateCalendarImage = (Image)editableItem.FindControl("RenewalEndDateCalendarImage");
                if (endDateCalendarImage != null)
                {
                    endDateCalendarImage.Attributes.Add("onclick", "ShowGridDatePopup('Edit','End','" + editableItem.ItemIndex + "');");
                }
 
                startDateTextBox = (RadMaskedTextBox)editableItem.FindControl("RenewalStartDateRadMaskedTextBox");
            }
 
            if (startDateTextBox != null)
            {
                startDateTextBox.Focus();
                startDateTextBox.Attributes.Add("onfocus", "this.select()");
            }
        }
    }
}

On the client, the following code works great for edit, but it does not work for insert. For insert, index is -1, and 
        row = MasterTable.get_dataItems()[index];
returns null, and thus nothing works.

I can't find any different way to get a reference to the RadMaskedTextBox here.

Please help. Thanks.


function ShowGridDatePopup(editinsert, startend, index) {
    // alert(index);
    var grid = $find("<%=LeaseRenewalRadGrid.ClientID %>");
    var MasterTable = grid.get_masterTableView();
    var dateTextBox;
    var row;
    if (editinsert == "Edit") {
        row = MasterTable.get_dataItems()[index];
        if (startend == "Start") {
            dateTextBox = row.findControl("RenewalStartDateRadMaskedTextBox");
        }
        else {  // End
            dateTextBox = row.findControl("RenewalEndDateRadMaskedTextBox");
        }
        if (dateTextBox != null) {
            dateControls[8] = dateTextBox;
            ShowDatePopup(8, "TopRight", true);
        }
    }
    else { // Insert
        row = MasterTable.get_dataItems()[index];
        if (startend == "Start") {
            dateTextBox = row.findControl("RenewalInsertStartDateRadMaskedTextBox");
        }
        else {  // End
            dateTextBox = row.findControl("RenewalInsertEndDateRadMaskedTextBox");
        }
        if (dateTextBox != null) {
            dateControls[9] = dateTextBox;
            ShowDatePopup(9, "TopRight", true);
        }
    }
}


Maria Ilieva
Telerik team
 answered on 05 Mar 2012
2 answers
92 views
I am trying to validate duplicate value in the Radgrid cell , but it validates same raw itself please help me find the solution.
<asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="Duplicate product not allowed"
                            ControlToValidate="RadComboBox1" OnServerValidate="CustomValidator1_ServerValidate" >
Protected Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs)
            For Each dataItem As GridDataItem In RadGrid1.Items        
            If args.Value = CType(dataItem("pk_productid").FindControl("RadComboBox1"), RadComboBox).Text Then
                args.IsValid = False
            End If
 
        Next
       
    End Sub
 
ZAFFAR
Top achievements
Rank 1
 answered on 05 Mar 2012
1 answer
108 views
Hello, 

I have 2 grids on a .aspx page.  I would like to horizontally scroll both grids from the actual grid control.  Below is the code that I have generated.

The width for each grid is fixed, which creates a problem when user's use a different resolution.  If I use width = 100%, then I lose the horizontal grid scroll bar for each grid.

What I need is to allow for 100% width, but not lose the horizontal scrolling for each grid.

I am binding to Northwind, Contacts and Employee tables.

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <div style="height: 100%; overflow: auto;">
            <table>
                <tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <td>
                <div class="inset" style="padding: 10px; overflow: auto;">
                    <div class="inset-title">Contacts</div>
                        <telerik:RadGrid ID="gridContacts" runat="server" AutoGenerateColumns="False" AllowSorting="False" AllowPaging="False" 
                                                                    PageSize="10" AllowCustomPaging="True" BorderColor="#688CAF" BorderWidth="1px" BorderStyle="Solid" Width="1035px">
                            <ClientSettings EnableRowHoverStyle="True" EnablePostBackOnRowClick="false">
                                <Scrolling FrozenColumnsCount="3" AllowScroll="true" UseStaticHeaders="true" ScrollHeight="" />
                            </ClientSettings>
                            <MasterTableView DataKeyNames="ContactID" CommandItemDisplay="Top" TableLayout="Fixed">
                                <Columns>
                                    <telerik:GridBoundColumn DataField="ContactType" HeaderText="ContactType" UniqueName="ContactType">
                                        <HeaderStyle Wrap="false" Width="120" />
                                        <ItemStyle Wrap="false" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" UniqueName="CompanyName">
                                        <HeaderStyle Wrap="false" Width="100" HorizontalAlign="Left" />
                                        <ItemStyle Wrap="false" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="ContactName" HeaderText="ContactName" UniqueName="ContactName">
                                        <HeaderStyle Wrap="false" Width="80" />
                                        <ItemStyle Wrap="false" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="ContactTitle" HeaderText="ContactTitle" UniqueName="ContactTitle">
                                        <HeaderStyle Wrap="false" Width="100" />
                                        <ItemStyle Wrap="false" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Address" HeaderText="Address" UniqueName="Address">
                                        <HeaderStyle Wrap="false" Width="100" />
                                        <ItemStyle Wrap="false" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="City" HeaderText="City" UniqueName="City">
                                        <HeaderStyle Wrap="false" Width="100" />
                                        <ItemStyle Wrap="false" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Region" HeaderText="Region" UniqueName="Region">
                                        <HeaderStyle Wrap="false" Width="100" />
                                        <ItemStyle Wrap="false" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="PostalCode" HeaderText="PostalCode" UniqueName="PostalCode">
                                        <HeaderStyle Wrap="false" Width="100" />
                                        <ItemStyle Wrap="false" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Phone" HeaderText="Phone" UniqueName="Phone">
                                        <HeaderStyle Wrap="false" Width="100" />
                                        <ItemStyle Wrap="false" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Extension" HeaderText="Extension" UniqueName="Extension">
                                        <HeaderStyle Wrap="false" Width="150" />
                                        <ItemStyle Wrap="false" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Fax" HeaderText="Fax" UniqueName="Fax" >
                                        <HeaderStyle Wrap="false" Width="100" />
                                        <ItemStyle Wrap="false" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="HomePage" HeaderText="HomePage" UniqueName="HomePage">
                                        <HeaderStyle Wrap="True" Width="250" />
                                        <ItemStyle Wrap="false" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="PhotoPath" HeaderText="PhotoPath" UniqueName="PhotoPath" >
                                        <HeaderStyle Wrap="false" Width="100" />
                                        <ItemStyle Wrap="false" />
                                    </telerik:GridBoundColumn>
                                </Columns>
                                <NoRecordsTemplate>
                                    <div style="padding: 10px; text-align: center">
                                        No Records to display.</div>
                                </NoRecordsTemplate>
                                <CommandItemTemplate>
                                    <telerik:RadToolBar ID="GridToolbar" runat="server" Width="100%" AutoPostBack="true">
                                        <Items>                                  
                                            <telerik:RadToolBarButton ImageUrl="~/images/icons/document-excel.png" CommandName="ExportToExcel" Text="Export to Excel" />
                                            <telerik:RadToolBarButton ImageUrl="~/images/icons/report.png" CommandName="ExportPropertyValuesReport" Text="Print Report" Enabled="False" />
                                        </Items>
                                    </telerik:RadToolBar>
                                </CommandItemTemplate>
                            </MasterTableView>
                        </telerik:RadGrid>
                </div>
            </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="inset" style="padding: 10px; overflow: auto;">
                    <div class="inset-title">Employees</div>
                        <telerik:RadGrid ID="gridEmployees" runat="server" AutoGenerateColumns="false" AllowSorting="True" AllowPaging="false" BorderColor="#688CAF" BorderWidth="1px" BorderStyle="Solid" Width="1035px">
                            <ClientSettings EnableRowHoverStyle="True" EnablePostBackOnRowClick="false">
                                <Scrolling FrozenColumnsCount="3" AllowScroll="true" ScrollHeight="" UseStaticHeaders="true" />
                            </ClientSettings>
                            <MasterTableView DataKeyNames="EmployeeId" CommandItemDisplay="Top" 
                                GroupLoadMode="Server" TableLayout="Fixed" CommandItemSettings-ShowAddNewRecordButton="False" CommandItemSettings-ShowRefreshButton="False">
                            <Columns>
                                <telerik:GridBoundColumn DataField="LastName" UniqueName="LastName" HeaderText="LastName">
                                    <HeaderStyle Width="150" Wrap="false" />
                                    <ItemStyle Wrap="false" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="FirstName" UniqueName="FirstName" HeaderText="FirstName">
                                    <HeaderStyle Width="150" Wrap="false" />
                                    <ItemStyle Wrap="false" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Title" UniqueName="Title" HeaderText="Title">
                                    <HeaderStyle Width="150" Wrap="false" />
                                    <ItemStyle Wrap="false" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="TitleOfCourtesy" UniqueName="TitleOfCourtesy" HeaderText="TitleOfCourtesy">
                                    <HeaderStyle Width="200" Wrap="false" />
                                    <ItemStyle Wrap="false" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="BirthDate" HeaderText="BirthDate" UniqueName="BirthDate" >
                                    <HeaderStyle Width="90" Wrap="false" />
                                    <ItemStyle HorizontalAlign="Right" Wrap="false" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Address" UniqueName="Address" HeaderText="Address">
                                    <HeaderStyle Width="90" Wrap="false" />
                                    <ItemStyle Wrap="false" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="City" UniqueName="City" HeaderText="City">
                                    <HeaderStyle Width="90" Wrap="false" />
                                    <ItemStyle Wrap="false" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Region" UniqueName="Region" HeaderText="Region">
                                    <HeaderStyle Width="90" Wrap="false" />
                                    <ItemStyle HorizontalAlign="Right" Wrap="false" />
                                </telerik:GridBoundColumn>
                                <telerik:GridDateTimeColumn UniqueName="PostalCode" DataField="PostalCode" HeaderText="PostalCode">
                                    <HeaderStyle Wrap="false" Width="100" />
                                    <ItemStyle Wrap="false" />
                                </telerik:GridDateTimeColumn>
                                <telerik:GridDateTimeColumn UniqueName="HomePhone" DataField="HomePhone" HeaderText="HomePhone">
                                    <HeaderStyle Wrap="false" Width="100" />
                                    <ItemStyle Wrap="false" />
                                </telerik:GridDateTimeColumn>
                                <telerik:GridBoundColumn DataField="Extension" UniqueName="Extension" HeaderText="Extension">
                                    <HeaderStyle Width="100" Wrap="false" />
                                    <ItemStyle Wrap="false" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Notes" UniqueName="Notes" HeaderText="Notes">
                                    <HeaderStyle Width="120" Wrap="false" />
                                    <ItemStyle HorizontalAlign="Right" Wrap="false" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="ReportsTo" UniqueName="ReportsTo" HeaderText="ReportsTo" DataFormatString="{0:c}">
                                    <HeaderStyle Width="100" Wrap="false" />
                                    <ItemStyle HorizontalAlign="Right" Wrap="false" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="PhotoPath" UniqueName="PhotoPath" HeaderText="PhotoPath">
                                    <HeaderStyle Width="110" Wrap="false" />
                                    <ItemStyle Wrap="false" />
                                </telerik:GridBoundColumn>
                            </Columns>
                            <NoRecordsTemplate>
                                <div style="padding: 10px; text-align: center">
                                    No Offers to display.</div>
                            </NoRecordsTemplate>
                            <CommandItemTemplate>
                                <telerik:RadToolBar ID="GridToolbarOffers" runat="server" Width="100%" AutoPostBack="true">
                                    <Items>
                                        <telerik:RadToolBarButton ImageUrl="~/images/icons/document-excel.png" CommandName="ExportToExcel" Text="Export to Excel" />
                                        <telerik:RadToolBarButton ImageUrl="~/images/icons/report.png" CommandName="ExportPropertyValuesReport" Text="Print Report" Enabled="False" />
                                    </Items>
                                </telerik:RadToolBar>
                            </CommandItemTemplate>
                            </MasterTableView>
                        </telerik:RadGrid>
                </div>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
Tsvetina
Telerik team
 answered on 05 Mar 2012
3 answers
35 views

On the bottom of the http://www.telerik.com/products/whats-new.aspx page, in section 

RadControls for ASP.NET AJAX

there is a grid with text "World Stats" etc.
How can I recreate such layout of the header? Is it simply an added image? If so, to what part of the Grid skin it was added?

Jacek


Tsvetina
Telerik team
 answered on 05 Mar 2012
1 answer
56 views
Hi

I want to apply different style of tool tip. i don't want only a rectangle box.

Regards
Nithya
Shinu
Top achievements
Rank 2
 answered on 05 Mar 2012
1 answer
46 views
Hi

i was not able to set the skin for my tool tip.

Regards
Nithya
Princy
Top achievements
Rank 2
 answered on 05 Mar 2012
1 answer
382 views
I'm trying to add a css class to each RadComboBoxItem in a RadComboBox dunmicaly.

This is not working:
foreach (var status in statuslist)
{
    RadComboBoxItem item = new RadComboBoxItem(status.StockName, status.StockStatusID.ToString());
    item.Attributes.Add("Class", status.StockColor);
    RadComboBox1.Items.Add(item);
}


also tried :
item.CssClass =  status.StockColor;

Neither one uses the css class

any suggestions?

thanks
Princy
Top achievements
Rank 2
 answered on 05 Mar 2012
1 answer
123 views
I'm working with the RadToolBar, and RadToolBarButtons;

My question is how best can I enable rounded corners on the RadToolBarButtons -

EnableRoundedCorners

 

 

="True" is set on the RadToolBar itself;

<telerik:RadToolBar ID="RadToolBar4" Height="30px" runat="server" Width="100%" Skin="Black" OnClientLoad="clientLoad" onbuttonclick="RadToolBar4_ButtonClick" CssClass="SeparatedButtons" OnClientDropDownOpened="dropDownOpened" EnableRoundedCorners="True" >
                             
                <Items>
  
                 <telerik:RadToolBarButton CommandName="Dashboard" Text="Dashboard" ID="rbDashboard" Font-Size="Medium" runat="server" Font-Names="Microsoft Sans Serif" BorderColor="LightGray" BorderStyle="Solid" BorderWidth="1px">
                    </telerik:RadToolBarButton>
              
                    <telerik:RadToolBarButton CommandName="Documents" ID="rbDocuments" runat="server" Text="Documents" Font-Names="Microsoft Sans Serif" Font-Size="Medium" BorderColor="LightGray" BorderStyle="Solid" BorderWidth="1px">
                                </telerik:RadToolBarButton>
  
                     <telerik:RadToolBarButton CommandName="OrgChart" ID="rbOrgChart" runat="server" Text="Organization Chart" Font-Size="Medium" Visible="false" BorderColor="LightGray" BorderStyle="Solid" BorderWidth="1px">
                        </telerik:RadToolBarButton>
                          
                     <telerik:RadToolBarDropDown Text="Please Select" Font-Size="Medium" CssClass="rightAligned" DropDownWidth="220px" BorderColor="White" BorderStyle="Solid" BorderWidth="1px">
                        
                        <Buttons>
                          
                                 <telerik:RadToolBarButton runat="server" Text="Profile" Font-Size="Medium" CheckOnClick="true" CommandName="ViewAccountProfile">
                               </telerik:RadToolBarButton>
  
                                <telerik:RadToolBarButton runat="server" Text="Contact Us" Font-Size="Medium" CheckOnClick="true" CommandName="ContactUs">
                                </telerik:RadToolBarButton>
  
                                <telerik:RadToolBarButton runat="server" Text="Sign Out" Font-Size="Medium" CheckOnClick="true" CommandName="SignOut">
                                </telerik:RadToolBarButton>
  
                                 <%-- <telerik:RadToolBarButton runat="server" Text="Change Password" Font-Size="Medium" CheckOnClick="true" CommandName="ChangePassword">
                                </telerik:RadToolBarButton>--%>
  
                        </Buttons>
                    </telerik:RadToolBarDropDown>
           
                         </Items>
            </telerik:RadToolBar>

 

Princy
Top achievements
Rank 2
 answered on 05 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?