Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
110 views
hi all,

i want to change the style of entire week on mouse hovering a date in calendar. is this possible?

Thanks


Princy
Top achievements
Rank 2
 answered on 19 Aug 2009
3 answers
439 views

Hello,

When used the default skin provided by RadCombobox the items in the listbox get wrapped while viweing them in the list if the list item is long.

I am using custom skin for RadCombobox. Using this skin, I managed to get the required appearance but the wrap functionality doesn't seem to work.
 
Instead when any one of the item in the list is long I am getting a horizontal scroll bar in the list.

I even tried setting the NoWrap property to false.

I don't want the horizontal scroll bar in the list of items of the radComboBox; instead the word should be wrapped as it does for the normal skin.

 

Please help me solving this issue.
Am I going wrong anywhere in the stlyesheet that I have formed because of which the wrap is not working?

 Below is the definiton of the ComboBox  and the stylesheet file used.

    <telRAD:RadComboBox ID="radCombo" NoWrap="false" Height="70PX" runat="server" EnableEmbeddedSkins="false" Skin="radBP">
                                <Items>
                                    <telRAD:RadComboBoxItem  Value="A" Text="ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"/>
                                    <telRAD:RadComboBoxItem  Value="B" Text="B"/>
                                    <telRAD:RadComboBoxItem  Value="C" Text="C"/>
                                    <telRAD:RadComboBoxItem  Value="D" Text="D"/>
                                    <telRAD:RadComboBoxItem  Value="E" Text="E"/>
                                    <telRAD:RadComboBoxItem  Value="F" Text="F"/>
                                </Items>
                            </telRAD:RadComboBox>

 

stylesheet file.

/* RadComboBox skin */
/*global*/
.RadComboBox_radBP *
{
margin:0;
padding:0;
}
.RadComboBox_radBP,
.RadComboBox_radBP input,
.RadComboBoxDropDown_radBP
{
font:12px verdana;
color:#999;
}
/* combobox */
.RadComboBox_radBP
{
vertical-align:bottom;
}
.RadComboBox_radBP table
{
border:0;
border-collapse:collapse;
}
.RadComboBox_radBP td
{
border: 0;
}
.RadComboBox_radBP .rcbInputCell
{
/*width:100%;
height:23px;
line-height:22px;
border:solid 1px blue;
vertical-align:top;*/
/*background: transparent url('ComboBox/rcbBg.gif') no-repeat;*/

border:1px solid #7F9DB9; 
background-color: white;
vertical-align: middle;
font-family: Verdana;
font-size: 0.9em;
color: black;
padding-left: 3px;
/*padding-top: 4px; 
padding-left: 3px;*/
height: 18px;
/*cursor: default;*/

}
.RadComboBox_radBP .rcbInputCellLeft { background-position: 0 0; padding-left: 5px; }
.RadComboBox_radBP .rcbInputCellRight { background-position: 100% 0; padding-right: 5px; }
.RadComboBox_radBP .rcbDisabled .rcbInputCellLeft { background-position: 0 -24px; }
.RadComboBox_radBP .rcbDisabled .rcbInputCellRight { background-position: 100% -24px; }
.RadComboBox_radBP .rcbHovered .rcbInputCellLeft { background-position: 0 -48px; }
.RadComboBox_radBP .rcbHovered .rcbInputCellRight { background-position: 100% -48px; }
.RadComboBox_radBP .rcbFocused .rcbInputCellLeft { background-position: 0 -72px; }
.RadComboBox_radBP .rcbFocused .rcbInputCellRight { background-position: 100% -72px; }
.RadComboBox_radBP .rcbInputCell input
{
width:100%;
/*background:transparent;*/
 border:0;
 vertical-align:top;
 background-color: white;
 vertical-align: middle;
 font-family: Verdana;
 font-size: 0.9em;
 color:Black;
}
.RadComboBox_radBP .rcbInputCell
{
padding: 0 0 0 2px;
}
.RadComboBox_radBP_rtl .rcbInputCell input
{
padding:4px 2px 3px 0;
}
.RadComboBox_radBP_rtl .rcbInputCell
{
padding: 0 2px 0 0;
}
.RadComboBox_radBP .rcbArrowCell
{
border: 0;
padding:0;
width:15px;
border: 1px solid #7F9DB9;
background:url('C:\Inetpub\wwwroot\GEMSHub\GEMSHubWebSite\RADControls\ComboBox\Skins\radCombo\DropArrow.gif') no-repeat;
}
/*.RadComboBox_radBP .rcbArrowCellLeft { background-position: -24px 0; }
.RadComboBox_radBP .rcbArrowCellRight { background-position: 0 0; }
.RadComboBox_radBP .rcbDisabled .rcbArrowCellLeft { background-position: -24px -24px; }
.RadComboBox_radBP .rcbDisabled .rcbArrowCellRight { background-position: 0 -24px; }
.RadComboBox_radBP .rcbHovered .rcbArrowCellLeft { background-position: -24px -48px; }
.RadComboBox_radBP .rcbHovered .rcbArrowCellRight { background-position: 0 -48px; }
.RadComboBox_radBP .rcbFocused .rcbArrowCellLeft { background-position: -24px -72px; }
.RadComboBox_radBP .rcbFocused .rcbArrowCellRight { background-position: 0 -72px; }*/
.RadComboBox_radBP .rcbArrowCell a
{
position:relative;
outline:none;
line-height:22px;
overflow:hidden;
display:block;
width:24px;
height:25px;
text-decoration:none;
text-indent: -9999px;
font-size: 0;
}
.RadComboBox_radBP .rcbHovered,
.RadComboBox_radBP .rcbHovered input,
.RadComboBox_radBP .rcbFocused,
.RadComboBox_radBP .rcbFocused input
{
color:Black;
}
.RadComboBox_radBP .rcbDisabled .rcbArrowCell a
{
cursor:no-drop;
}
.RadComboBox_radBP .rcbDisabled,
.RadComboBox_radBP .rcbDisabled input
{
color: #373737;
}
/* dropdown */
.rcbSlide
{
position:absolute;
overflow:hidden;
display:none;
_height:1px;
float:left;
}
.RadComboBoxDropDown_radBP
{
position:absolute;
background:#fff;
border: 1px solid #323232;
cursor:default;
font-size:0.9em;
text-align: left;
}
.RadComboBoxDropDown_radBP .rcbScroll
{
overflow:auto;
}
.RadComboBoxDropDown_radBP .rcbList
{
list-style:none;
margin:0;
padding:0;
}
.RadComboBoxDropDown_radBP .rcbNoWrap .rcbList
{
float:left;
WORD-WRAP:BREAK-WORD;
}

