Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
68 views
Hello,

We're creating a menu item that is two columns that is dynamically created in the RadMenu1_ItemDataBound. We've set the RepeatColumns to 2 and everything works as expected. The problem is that we want to control where the break occurs because the to lists of items are not equal. The first has 10 and the second has 6. We would like it so that it shows up like that (e.g. 10 in the first column and 6 in the second). How can we do this in the code behind?

Any help would be greatly appreciated,

Kalvin
Dimitar Terziev
Telerik team
 answered on 21 Mar 2011
3 answers
209 views
I have a RadComboBox.  AllowCustomText is enabled to allow filtering.  When a user presses the Enter key it fires the OnSelectedIndexChanged event.  I don't want the event to fire unless an item is selected.  Unless an item is selected I don't want anything to happen.

How can I do this?
Dimitar Terziev
Telerik team
 answered on 21 Mar 2011
7 answers
1.5K+ views
Hello,


I'd like to use CSS to standardize the width and height of  the ListBox.  Using the standard CSS class doesn't seem to get the job done; we've been having to establish an explicit width and height.  Is there a workaround to getting the CSS to set width/height?


Thanks.
Kate
Telerik team
 answered on 21 Mar 2011
3 answers
198 views
I have a OnClientBeforeShow function that manually sets the Width and the Height depending on the size of the browser window. I have ContentScrolling set to Auto. The scrollbars show up everytime in IE8. However, in IE7 the bars indiscriminately disappear. I reset the settings and restarted the browser. The scrollbars showed up on the first hover-over, then thereafter do not show up. One can still scroll with the mouse wheel, however, no scrollbars. Is this the control or the browser?
Marin Bratanov
Telerik team
 answered on 21 Mar 2011
3 answers
206 views
Hi,

I'm trying to get the ClientID (from within a master page) of a RadPane which is part of a content page .

Default.Master
//...
<script type="text/javascript">
          function pageLoad() {
              var dataPane = $find('<%= this.SplitterPlaceholder.FindControl("LeftContentPane").ClientID %>');
              dataPane.setVarSize($(window).width());
          }
    </script>
//...
    <telerik:RadSplitter ID="RadSplitter1" Height="100%" runat="server"  ClientIDMode="AutoID">
        <telerik:RadPane ID="ContentPane" runat="server">
            <telerik:RadSplitter ID="Radsplitter2" runat="server" Orientation="Vertical">
                <telerik:RadPane ID="RadPane1" runat="server" ContentUrl="Data.aspx" />
  
                <asp:ContentPlaceholder ID="SplitterPlaceholder" runat="server" />
  
                <telerik:RadSplitBar ID="ContentSplitBar" runat="server" />
                <telerik:RadPane ID="RightContentPane" ContentUrl="Map.aspx" runat="server">
                </telerik:RadPane>
            </telerik:RadSplitter>
        </telerik:RadPane>
        <telerik:RadSplitBar ID="RadSplitBar2" runat="server" />
        <telerik:RadPane ID="BottomPane" runat="server">
        </telerik:RadPane>
    </telerik:RadSplitter>
//..

Default.aspx
<%@ Page Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="UIProject.Default" %>
<asp:Content id="Pane" ContentPlaceholderID="SplitterPlaceholder" runat="server">
    <telerik:RadPane ID="LeftContentPane" runat="server" ContentUrl="Data.aspx" />
</asp:Content>

<%= this.SplitterPlaceholder.FindControl("LeftContentPane").ClientID %> returns (SplitterPlaceholder_LeftContentPane), but the page does not contain an element with this id and therefore $find() returns null and setVarSize() fails.

I also tried to use a public property in Default.aspx.cs to access the ClientID from Default.Master, but the result was the same.

I know that it can be tricky to access controls in content pages, but afaik it should work this way. Did I overlook something or is this scenario not supported by RadControls/ASP.NET?

Best Regards
Marin Bratanov
Telerik team
 answered on 21 Mar 2011
5 answers
226 views
Below is the link to the code that has the two RAdEditors I am using on my page:-

http://pastebin.com/GsgKhL76

The problems that I am facing are as follows:-

1. When I click inside of EditorQues, its toolbar shows. But when I click to type inside EditorAns, EditorQues's basic toolbar keeps on showing.
   I want this basic toolbar to hide when focus is inside EditorAns.

