Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
173 views
For the latest Prometheus Editor, how can I do the following:

1. Set the default font-style for non-styled text. The default seems to be a Times New Roman or equil, but I want to control the font-style of the text without modifying the Content to add a default span section. I would like to set the default font style for unformatted text. 

2. Is there a client-side text changed type of event that I can capture with JavaScript when the user enters text into Editor?

Thanks.
George
Telerik team
 answered on 07 Apr 2008
3 answers
217 views
Hi,

I have just started using the Prometheus Editor, I am new to using the Telerik Editor, so I am not sure if the behaviour I experience is intended.

I want my users to be able to create an HTML document using the editor.
I want them to be able to paste HTML into the editor.
I expected that the Paste HTML right-click option would do this, but it changes the text so that the HTML tags are displayed in the editor rather than what the HTML represents.

i.e. I what I am looking for is the equivalent of switching the HTML mode and then pasting and then switching back again.

Is this possible?

Thanks

Rob
Rumen
Telerik team
 answered on 07 Apr 2008
2 answers
157 views
Hi,

Can you tell me what eventArgs are available in the OnClientClose event? Specifically I'd like to know if it is possible to tell how the dialog has been closed (i.e. through code or by clicking the X).

Thanks

John Rhodes
John
Top achievements
Rank 1
 answered on 07 Apr 2008
1 answer
333 views
Hello,

I have a problem with the height of rows in the radGrid with IE 6. Some rows are twice as high as other rows but the text fits in one row. Can I force the row height to an fix value?

Thx

Oli
Iana Tsolova
Telerik team
 answered on 07 Apr 2008
1 answer
103 views
I am using usercontrol in my edit mode for the grid.
When i edit mode I do not want to display the grid.
I am able to hide the rows but it still shows the pager and the commanditem template.
How can I hide those?
Ves
Telerik team
 answered on 07 Apr 2008
1 answer
151 views
I'm not sure if this is a bug with RadGrid Prometheus or not, but I noticed, using the WebBlue built-in skin, that when I hide and unhide columns using the Display property of a RadGrid column, some of the background colors on selected header/footer rows do not resize with the rest of the grid.  This leaves part of the row blue, and part of the row white.  Specifically, the colors in the filter row and the command row to add a new record (I have AllowFilteringbyColumn and AllowAutomaticInserts both set to true) seem to show this behavior.

I found a work around, I simply set the width of the grid during the same event where I hide and unhide the columns.  But I would have thought that all background colors would have automatically been resized.

The other strange part of this behavior is that the far right side of the grid seems to be missing it's border after the grid is resized.  I have not bothered to find a workaround for this, as it is not terribly noticeable.

I'm happy with how thing look now, but I thought you might like to know in case this affects other people.  Thanks!

