Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
219 views
Hi,
I have created a menu and inserted separator items between each button item, but I want the space to be blank. I set
text = ""
isSeparator = True
width = 5

The menu renders as I had expected in IE7, with a gap between each button image, but in firefox and safari, the separator is ignored.
I have tried setting text = " " to no avail. Adding a character such as "|" does cause the separator to be rendered.

Is there a workaround for this?

Thanks

Rob
Veselin Vasilev
Telerik team
 answered on 09 Apr 2008
3 answers
509 views

I have a RadTextBox and an ASP checkbox. 
 
<telerik:RadTextBox ID="igcWebTxtEvent" runat="server" Skin="Outlook" Width = "530px"  CausesValidation="True" Font-Bold="False" ForeColor="DarkSlateGray" >
</telerik:RadTextBox>

<asp:CheckBox ID="chkOmitEvent" runat="server" TextAlign="Left" ToolTip="Omit" OnCheckedChanged="chkOmitEvent_CheckedChanged" />


The design time skin for the RadTextBox is "Outlook". Now when the user clicks on the textbox, the background color of the RadTextBox is changed to LemonChiffon. This is done on the client side through JAVASCRIPT which is attached to the checkbox in the behind code in the page load event.

Behined Code:
chkOmitEvent.Attributes.Add("OnClick", "javascript:  return setTextBoxBackgroundColor('" + igcWebTxtEvent.ClientID.ToString() + "','" + chkOmitEvent.ClientID.ToString() + "');");

Client side javascript:
var  originalStyle="";

function setTextBoxBackgroundColor(textBoxID, checkBoxID)
{
      
    var TextBox = $find(textBoxID); 
          
    var retVal = document.getElementById(checkBoxID).checked;
   
    if(retVal)  
    {
        originalStyle =   TextBox.get_styles().EnabledStyle[0];
        TextBox.get_styles().EnabledStyle[0] += "background-color: lemonchiffon;";
    }
    else
        TextBox.get_styles().EnabledStyle[0] = originalStyle;
   
    TextBox.updateCssClass();
    return true;           
}

On the client side everything works like it should, when the the RadTextbox is focused or hovered the color becomes white, which is due to the outlook skin, and otherwise its background color is lemon.

Since this happend at the client side, when the submit button is pressed, there is an event handler on the server side:

All the original values are obtained before postback in the page load event, which happen to be "None".

On Page load before postback:

 if (!Page.IsPostBack){
                    originalEnabledColor = igcWebTxtEvent.EnabledStyle.BackColor;                    originalFocusedColor = igcWebTxtEvent.FocusedStyle.BackColor ;
                    originalHoverColor=igcWebTxtEvent.HoveredStyle.BackColor ;
}

Check box server side event handler:

  protected void chkOmitEvent_CheckedChanged(object sender, EventArgs e)
        {

            if (chkOmitEvent.Checked)
            {                
                igcWebTxtEvent.EnabledStyle.BackColor=  
System.Drawing.Color.LemonChiffon;                                
                               igcWebTxtEvent.FocusedStyle.BackColor = originalFocusedColor;               
igcWebTxtEvent.HoveredStyle.BackColor = originalHoverColor;                
            }
            else
            {
                 igcWebTxtEvent.EnabledStyle.BackColor = originalEnabledColor;
                igcWebTxtEvent.FocusedStyle.BackColor = originalFocusedColor;
                igcWebTxtEvent.HoveredStyle.BackColor = originalHoverColor;

            }

        }

Now the problem is that after the server event is called after postback, all colors become lemon, when hovered/focused. And this behavior propogates since the client side function only sets the enabled color and not the focused/hovered colors. So even when the checkbox is unchecked, the hovered/focused colors remain lemon.

However the "else" part of the if condition (when the skin behavior is restored) 

  else
            {
                 igcWebTxtEvent.EnabledStyle.BackColor = originalEnabledColor;
                igcWebTxtEvent.FocusedStyle.BackColor = originalFocusedColor;
                igcWebTxtEvent.HoveredStyle.BackColor = originalHoverColor;

            }


works fine when it is restored after a postback. And the main observation is that if I do not add the following two lines:
                igcWebTxtEvent.FocusedStyle.BackColor = originalFocusedColor;
                igcWebTxtEvent.HoveredStyle.BackColor = originalHoverColor;

the hover/focused background colors remain lemon whereas the enabled style one is the same as the skin which is blue. Because my understanding was setting the enabled style background color sets all background colors as is the case when I am setting it to Lemon but not the case when I am setting it to its original color. Original backcolor also happens to be "None". Which is why I guess this is happening.  

This is what I am looking for ideally:

1. When a checkbox is checked, the enabled backcolor becomes lemon however focused/hovered remain white
2. When the the checkbox is unchecked, the original skin behavior is restored.

This has to be handled on both client side and server side due to postbacks. On client side it is working fine. However, on the server side it is not.

Is there any other way of acheiving this?  I tried to play around with the style attributes, css attributes on the server side but got nothing to work.