2. Ajax Spell Check is not working in both the Editors. However, when I embed the same Editors in an aspx page that has no master page, the Ajax Spell Checker works great.
   Why is Spell checker not working in this page of mine that has a master page? When I click  on Spell check button in both  Editors' toolbar, it displays message "Spell check in progress" and both "Finish Spell Check"
   and "Cancel" Buttons are greyed out so I am unable click them and I have to refresh the page everytime to make those "Finish Spell Check"
   and "Cancel" Buttons to go away. How do I fix this ? I mean what has using master page got to do with the Spell checker? I tested with this another master page, Spell checker works fine i that.
Why is it not working with a particular master page ? What could be wrong ?

3.In the Editor.CustomSkin.css , I have set the default font as 14px, Verdana and Normal but when the Editor loads, I do not see font properties
that I have set in this css. Why are the properties not getting overridden and the master page's css is being applied?  

4. Required field validator is not working  with rad editor. Editor's content gets stored as either and Empty string or a break tab "br/".
How do I validate RadEditor so empty string doesnt get stored in my DB?

Below are the css files:-

Master Page's CSS file:-

body {padding:0; margin:0; background-image:url(../images/bg.gif); background-repeat:repeat-x repeat-y;}
body, td, input, textarea{
    font-size:11px;
        font-family:Tahoma;
    color:#5D5F60;
    line-height:13px;
    vertical-align:top;
    padding:0px;
    
}

Editor.CustomSkin.css
I followed some tutorial on Telerik's website on how to use external CSS and implemented as follows:-

I have renamed Default Skin's CSS file (Editor.Default.css) to Editor.CustomSkin.css and made the following additions:-

Added this in my custom skin:-

body
{
    font-family:Verdana!important;  /*Why is Verdana not being set as default font in the editor even though I have set important here? */
    font-style:normal!important;
    font-size:14px!important;   /*Here too font size is not being set as 14 px and text appears smaller than 14 px */
}

h1,h2,h3,h4,h5
{
    color:Black!important;
    background-color:Transparent;
    background-image:none!important;
    font-weight:bold;
    border-bottom:0px!important;
    font-family:Segoe UI,Arial,Sans-serif;
    cursor:default;
    padding-left:0px;
    padding-top:0px;
    font: "Segoe UI",Arial,Sans-serif;
    text-decoration:none;
    }
    
h1{ font-size: 2em !important;}
h2{ font-size: 1.5em !important;}
h3{ font-size: 1.17em !important;}
h4{ font-size: 1em !important;}
h5{ font-size: .83em !important;}
h6{ font-size: .75em !important;}

Another change I made is :-

.CustomSkin.RadEditor .reContentCell
{
    background-image:none !important;
    background-color:White !important;
    border: solid 1px #828282;
    
}

I have set the content area's background of editors as white, else it was picking up master page's background image

I followed this example to make the editor look like a textbox

http://demos.telerik.com/aspnet-ajax/editor/examples/editorastextbox/defaultcs.aspx

Its working fine but I still see grey shadow around EditorQues which is RadEditor as a textbox on my page. How do I get rid of that?

Also in the head section of my page as you can see above, I have commented out the following:-

<%--<link href="http://www.mysite.com/Skins/CustomSkin/EditorAsTextBox.CustomSkin.css" rel="stylesheet" type="text/css" />
--%>


I had to do this because if I add reference to EditorAsTextBox.CustomSkin.css in th ehead section, the EditorAns's toolbar's background color(grey) vanishes
and becomes white. I have no clue how to fix this either.

Sorry for so many questions. Hoping I ll get help here.Thanks.





Marin Bratanov
Telerik team
 answered on 21 Mar 2011
5 answers
116 views
Hi there,

I was wondering if anyone could help me with the following:

I'm developing a web interface that consist of Nested RadSplitters and RadPanes. I've attached a picture that depicts what I'd like the web interface look like. Practically it consists of 3 panes: a Left Pane (that contains a treeview) and a Right Pane divided by a vertical RadSplitter. The Right Pane is divided into 2 RadPanes and therefore divided by an horizontal RadSplitter. On the upper part, I'd like to load some content such as a RadGrid, and on the lower part,  I'd like to load data (details or just related data) as a result of clicking on a row on the RadGrid (on the upper part).

And by the way, right now I'm also facing the problem that when I click on a node (menu option), in order to load the RadGrid (upper RadPane), it gets loaded inside the RadPane but also a new Internet Explorer window with such RadGrid as well (another copy), see the attached image as well.