Here is the code of part of my ASPX:

    <asp:CheckBox ID="chkAllColumns" runat="Server" Text="Show Additional Columns" AutoPostBack="True" /> 
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" 
        AllowSorting="True" DataSourceID="sdsRegistrants" GridLines="None" Skin="WebBlue"  
        AllowAutomaticUpdates="True" AllowAutomaticInserts="True" PageSize="10" Width="925px"> 
        <ExportSettings> 
            <Pdf FontType="Subset" PaperSize="Letter" /> 
            <Excel Format="Html" /> 
            <Csv ColumnDelimiter="Comma" RowDelimiter="NewLine" /> 
        </ExportSettings> 
        <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="TopAndBottom"  
            CurrentResetPageIndexAction="SetPageIndexToFirst" 
            DataSourceID="sdsRegistrants" Dir="LTR" Frame="Border"  
            TableLayout="Auto" EditMode="InPlace" DataKeyNames="RegistrationID"> 
            <PagerStyle AlwaysVisible="True" Mode="NextPrevNumericAndAdvanced" NextPageText="Next" PrevPageText="Prev" HorizontalAlign="Left" Position="TopAndBottom"  /> 
            <RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                Visible="False"> 
                <HeaderStyle Width="20px" /> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                Resizable="False" Visible="False"> 
                <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn> 
            <Columns> 
                <telerik:GridEditCommandColumn EditText="Edit Person" CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"> 
                    <HeaderStyle Width="150px" /> 
                    <ItemStyle Width="150px" /> 
                </telerik:GridEditCommandColumn> 
                <telerik:GridHyperLinkColumn DataTextFormatString="Edit Sessions: {0}" DataNavigateUrlFields="RegistrationID" HeaderText="RegistrationID"  
                    UniqueName="RegistrationID" DataTextField="RegistrationID" DataNavigateUrlFormatString="Sessions2.aspx?RegID={0}" 
                     FilterListOptions="VaryByDataType" SortExpression="RegistrationID" CurrentFilterFunction="NoFilter"> 
                    <ItemStyle HorizontalAlign="Center" /> 
                </telerik:GridHyperLinkColumn> 
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Name" FilterListOptions="VaryByDataType" 
                    ForceExtractValue="None" HeaderText="Name" SortExpression="Name" UniqueName="Name"> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="LastName" FilterListOptions="VaryByDataType" 
                    ForceExtractValue="None" HeaderText="LastName" SortExpression="LastName" UniqueName="LastName"> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Email" FilterListOptions="VaryByDataType" 
                    ForceExtractValue="None" HeaderText="Email" SortExpression="Email" UniqueName="Email"> 
                </telerik:GridBoundColumn> 
                <telerik:GridDropDownColumn DataField="RegistrantType" DataSourceID="sdsRegistrantTypes" 
                    HeaderText="Registrant Type" ListTextField="RegistrantTypeDescription" ListValueField="RegistrantType" 
                    UniqueName="RegistrantType" CurrentFilterFunction="NoFilter" ForceExtractValue="None" SortExpression="RegistrantTypeDescription" FilterListOptions="VaryByDataType"> 
                </telerik:GridDropDownColumn> 
                <telerik:GridBoundColumn DataField="RegistrantTypeDescription" HeaderText="RegistrantTypeDescription" SortExpression="RegistrantTypeDescription" 
                    UniqueName="RegistrantTypeDescription" Display="False" CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" ForceExtractValue="None"> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="CompanyName" 
                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="CompanyName" 
                    SortExpression="CompanyName" UniqueName="CompanyName"> 
                </telerik:GridBoundColumn> 
                <telerik:GridCheckBoxColumn CurrentFilterFunction="NoFilter" DataField="IsPresenter" 
                    DataType="System.Boolean" FilterListOptions="VaryByDataType" ForceExtractValue="None" 
                    HeaderText="IsPresenter" SortExpression="IsPresenter" UniqueName="IsPresenter"> 
                </telerik:GridCheckBoxColumn> 
                <telerik:GridCheckBoxColumn CurrentFilterFunction="EqualTo" DataField="IsDeleted" 
                    DataType="System.Boolean" FilterListOptions="VaryByDataType" ForceExtractValue="None" 
                    HeaderText="IsDeleted" SortExpression="IsDeleted" UniqueName="IsDeleted"> 
                </telerik:GridCheckBoxColumn> 
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="ModifiedBy" 
                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="ModifiedBy" 
                    SortExpression="ModifiedBy" UniqueName="ModifiedBy" Display="False"> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="ModifiedDate" 
                    DataType="System.DateTime" FilterListOptions="VaryByDataType" ForceExtractValue="None" 
                    HeaderText="ModifiedDate" SortExpression="ModifiedDate" UniqueName="ModifiedDate" ReadOnly="True" Display="False"> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="AddedBy" FilterListOptions="VaryByDataType" 
                    ForceExtractValue="None" HeaderText="AddedBy" SortExpression="AddedBy" UniqueName="AddedBy" ReadOnly="True" Display="False"> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="AddedDate" DataType="System.DateTime" 
                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="AddedDate" 
                    SortExpression="AddedDate" UniqueName="AddedDate" ReadOnly="True" Display="False"> 
                </telerik:GridBoundColumn> 
            </Columns> 
            <EditFormSettings> 
                <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" UniqueName="EditCommandColumn1"> 
                </EditColumn> 
            </EditFormSettings> 
        </MasterTableView> 
    </telerik:RadGrid> 
 

Here is the event to hide/unhide the coloumns (and my workaround):

 
    Protected Sub chkAllColumns_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles chkAllColumns.CheckedChanged 
        If chkAllColumns.Checked Then 
            RadGrid1.Columns.FindByUniqueNameSafe("ModifiedBy").Display = True 
            RadGrid1.Columns.FindByUniqueNameSafe("ModifiedDate").Display = True 
            RadGrid1.Columns.FindByUniqueNameSafe("AddedBy").Display = True 
            RadGrid1.Columns.FindByUniqueNameSafe("AddedDate").Display = True 
            RadGrid1.Width = 1305 'Workaround to manage color issue 
        Else 
            RadGrid1.Columns.FindByUniqueNameSafe("ModifiedBy").Display = False 
            RadGrid1.Columns.FindByUniqueNameSafe("ModifiedDate").Display = False 
            RadGrid1.Columns.FindByUniqueNameSafe("AddedBy").Display = False 
            RadGrid1.Columns.FindByUniqueNameSafe("AddedDate").Display = False 
            RadGrid1.Width = 925 'Workaround to manage color issue 
        End If 
    End Sub 

Dimo
Telerik team
 answered on 07 Apr 2008
5 answers
268 views
 have a simple rad ComboBox with a value field and a text field.  I bind the combobox to a data source and this works fine.  Now I  want to highlight the selectedvalue.  But I cannot get this to work.  Here is my code:

<Telerik:radComboBox id="cbPolicyAccountValueSource"

DataTextField="value"

DataValueField="key"

runat="server">

</Telerik:radComboBox>