.RadComboBoxDropDown_radBP .rcbHeader
{
background:#202020;
border-bottom: 1px solid #141414;
color:#999;
padding:3px 0;
}
.RadComboBoxDropDown_radBP .rcbNoWrap .rcbItem,
.RadComboBoxDropDown_radBP .rcbNoWrap .rcbHovered,
.RadComboBoxDropDown_radBP .rcbNoWrap .rcbDisabled,
.RadComboBoxDropDown_radBP .rcbNoWrap .rcbLoading
{
white-space:nowrap;
WORD-WRAP:BREAK-WORD;
}
.RadComboBoxDropDown_radBP .rcbItem,
.RadComboBoxDropDown_radBP .rcbHovered,
.RadComboBoxDropDown_radBP .rcbDisabled,
.RadComboBoxDropDown_radBP .rcbLoading
{
padding:4px 20px 4px 4px;
zoom:1;
}
*+html .RadComboBoxDropDown_radBP .rcbItem,
*+html .RadComboBoxDropDown_radBP .rcbHovered,
*+html .RadComboBoxDropDown_radBP .rcbDisabled,
*+html .RadComboBoxDropDown_radBP .rcbLoading
{
zoom: normal;
}
.RadComboBoxDropDown_radBP_rtl .rcbItem,
.RadComboBoxDropDown_radBP_rtl .rcbHovered,
.RadComboBoxDropDown_radBP_rtl .rcbDisabled,
.RadComboBoxDropDown_radBP_rtl .rcbLoading
{
padding:4px 4px 4px 20px;
}
.RadComboBoxDropDown_radBP .rcbItem
{
 font-family: Verdana;
 font-size: 0.9em;
 color: #333333; 
 padding: 1px 0px 0px 3px; 
 text-decoration: none;
 text-align: left;
 _height:1%;
}
.RadComboBoxDropDown_radBP .rcbHovered
{
/*background:#343434 url('ComboBox/rcbDropDownHover.gif') repeat-x top left;*/
 font-family:Verdana ;
 font-size: 0.9em;
 color: white;
 text-decoration: none;
 /*background-color: #777777; */
 background-color: #316AC5;
 /*cursor: pointer;
 /*cursor: hand;*/
 padding: 1px 0px 0px 3px;
 text-align: left;
 _height:1%;
}
.RadComboBoxDropDown_radBP .rcbDisabled
{
color:#555;
cursor:no-drop;
}
.RadComboBoxDropDown_radBP .rcbLoading
{
background:#292929;
color: #505050;
text-align:center;
}
.RadComboBoxDropDown_radBP .rcbMoreResults
{
clear:both;
background:#292929;
padding:4px;
text-align:center;
border-top: 1px solid #141414;
}
.RadComboBoxDropDown_radBP .rcbMoreResults a
{
display:block;
width:7px;
height:6px;
/*background:url('ComboBox/rcbMoreResults.gif') no-repeat transparent;*/
margin:0 auto;
text-indent:-3333px;
overflow:hidden;
text-decoration:none;
cursor:pointer;
}
.RadComboBoxDropDown_radBP .rcbMoreResults span
{
display:block;
text-align:center;
}
.RadComboBoxDropDown_radBP .rcbScroll
{

}
/*hacks*/
/*Opera start*/
@media screen and (min-width:550px)
{
.RadComboBoxDropDown_radBP_rtl .rcbItem,
.RadComboBoxDropDown_radBP_rtl .rcbHovered,
.RadComboBoxDropDown_radBP_rtl .rcbDisabled,
.RadComboBoxDropDown_radBP_rtl .rcbLoading
{
 padding:4px 4px 4px 20px;
}
} /*Opera end*/

 