Thanks in advance for any help,

Felix
Niko
Telerik team
 answered on 21 Mar 2011
2 answers
101 views
I am running Google Chrome version 10.0.648.134 and going through the demos, it does not operate correctly.

For example, on the Grid demo | Outlook Grid located at http://demos.telerik.com/aspnet-ajax/grid/examples/programming/webmail/defaultcs.aspx, I click on the Rate / Review button in top right corner and nothing appears (it does detect hover state and changes the style of the button.  When I click on a row to select it, nothing happens (it should select the row and highlight it in an orange/gold color).  Multi selection does not work either.  I click the checkboxes in the first 3 rows and then click on the post back button at the bottom of the grid, it refreshes with the grid but nothing is selected (state is not preserved).

All this does work fine on Google Chrome 9.0.597.98, Microsoft IE 8.0.7600.16385, Firefox 3.6.13.

Ed Lamprecht
Maria Ilieva
Telerik team
 answered on 21 Mar 2011
1 answer
166 views
Hey there,

i've a combobox inside griditem template column.I m using linq data source to populate this

<telerik:GridTemplateColumn HeaderText="Product ID" HeaderStyle-Font-Bold="true"
                                AllowFiltering="true" DataField="ProductID">
                                <EditItemTemplate>
                                    <telerik:RadComboBox ID="RadCbProductIDEdit" Skin="Office2007" runat="server" MarkFirstMatch="true"
                                        AllowCustomText="true" DataValueField="ProductID" EmptyMessage="Please select a ProductID "
                                        DataTextField="ProductID" DataSourceID="LinqDataSource1" Height="100px">
                                    </telerik:RadComboBox>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <telerik:RadComboBox ID="RadcbProductIDInsert" runat="server" Skin="Office2007" MarkFirstMatch="true"
                                        AllowCustomText="true" DataValueField="ProductID" EmptyMessage="Please select a ProductID "
                                        DataTextField="ProductID" DataSourceID="LinqDataSource1" Height="100px">
                                    </telerik:RadComboBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lblProductID" runat="server" Text='<%# Bind("ProductID") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle Font-Bold="True" />
                            </telerik:GridTemplateColumn>
 
 
<asp:LinqDataSource ID="LinqDataSource1" runat="server"
            ContextTypeName="LPSFPrototypeScreens.tblProduct" EntityTypeName=""
            Select="new (ProductID)" TableName="tblProductFeatures" >
also here ProductID is FK.
what cud be the reason??...

Thanks
Amit
Elliott
Top achievements
Rank 2
 answered on 21 Mar 2011
5 answers
800 views
I am trying to export a programmatically created radgrid to excel.  I am exporting Data only.  I tried to export as HTML, but that caused Excel to freeze up.  (Passing 1,000 records.)  Part of the export requires that I change the styling on the items (background color), and the other part changes the dataformatstring to {0:C} for currency fields.

Is there a way to accomplish this?  I tried a few suggestions I saw on here, but I'm stumped.  Any help is appreciated.  Thank you.

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
    Dim radgrid2 As New RadGrid
    radgrid2.AutoGenerateColumns = True
    radgrid2.ID = "RadGrid2"
    Me.PlaceHolder1.Controls.Add(radgrid2)
 
    connSql.ConnectionString = sqlConn.ToString()
 
    Dim poSqlCom As New SqlCommand("dbo.getCurrQtrAll", connSql)
    poSqlCom.CommandType = CommandType.StoredProcedure
    poSqlCom.Parameters.AddWithValue("@UID", "SomeoneElse")
 
 
    Dim adapter As New SqlDataAdapter(poSqlCom)
    Dim links As New DataTable()
 
    Try
        adapter.Fill(links)
    Catch ex As Exception
        'lblResult.Text = ex.Message
        If connSql.State = ConnectionState.Open Then
            connSql.Close()
        End If
    End Try
 
    radgrid2.DataSource = links
    radgrid2.Rebind()
 
    radgrid2.ExportSettings.Excel.FileExtension = "xls"
    radgrid2.ExportSettings.FileName = "Cur_Qtr_Rpt"
    radgrid2.ExportSettings.ExportOnlyData = True
    radgrid2.ExportSettings.IgnorePaging = True
    radgrid2.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML
    radgrid2.MasterTableView.ExportToExcel()
End Sub
GP
Top achievements
Rank 1
 answered on 21 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?