Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
138 views
Hi all,
we are using the new RadControl Ajax Q3 2010 SP2 and found a weird issue.
These are the steps to reproduce it:

- open up the "RadControls for ASP.NET AJAX Q3 2010 SP2 Live Examples" and choose the demo called Editor/First Look
- copy some formatted text from Word: choose a mix of left/center/right aligned sentences for your convenience. I've used the text in the attached "PasteFromWordText" image
- paste to the Editor: choosing "no" (or "Cancel") to the request to clean the formatting: the text appears the same as it appears in Word: good
- click the "HTML" button to view the html code
- click the "Design" button to go back to the text: the formatting is lost and all paragraphs are now left-aligned (see attached "pasteFromWordAfterPostback image)

In our application we don't use the "HTML" mode but the same thing happens when we post the page back (for instance to save the text to our database): I can reassure that the Content property is not manipulated by our code and after the page is refreshed, the formatting is lost.

I've already set some properties in the Editor like ContentFilters="none" and StripFormattingOptions="none" but no luck.
Any ideas?

Thanks
Mauro

Michael
Top achievements
Rank 1
 answered on 10 Feb 2011
2 answers
64 views
Hello,

I have a RadDock control wrapped in a usercontrol, Dashboard1.

Dashboard1 is on a page with a DetailsView that allows a user to setup information about their dashboard, such as Name and Description.

The requirement is that the 'dashboard' is hidden until the user clicks the 'Edit' button on the DetailsView. ( this.Dashboard1.Visible = this.dvDashboard.CurrentMode == DetailsViewMode.Edit;)

However, when the edit button is clicked and the dashboard is set to visible, in FireFox the Title is not shown.

The HTML output looks as follows:
<div class="rdTitleBar rdDraggable" id="ctl00_ContentPlaceHolder1_Dashboard1_RadDock86824b65a96a5a46c1aa890a1f01e87b0292_T" style="cursor: move;">
                        <em style="width: 0px;">Weather</em>

It's the width:0px that FireFox dislikes. I was wondering what circumstances would cause this with to be 0 (until the dock is moved and the title then appears).

Mhairi
Top achievements
Rank 1
 answered on 10 Feb 2011
3 answers
146 views
Hi All,
I am using Telerik Rad Calender

1) I have to show two buttons in each calender cell.
2) I have to capture the additional two butttons click event.
how can i do this.

Pls help me
Radoslav
Telerik team
 answered on 10 Feb 2011
2 answers
148 views
hi together,

i have a grid on my page which uses multi row selection (with help of a GridClientSelectColumn) and highlighting.
the options for AllowMultiRowSelection and AllowRowSelect are set to "true", UseClientSelectColumnOnly is set to "false".

everything works as supposed except for one thing: everytime i click on one of the checkboxes, the complete row becomes highlighted. i'd like to have the highlight feature exclusively by clicking in the row, not on the checkboxes.

is there a built-in way to highlight only the last selected row and do multi row selection with the checkboxes without highlighting?? i think it's the same way the radtreeview works...
if that's not the case, which event do i hang on to cancel the checkbox highlighting on my own ?

thanks for your help :) regards
hendrik
Hendrik
Top achievements
Rank 1
 answered on 10 Feb 2011
6 answers
205 views
hi
I've got an radgrid with edit/delete/insert features enabled on. editmode for the grid is set to popup. I'd like to know How can I alter edit window's Update/Cancel buttons captions' to some other langueage ( destination language is Persian(Iran)) . Perferebly I would enjoy setting some properties to write my own stuff.

thanks for upcomming replies.
With Kind Regards
wnl
Top achievements
Rank 1
 answered on 10 Feb 2011
1 answer
141 views
Hi,

I have upgraded the telerik controls version from 2010.3.929.35 to version 2010.3.1317.35.

In Current version(2010.3.1317.35), when we copy the content from word document and Paste the clipboard data to Radeditor control by only Paste command(Not the Paste from word, only using Paste (CTRL +V)),  
Then after by showing the HTML view or Preview the content, the actual view which is pasted is lost and all are goes left aligned, and aslo STYLE attribut from page also removed.

And also Disableing the ConvertToXhtml  is not working.

This above problem is not happening in Previous version (2010.3.929.35).
 
Please see the attached screen shot.

Vijay
Dobromir
Telerik team
 answered on 10 Feb 2011
1 answer
83 views
Hi,

I'm building a grid dynamically from several database tables. 
Tables: 
* Groups (used to group columns)
* Columns

And datatables, to support data in the structure.

One column can only be member of one group.. but a group can contain several columns.
In the Grid this will be viewed with two column headers, where the group header uses columnspan to span over the columns within the group.
A column contains datatype, format, width and alignment.
So far so good... 

I managed to create a grid looking like it should with the column headers and groupheaders. I used the PreRender event to add a second header.

I also added all necessary data to the extendedproperties on the datatable (the datatable is dynamically buildt to support the dynamic setup). So this would be available for me when rendering the grid.

But my problem starts when i wanted to format the data within the cells/columns. One of the column had the type DateTime and the format "{0:dd.MM}" (want to show day and month only). I tried to set the DataFormatString in the PreRender Event for the column, but it still shows the whole date and time. 
How can i solve this? This is the code i hardcoded into the prerender event to test this: 
((GridBoundColumn)RadGrid1.MasterTableView.GetColumn("to.date")).DataType = Type.GetType("System.DateTime");
((GridBoundColumn)RadGrid1.MasterTableView.GetColumn("to.date")).DataFormatString = "{0:dd.MM}";