Any help would be greatly appreciated.

Thanks,
Tal





plamen
Top achievements
Rank 1
 answered on 09 Apr 2008
2 answers
80 views
I am trying to build a page that looks like it has many tables/grids on it. Only one variable changes for each grid so noturally i would like to use the grid with grouping turned on but the customer doesnt like the look of grouping since it doesnt really look like several grids, it looks like 1..I feel like I could almost hack the style in the css but the one area i cannot get is how to repeat the header for each subgroup.

Here is the intended output, if anyone can help me with that I would be willing to pay.

http://btqnet.com/groups.png 

Thanks
John
Yavor
Telerik team
 answered on 09 Apr 2008
0 answers
117 views
When printing out my menu, the menu start listning by Parent = <NULL>

My Menu
| Start id=(1)Parent=NULL | Producuts(id = 2)Parent=NULL |

but when clicked on Products i want a new menu to start but instead of start listning by NULL i want to start listning by ID where id = 2. Is this possiable.
auderis
Top achievements
Rank 1
 asked on 09 Apr 2008
4 answers
452 views
Hi all

I am looking for some good scheduler examples in vb.net. I need theese examples to show me how to use the scheduler with an SQL datasource, without having the datasource integrated in the aspx file.

I would like to see how to control the scheduler from the .aspx.vb file (building it in page_init or page_load, inserting and updating appointments etc.)

Can anyone provide me with the information i need ?

Best regards
Bo
ewart
Top achievements
Rank 1
 answered on 09 Apr 2008
3 answers
218 views
Hi,
I was wondering if when using RadGrid Prometheus to export a PDF, if there is a way to also write that file to the server? If not, is this something Telerik Reporting can do?

I really just need to create a simple PDF (one record) and write it to disk, so I was hoping to avoid new software costs and learning curve...

Thanks,
Joe 
Chavdar
Telerik team
 answered on 08 Apr 2008
1 answer
135 views
Hi

I'm using the following code to cancel key strokes, which is working fine for most keys. However it does not cancel the Enter key? Can anybody help me cancel this?

function TP_cancelEvent(e)

{

if(!e) { e = window.event; }

if(e.stopPropagation) { e.stopPropagation(); }

if(e.preventDefault) { e.preventDefault(); }

var editor = $find("<%=RadEditor1.ClientID%>"); //get a reference to RadEditor client object

var theSelectionObject = editor.getSelection();

var theSelectedElement = theSelectionObject.getParentElement();

alert(

'Event Cancelled.\n\ntheSelectionObject.getHtml()\n\n' + theSelectionObject.getHtml());

e.cancelBubble =

true;

e.cancel =

true;

e.returnValue =

false;

return false;

}

Rumen
Telerik team
 answered on 08 Apr 2008
1 answer
104 views
Hi,

I am using sceduler control, I would like do some customization on appointment window.

When we click on appointment, it opens up a new window with description text.
Can we do any customisation on description text like font change , adding link , carriage return.

If any body has an idea please reply me back.
Peter
Telerik team
 answered on 08 Apr 2008
1 answer
145 views
Is there a way to disable the "Call Image Manager" which has the ("...") button next to the Image Src text box that is located in the Image Properties Dialog Box?

Thank you. 
George
Telerik team
 answered on 08 Apr 2008
1 answer
103 views
Hi - How do you make a simple radcombobox with images in it?  I follow the example at:

http://www.telerik.com/demos/aspnet/prometheus/ComboBox/Examples/Default/DefaultCS.aspx

... shown below, and it does not work.  Error it gives is "imagepath is not a valid attribute of element radcomboboxitems.


<telerik:RadComboBox

ID="RadComboBox_Broker" runat="server"

Width="200px" Height="115px"

Skin="Vista"

MarkFirstMatch="false" HighlightTemplatedItems="True"

ShowToggleImage="True" AllowCustomText="false" EnableLoadOnDemand="false">

<ItemTemplate>

<div class="qsfexBrokerView">

<img class="qsfexBrokerPic" src='Images/people/<%# DataBinder.Eval(Container, "Attributes['ImagePath']") %>' alt="" />

<span class="qsfexBrokerName"><%# DataBinder.Eval(Container, "Text") %></span>

</div>

</ItemTemplate>

<Items>

<telerik:RadComboBoxItem

ImagePath="images/black.gif"

Text="Florence Osbourne">

</telerik:RadComboBoxItem>

<telerik:RadComboBoxItem

ImagePath="pic2.jpg"

Text="Ildó Zinnia">

</telerik:RadComboBoxItem>

<telerik:RadComboBoxItem

ImagePath="pic3.jpg"

Text="Josephine Steph">

</telerik:RadComboBoxItem>

<telerik:RadComboBoxItem

ImagePath="pic4.jpg"

Text="Abe Rodney">

</telerik:RadComboBoxItem>

</Items>

</telerik:RadComboBox>

jtby
Top achievements
Rank 1
 answered on 08 Apr 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?