Mausami
Top achievements
Rank 1
 answered on 19 Aug 2009
3 answers
172 views
hi,

i want to select the first row in the grid after pageindexchange event.

i tried the below code but it is not working 

rgStockItem.MasterTableView.Items[0].Selected =

true;

any help will be greatly appreciated.

 

Shinu
Top achievements
Rank 2
 answered on 19 Aug 2009
4 answers
103 views
I have IsSticky="true" and Wrap="false" on my RadAjaxLoading panel but it always wraps to a new line nonetheless. I even added a CssClass to it that set display:inline and white-space:nowrap and it still wraps. How do you get the loading panel to now wrap to a new line?

rh
Top achievements
Rank 1
 answered on 18 Aug 2009
1 answer
109 views
I am trying to use the DateInput for an Arabic, Saudia Arabia (ar-SA 1025) site and it doesn't seem to work.
I try to enter '1430/08/26' and it doesn't accept the input.
I am using Version=2008.2.723.35.
Even the latest demo @ http://demos.telerik.com/aspnet-ajax/input/examples/raddateinput/firstlook/defaultcs.aspx doesn't seem to work.

Am I missing something ?? Does my system have to be configured a certain way to support ar-SA??

        <telerik:RadDateInput  
            ID="RadDateInputStartDate" 
            runat="server" DateFormat="yyyy/MM/dd" Culture="ar-SA" 
            ButtonsPosition="Left"> 
            <ClientEvents OnError="HandleError" /> 
        </telerik:RadDateInput> 

I programmatically set the date to '1430/08/26' in the code behind and as soon as I click on (client side) the DateInput control it converts it to the en-US equivalent. The problem appears to be the client-side javascript doesn't know I am running an arabic site.

  • Using an arabic firefox install
  • The Culture of the page and DateInput control is set to ar-SA.
  • Running on win2k3 (in Sharepoint)
  • Tried changing the 'Regional and Language' settings in the Control Panel to 'Arabic (Saudi Arabia) didn't seem to change anything




Martin
Telerik team
 answered on 18 Aug 2009
1 answer
74 views
I have two seperate RadGrids, I want the user to click on item in RadGrid1
+ if post count is zero then will popup via link a radwindow to add, this works
+ if post count is greater than zero then have a link that will simply pass the TopicID to RadGrid2 which will then display all posts
for that topic in seperate grid.  Would be  nice to have RadGrid2 visible = false UNTIL user clicks on this link

<

 

telerik:GridTemplateColumn UniqueName="Item" HeaderText="Item" ReadOnly="true" SortExpression="ITEM">

 

 

<ItemTemplate>

 

<%

# setPosts(Convert.ToInt32(Eval("Posts")))%>   -- this code sets a variabe in code behind so can be determined in next line

 

 

<%

if (Posts > 0)

 

{ %>

 

-- this is where I need the help
<
a href="#" runat="server" onserverclick='<%# withPosts(Convert.ToInt32(Eval("ID"))) %>'><%# DataBinder.Eval(Container.DataItem, "Item")%> (<%# DataBinder.Eval(Container.DataItem, "Posts")%>)

 

 

</a>

 

<%} %>

<%

else

 

{ %>

 

<a href="#" onclick="openAddTopicWindow('<%# DataBinder.Eval(Container.DataItem, "ID") %>'); return false;"><%# DataBinder.Eval(Container.DataItem, "Item")%> (<%# DataBinder.Eval(Container.DataItem, "Posts")%>)

 

 

</a>

 

<%} %>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

