Steve Holdorf
Top achievements
Rank 1
Steve Holdorf
asked on 01 Nov 2012, 07:04 PM
I have a radlistbox that is located in a html table. To center the radlistbox on the page I have the <td style="text-align:center"> but by doing this the bound list item's text are also centered in the radlistbox. How can I keep the radlistbox aligned center in the html table and also have the radlistboxitem's text left aligned?
<table>
<tr>
<td style="text-align:center">
<telerik:RadListBox ...
Thanks,
Steve Holdorf
<table>
<tr>
<td style="text-align:center">
<telerik:RadListBox ...
Thanks,
Steve Holdorf
12 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 02 Nov 2012, 04:20 AM
Hi,
You can set a css class for RadListView and set the style as follows to achieve your scenario.
ASPX:
CSS:
Thanks,
Princy.
You can set a css class for RadListView and set the style as follows to achieve your scenario.
ASPX:
<
table
>
<
tr
>
<
td
style
=
"text-align:center; width:400px"
>
<
telerik:RadListBox
ID
=
"RadListBox1"
runat
=
"server"
CssClass
=
"leftAlign"
>
..............
</
telerik:RadListBox
>
</
td
>
</
tr
>
</
table
>
CSS:
<style type=
"text/css"
>
.leftAlign
{
text-align
:
left
!important
;
}
</style>
Thanks,
Princy.
0
Steve Holdorf
Top achievements
Rank 1
answered on 02 Nov 2012, 11:18 AM
It works great! You guys are the best.
Thanks,
Steve Holdorf
Thanks,
Steve Holdorf
0
Mayur
Top achievements
Rank 1
answered on 14 Feb 2014, 11:34 AM
I have used the same css, but the code is working fine in firefox, but not in IE8,IE9 and IE10 , so please guide me if you have any solutions for this
0
Princy
Top achievements
Rank 2
answered on 17 Feb 2014, 06:14 AM
Hi Mayur,
Unfortunately I couldn't replicate the issue at my end. Please try the following CSS which works fine at my end.
CSS:
Thanks,
Princy.
Unfortunately I couldn't replicate the issue at my end. Please try the following CSS which works fine at my end.
CSS:
<style type=
"text/css"
>
.RadListBox_Default .rlbText, .RadListBox_Default .rlbItem
{
text-align
:
left
!important
;
}
</style>
Thanks,
Princy.
0
Mayur
Top achievements
Rank 1
answered on 24 Feb 2014, 11:00 AM
Hi,
I am using raddatepicker and i want difference between 2 dates using javascript
Here is my code,
var startDate = $find('<%=dtStart.ClientID%>');
var endDate = $find('<%=dtEndDate.ClientID%>');
if ((startDate.get_selectedDate() != null) && (endDate.get_selectedDate() != null)) {
var days = (startDate.get_selectedDate() - endDate.get_selectedDate());
}
But my days is returning some negative value -250000 something like this whereas i want difference
I am using raddatepicker and i want difference between 2 dates using javascript
Here is my code,
var startDate = $find('<%=dtStart.ClientID%>');
var endDate = $find('<%=dtEndDate.ClientID%>');
if ((startDate.get_selectedDate() != null) && (endDate.get_selectedDate() != null)) {
var days = (startDate.get_selectedDate() - endDate.get_selectedDate());
}
But my days is returning some negative value -250000 something like this whereas i want difference
0
Princy
Top achievements
Rank 2
answered on 24 Feb 2014, 11:58 AM
Hi Mayur,
Please try the following JavaScript which works fine at my end.
JavaScript:
Thanks,
Princy.
Please try the following JavaScript which works fine at my end.
JavaScript:
<script type=
"text/javascript"
>
function
Differnce() {
var
startDate = $find(
'<%=RadDatePicker1.ClientID%>'
);
var
endDate = $find(
'<%=RadDatePicker2.ClientID%>'
);
var
date1 = startDate.get_selectedDate();
var
date2 = endDate.get_selectedDate();
if
((date1!=
null
) && (date2!=
null
)) {
var
timeDiff = Math.abs(date2.getTime() - date1.getTime());
var
diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
}
alert(diffDays);
}
</script>
Thanks,
Princy.
0
Mayur
Top achievements
Rank 1
answered on 25 Feb 2014, 05:58 AM
Hi, the script really works
Thank you. :)
Thank you. :)
0
Mayur
Top achievements
Rank 1
answered on 25 Feb 2014, 03:18 PM
Hi,
Title - RadAjaxLoadingPanel waiting circle image not animating while redirecting page
I have RadPanelBar inside RadSplitter on master page.
I am calling different pages on click of RadPanelItem of RadPanelBar from master pages.
I have AjaxManager on master page with RadLoadingPanel for showing loading image.
Loading image doesnot animate when I redirects to another page but it works fine for other functionality.
If have any solutions,Please suggest.
Thank you.
Title - RadAjaxLoadingPanel waiting circle image not animating while redirecting page
I have RadPanelBar inside RadSplitter on master page.
I am calling different pages on click of RadPanelItem of RadPanelBar from master pages.
I have AjaxManager on master page with RadLoadingPanel for showing loading image.
Loading image doesnot animate when I redirects to another page but it works fine for other functionality.
If have any solutions,Please suggest.
Thank you.
0
Mayur
Top achievements
Rank 1
answered on 25 Feb 2014, 03:20 PM
Title - radgrid last column not resizing correctly
I have radgrid which contains 4 columns.
1)I have set property AllowColumnResize="true" of grid.
2)Resizing works fine for first 3 columns but for last column it doesnot work properly.
3)Last column resize to decrease width only and I am not able to increase width of last column.
I have radgrid which contains 4 columns.
1)I have set property AllowColumnResize="true" of grid.
2)Resizing works fine for first 3 columns but for last column it doesnot work properly.
3)Last column resize to decrease width only and I am not able to increase width of last column.
0
Princy
Top achievements
Rank 2
answered on 26 Feb 2014, 09:17 AM
Hi Mayur,
As for your first post, redirecting from one page to another page will not invoke any server request, so there will be no Ajax request and LoadingPanel will not show this the expected behavior.
For the next issue on RadGrid, please try enabling ResizeGridOnColumnResize.
ASPX:
Thanks,
Princy
As for your first post, redirecting from one page to another page will not invoke any server request, so there will be no Ajax request and LoadingPanel will not show this the expected behavior.
For the next issue on RadGrid, please try enabling ResizeGridOnColumnResize.
ASPX:
<
ClientSettings
Resizing-AllowColumnResize
=
"true"
>
<
Resizing
ResizeGridOnColumnResize
=
"true"
/>
</
ClientSettings
>
Thanks,
Princy
0
Kiran
Top achievements
Rank 1
answered on 27 Mar 2015, 10:17 PM
How can we remove the space or padding between the items in the radlistbox ?
0
Hello Kiran,
The spacing between items can be customized by setting different line-height by the "html .RadListBox .rlbItem" selector.
Regards,
Magdalena
Telerik
The spacing between items can be customized by setting different line-height by the "html .RadListBox .rlbItem" selector.
Regards,
Magdalena
Telerik
See What's Next in App Development. Register for TelerikNEXT.