I'm not able to set the alignment for the column either. I can set it for the columnheaders, but i think that is because i have the cell object for each header. I want to be able to set both the format and the alignment for the column some place...

Some of the columns can have a flag saying that if the value drops below zero we want to display zero or blank. Is there anywhere this can be set. And remember, i don't know the name of the column before runtime.

And one other thing: How can i add a "grand total" row at the end summarizing only the columns marked for it? (eg: column3, column4 and column5 should be summarized, but not column1 and column2).



Regards
Svein Thomas
Radoslav
Telerik team
 answered on 10 Feb 2011
0 answers
111 views
Working with 2008.2.1001.35

Main Idea : provide the ability to multi select values in radcombobox but allow to loadondemand
Secondary : update the number of selected item, current text is the first selected item in radcombobox

Main problem : on item request, we cannot get selected item"s".

Workaround :

Part 1 : implementing multi select and loadOnDemand at the same time
Tricky parts : rebind each item after getting datasource, binding values are Text and Value (names of radcomboboxitem), which are not the names in the datasource's header.

Aspx
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
[...]
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
         function StopPropagation(e) {
                e.cancelBubble = true;
                if (e.stopPropagation) {
                    e.stopPropagation();
                }
  
                var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
  
                var combo = $find("<%= multiselectTitle.ClientID %>");
                var newText = "";
                var cnt = 0;
                var items = combo.get_items();
                var first = false;
                var firstItem = "";
                for (var i = 0; i < items.get_count(); i++) {
                    var item = items.getItem(i);
                    var checkbox = item.get_element().getElementsByTagName("input")[0];
                    if (checkbox.checked) {
                        if (first == false) {
                            firstItem = item.get_text();
                            first = true;
                        }
                        newText += item.get_value() + ";";
                        cnt++;
                    }
                }
  
                ajaxManager.ajaxRequest(newText);
                combo.set_value(newText);
                combo.set_text(firstItem);
  
                document.getElementById("ctl00_contentPlaceHolder_div_count").innerHTML = cnt;
            }
[...]
  
<div id="div_count" runat="server">0</div>
  
[...]
  
<telerik:RadComboBox ID="multiselectTitle" runat="server" EnableLoadOnDemand="true" AutoPostBack="false" DataTextField="Title" DataValueField="Id" OnItemsRequested="multiselectTitle_ItemsRequested">
    <ItemTemplate>
        <div id="div1" onclick="StopPropagation(event)">
            <asp:CheckBox ID="chkBoxPrdTitle" runat="server" value='<%# DataBinder.Eval(Container, "Value") %>' />
                <asp:Literal ID="litPrdTitle" runat="server" Text='<%# DataBinder.Eval(Container, "Text") %>'></asp:Literal>
        </div>
    </ItemTemplate>
</telerik:RadComboBox>
  
[...]


Code behind
private void resetSelectedPrdIds()
    {
        Session["selectedPrdIds"] = null;
        div_count.InnerHtml = "0";
        multiselectTitle.Text = "";
    }
  
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            resetSelectedPrdIds();
        }
    }
  
    protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
    {
        string[] values = e.Argument.Split(';');
  
        List<int> ids = new List<int>();
        foreach (string value in values)
        {
            try { ids.Add(int.Parse(value)); }
            catch { }
        }
        Session["selectedPrdIds"] = ids;
    }
  
  
    protected void multiselectTitle_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
    {
        RadComboBox comboBox = (RadComboBox)sender;
  
        List<int> selectedPrdIds = new List<int>();
        if (Session["selectedPrdIds"] != null)
            selectedPrdIds = (List<int>)Session["selectedPrdIds"];
  
        var itemObjects = from items in myDataContext
                                         where (SqlMethods.Like(items.title, e.Text + "%") || 
                                                     (from vals in selectedPrdIds select vals).Contains(items.id))
                                         select new { Id = items.id, Title = items.title };
  
        foreach(var io in itemObjects)
        {
              comboBox.Items.Add(new RadComboBoxItem(io.Title, io.Id.ToString()));
        }
  
        RadComboBoxItemCollection rcbic = multiselectTitle.Items;
        foreach (RadComboBoxItem item in rcbic)
        {
            if (selectedPrdIds.Contains(int.Parse(item.Value)))
            {
                ((CheckBox)item.FindControl("chkBoxPrdTitle")).Checked = true;
            }
            item.DataBind();
        }
    }


Feel free to comment above code

joa
Patrick Anthamatten
Top achievements
Rank 1
 asked on 10 Feb 2011
3 answers
80 views
Hello,

Would this code work?

dim rs1 as new radscheduler
rs1.visible = true
rs1.enabled = true

I am trying to create multiple instances of RadScheduler on the fly.
Peter
Telerik team
 answered on 10 Feb 2011
1 answer
80 views
We have just started converting all of our asp:textbox to telerik:radTextBox. We created a standard css file (used for all aspx pages) so we could set the width's for different boxes based on usage. Example, a box for state only needs to be 2 characters wide (about 20-30px). The skin manager overrides the cssclass property setting for the telerik boxes, setting all boxes to the same width. How can I still use a custom style sheet to set width's and the skinmanager at the same time?
Iana Tsolova
Telerik team
 answered on 10 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?