Martin
Telerik team
 answered on 18 Aug 2009
6 answers
322 views
Why is it that the editor does not encode quotes?  Is there a feature I can turn on for this?  It encodes line breaks and the like, but does nothing with double quotes.

When applying something like: Server.HtmlEncode(RadEditor1.Content), you end up encoding the <br/> tags along with the quotes.  What good is having an editor format html if it only partially does it, and what is the rectification for this issue?  I understand a string.Replace could be used, but the methodology of this tool's encoding (in my mind) defies logical behavior?  It seems to me that I did not have this issue prior to Q2, but I could be wrong on that...
Schlurk
Top achievements
Rank 2
 answered on 18 Aug 2009
2 answers
189 views

I have tried the built-in RadEditorStatistics module, but I want to customize the character count. It needs to be smaller and flush right, and I don't need a word count (does anyone?) Plus, I want the character count to freshen dynamically on every keystroke.

Anyway, has anyone done a custom character counter that dynamically shows the remaining characters?

Thanks.

Terry Hoiness
Top achievements
Rank 1
 answered on 18 Aug 2009
1 answer
155 views
Hi

I have a tree view with check boxes and I want to use client side script to

1. If I un-check a box then I want to un-check all children
2. If I check a box then I want to check all the parent items all the way up the hierarchy of the tree

The code I have to do this is

  
 function updateAllChildren(nodes) 
                    { 
                       var i; 
                       for (i=0; i<nodes.get_count(); i++) 
                       { 
                           nodes.getNode(i).set_checked(false); 
                            
                           if (nodes.getNode(i).get_nodes().get_count()> 0) 
                           { 
                               updateAllChildren(nodes.getNode(i).get_nodes()); 
                           } 
                       } 
                    } 
                     
                    function clientNodeChecked(sender, eventArgs) 
                    { 
                        var selectedNode = eventArgs.get_node(); 
                        var isSelected = selectedNode.get_checked(); 
                        var currentNode = selectedNode.get_parent(); 
                        var childNodes = selectedNode.get_nodes(); 
                     
                        // toggle node 
                        selectedNode.set_checked(!isSelected); 
                     
                        if (isSelected) // If seleceted then push changes up hierarchy 
                        { 
                            while (currentNode.get_attributes().getAttribute("ParentID") != "0") 
                            { 
                                currentNode.set_checked(true); 
                                currentNodecurrentNode = currentNode.get_parent(); 
                            } 
                        } 
                         
                        if (!isSelected)// force uncheck for all children 
                        { 
                            updateAllChildren(childNodes); 
                        } 
                         
                     
                    
                } 

The code appears to be working to a degree in that

1. If I check a child item then it correctly sets all the parent items up the tree to checked
2. If I un-check an item it correctly un-checks all the children entries

The problem I am having is that if I

1. When I try to check an item that has children then nothing happens - The variable isSelected is set to false, when it should be true.
2. When I try to un-select an item that has no children then nothing happens - The variable isSelected is set to true when it should be false.

I can get it working fine with server side code, but client side would be much neater

Many thanks in advance

Huw Lloyd
Top achievements
Rank 1
 answered on 18 Aug 2009
1 answer
165 views

Hi

I am having a RadGrid . Inside that I placed two RadTimePickers FromTime and ToTime.
Right now I am using Compare Validator for validating To Time and From Time .(from time should be less than to Time)