cbPolicyAccountValueSource.DataSource = LifePolicyAccountValue.PolicyAccountValueSources

cbPolicyAccountValueSource.DataBind()


Dim PolicyAccountValueSourceEnumId As Object = DataBinder.Eval(DataItem, "PolicyAccountValueSourceEnumId")


cbPolicyAccountValueSource.SelectedValue = CInt(PolicyAccountValueSourceEnumId)


If I run in debug mode, the above field (PolicyAccountValueSourceEnumId) has the selected value I want the combobox to be selected.  But it is not.  No item is selected.

What am I doing wrong?

Thanks,
Bob

If I run in debug mode, the above field (PolicyAccountValueSourceEnumId) has the selected value I want the combobox to be selected.  But it is not.  No item is selected.What am I doing wrong?Thanks,Bob
Nikolay
Telerik team
 answered on 07 Apr 2008
4 answers
271 views
I'm trying to setup a RadComboBox control to use load on demand. In addition, the control is configured to use a template like so:
<telerik:RadComboBox ID="CurrencyEdit" runat="server" Width="55px" DropDownWidth="300px"  
    ShowToggleImage="true" ShowMoreResultsBox="true" EnableVirtualScrolling="true" 
    Height="200px" DataValueField="ISOCode" DataTextField="ISOCode" EnableLoadOnDemand="True" 
    OnItemsRequested="CurrencyEdit_ItemsRequested"> 
    <HeaderTemplate> 
        <table > 
            <colgroup> 
                <col width="60px" /> 
                <col width="270px" /> 
            </colgroup> 
            <tr> 
                <td> 
                    <asp:Literal ID="CurrencyISOCodeLabel" runat="server" meta:resourcekey="CurrencyISOCodeLabel" /></td> 
                <td> 
                    <asp:Literal ID="CurrencyNameLabel" runat="server" meta:resourcekey="CurrencyNameLabel" /></td> 
            </tr> 
        </table> 
    </HeaderTemplate> 
    <ItemTemplate> 
        <table style="border: solid 1px FFFF; font: menu; font-size: small; color: Black;"> 
            <colgroup> 
                <col width="60px" /> 
                <col width="270px" /> 
            </colgroup> 
            <tr> 
                <td> 
                    <%# DataBinder.Eval(Container.DataItem, "ISOCode") %> 
                </td> 
                <td> 
                    <%# DataBinder.Eval(Container.DataItem, "Name") %> 
                </td> 
            </tr> 
        </table> 
    </ItemTemplate> 
</telerik:RadComboBox> 
 


If I use something like:
MyControl.DataSource = MyCollection;
MyControl.DataBind();

The control populates fine. However, if I use something like the following, the RadComboBox shows an empty result. It sees that it has items thanks to the message, but the results themselves are empty.


protected void CurrencyEdit_ItemsRequested( object o, RadComboBoxItemsRequestedEventArgs e ) 
{ 
    int itemsPerRequest = 10; 
    int itemOffSet = e.NumberOfItems; 
    int endOffset = itemOffSet + itemsPerRequest; 
 
    CurrencyBinder binder = new CurrencyBinder(); 
    CurrencyCollection currencies = binder.Find( e.Text ); 
 
    if ( endOffset > currencies.Count ) 
        endOffset = currencies.Count; 
 
    e.EndOfItems = endOffset == currencies.Count; 
 
    for ( int i = itemOffSet; i < endOffset; i++ ) 
    { 
        Currency currency = currencies[i]; 
        this.CurrencyEdit.Items.Add( new RadComboBoxItem( currency.ISOCode, currency.ISOCode ) ); 
    } 
 
    if ( currencies.Count > 0 ) 
    { 
        e.Message = string.Format( "Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>" 
            , endOffset 
            , currencies.Count ); 
    } 
    else 
    { 
        e.Message = "No matches"; 
    } 
} 
 


Note that CurrencyCollection is simply a collection of custom Currency objects with a property of ISOCode representing its standard three letter representation.

Veselin Vasilev
Telerik team
 answered on 07 Apr 2008
3 answers
117 views
I see that Telerik supports keyboard navigation and I implemented that.

But I have to click on the Grid using mouse first and then I can use the keyboard to navigate down. How can I set the focus to the Grid using some Javascript method so that whenever I need I can set focus to the grid and user can start clicking up/down arrows.

Thanks,
Piyush
Yavor
Telerik team
 answered on 07 Apr 2008
6 answers
193 views
I am using the framework 3.5 RadComboBox to make a multicolumn dropdown. I am seeing two problems.

  1. The drop down list header does not stay in a fixed position like you can find with the telerik demos.
  2. Regardless of the width settings the dropdown list always has horizontal scroll bar. The list appears to have a 20-30 px padding-left that will not go away.

Are there know issues? Is there something I can do to fix these problems?

Nikolay
Telerik team
 answered on 07 Apr 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?