But I want to show an  alert instead of the message 
How to achieve it.
My code was given below. Please suggest


      <rad:RadGrid ID="gvWorkingHours_New" runat="server" Skin="SkeltaGrid" AutoGenerateColumns="false"
              >
                <MasterTableView>
                    <Columns>
                        <rad:GridTemplateColumn>
                            <ItemTemplate>
                                <asp:TextBox runat="server" ID="txtSlotName" CssClass="inputsNoExpression" Text='<%# Eval("SlotName") %>'></asp:TextBox>
                            </ItemTemplate>
                        </rad:GridTemplateColumn>
                        <rad:GridTemplateColumn>
                            <ItemTemplate>
                                <radCln:RadTimePicker ID="rtpFromTime" Width="31%" runat="server" TabIndex="2" EnableTyping="true"
                                    TimeView-TimeFormat="HH:mm" DateInput-DateFormat="HH:mm" DateInput-DisplayDateFormat="HH:mm"
                                    DateInput-EmptyMessage="From Time" DBSelectedDate='<%# Eval("FromTime") %>'>
                                    <TimeView ID="tvFrom" runat="server" ShowHeader="False" Interval="00:30" Columns="3">
                                    </TimeView>
                                </radCln:RadTimePicker>
                            </ItemTemplate>
                        </rad:GridTemplateColumn>
                        <rad:GridTemplateColumn>
                            <ItemTemplate>
                                <radCln:RadTimePicker ID="rtpToTime" Width="31%" runat="server" TabIndex="2" EnableTyping="true"
                                    TimeView-TimeFormat="HH:mm" DateInput-DateFormat="HH:mm" DateInput-DisplayDateFormat="HH:mm"
                                    DateInput-EmptyMessage="To Time" DBSelectedDate='<%# Eval("ToTime") %>'>
                                    <TimeView ID="tvTo" runat="server" ShowHeader="False" Interval="00:30" Columns="3"
                                         OnClientTimeSelected="TestHandler">
                                    </TimeView>
                                </radCln:RadTimePicker>
                            </ItemTemplate>
                        </rad:GridTemplateColumn>
                        <rad:GridTemplateColumn>
                            <ItemTemplate>
                                <asp:CompareValidator ID="dateCompareValidator" runat="server" ControlToValidate="rtpToTime"
                                    ControlToCompare="rtpFromTime" Operator="GreaterThan" Type="String" ErrorMessage="To Date must be greater than From Date">
                                </asp:CompareValidator>
                            </ItemTemplate>
                        </rad:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
            </rad:RadGrid>
            <asp:LinkButton ID="LinkButton1" runat="server" OnClick="lnkbtnAddSlot_New_Click"
                Width="97px" CssClass="sf-inputsLinkButton" OnClientClick="return AddSlot_New()">Add Slot_New</asp:LinkButton>
       ---
code behind 

protected

 

void Page_Load(object sender, EventArgs e)

 

{

 

if (!IsPostBack)

 

{

SetInitialRowForSlots_New();

}

}

 

private void SetInitialRowForSlots_New()

 

{

 

DataTable dtSlots = new DataTable();

 

dtSlots.Columns.Add(

new DataColumn("SlotName", typeof(string)));

 

dtSlots.Columns.Add(

new DataColumn("FromTime", typeof(string)));

 

dtSlots.Columns.Add(

new DataColumn("ToTime", typeof(string)));

 

 

DataRow drSlot = dtSlots.NewRow();

 

drSlot[

"SlotName"] = string.Empty;

 

drSlot[

"FromTime"] = new TimeSpan(0, 0, 0);

 

drSlot[

"ToTime"] = new TimeSpan(0, 0, 0);

 

dtSlots.Rows.Add(drSlot);

gvWorkingHours_New.DataSource = dtSlots;

gvWorkingHours_New.DataBind();

}

 

protected void lnkbtnAddSlot_New_Click(object sender, EventArgs e)

 

{

 

DataTable dtSlots = new DataTable();

 

dtSlots.Columns.Add(

new DataColumn("SlotName", typeof(string)));

 

dtSlots.Columns.Add(

new DataColumn("FromTime", typeof(string)));

 

dtSlots.Columns.Add(

new DataColumn("ToTime", typeof(string)));

 

 

foreach (GridDataItem pkgItem in gvWorkingHours_New.MasterTableView.Items)

 

{

 

TextBox SlotName = pkgItem.FindControl("txtSlotName") as TextBox;

 

 

RadTimePicker FrTime = pkgItem.FindControl("rtpFromTime") as RadTimePicker;

 

 

RadTimePicker ToTime = pkgItem.FindControl("rtpToTime") as RadTimePicker;

 

 

DataRow dr = dtSlots.NewRow();

 

dr[

"SlotName"] = SlotName.Text;

 

dr[

"FromTime"] = new TimeSpan(((DateTime)(FrTime.DbSelectedDate)).TimeOfDay.Hours, ((DateTime)(FrTime.DbSelectedDate)).TimeOfDay.Minutes, 0);

 

dr[

"ToTime"] = new TimeSpan(((DateTime)(ToTime.DbSelectedDate)).TimeOfDay.Hours, ((DateTime)(ToTime.DbSelectedDate)).TimeOfDay.Minutes, 0);

 

dtSlots.Rows.Add(dr);

}

 

DataRow drEmpty = dtSlots.NewRow();

 

drEmpty[

"SlotName"] = string.Empty;

 

drEmpty[

"FromTime"] = new TimeSpan(0, 0, 0);

 

drEmpty[

"ToTime"] = new TimeSpan(0, 0, 0);

 

dtSlots.Rows.Add(drEmpty);

gvWorkingHours_New.DataSource = dtSlots;

gvWorkingHours_New.DataBind();

}


Regards
Sreedhar Ambati
Schlurk
Top achievements
Rank 2
 answered on 18 Aug 2009
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?