Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
117 views
Hi everybody,

I've a problem with a slider control, the problem is the next:

When i initialize the Slider control with the code below, it's good bound but when i do postback on my page, the slider change the positions and values' RadSliderItems, Example:

|  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  | -> item selected = 1 week.SelectedItem.Value  = 1

i do post back (Change value item 1 = 2, why? i don't know)

|  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  | -> item selected = 1 week.SelectedItem.Value = 2

i do post back (Change position all items and change value item 2, why? i don't know)

|  2  |  3  |  4  |  5  |  6  |  7  |  8  | 1 | -> item selected = 2 week.SelectedItem.Value = 3

So, i'm not never sure about values' items and the position change...

Thanks....

Code ASP:

<telerik:RadSlider ID="week" runat="server" AnimationDuration="400" 
       Height="70px" ItemType="item" Width="350px" > 
</telerik:RadSlider> 


Code CS:

   protected void Page_Load(object sender, EventArgs e) 
    { 
        if (!IsPostBack) 
        { 
            initialize_week();    
        } 
    }     
 
 
    public void initialize_week() 
    { 
        for (int i = 7; i >= 0; i--) 
        { 
            String value = 
                    DateTime.Now.AddDays((-7) * i).ToString(); 
            RadSliderItem item = new RadSliderItem( 
                DateTimeTreatment.GetWeekNumber( 
                    DateTime.Now.AddDays((-7) * i)).ToString(),value); 
             
 
            week.Items.Add(item); 
            week.DataBind(); 
        } 
    } 
Daniel Botero Correa
Top achievements
Rank 1
 answered on 22 Dec 2009
2 answers
90 views

Hello,
I was testing the difference between a scheduler populated server side and another one populated with a Web Service and was surprised to note a difference on the appointments rendering.

 

Both Schedulers display same appointments and are configured to show 30 minutes per row.

 

I did a screen shot to show you these weird differences.

It seems the server appointments rendering engine is not exactly the same than the client-side one.

Is it a bug?

 

By the way, if we take ‘Appointment n°3’ EndDate as example, neither the server nor the client rendering represents correctly the appointment.

The End Time is 20:35:00.

In the web service rendering it shows something like ~20:15:00, and in the server rendering 21:00:00 whereas (I can imagine) it should be rendered as 20:30:00.

Mike Taylor
Top achievements
Rank 1
 answered on 22 Dec 2009
2 answers
90 views
hi

How do i export to PDF with AlternatingItemStyle background Color?

here is my code and i m stuck here. Thanks

 

If TypeOf e.Item Is GridDataItem Then

 

 

Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)

 

 

For Each cell As TableCell In item.Cells

 

cell.Style(

"text-align") = "left"

 

cell.Style(

"font-size") = "10pt"

 

item.BackColor = RadGrid1.MasterTableView.AlternatingItemStyle.BackColor

 

Next

 

 

End If

 

Daniel
Telerik team
 answered on 22 Dec 2009
3 answers
128 views
I know this gets asked a lot, but I am having the problem where with UseStaticHeaders="true" and AllowScrolling="true" the headers don't line up with the detail columns.

The odd thing is the same control, using the same skin and pretty much the same settings works on another page without a problem.  The main difference is that the page that works allows sorting, but even setting this on the problem page doesn't fix the issue.

When I look at the col width (in the colgroup) and the clientWidth of each cell, in the header the clientWidths are 8 pixels more than the col width, which makes sense because there is left and padding of 4px in the skin (it's a custom skin).

But in the details cells the clientWidth is actually one less than the col width, however according to the CSS there should be left and right padding of 4px on these cells as well.  How can you have negative padding?  In IE Developer Toolbar the css settings appear the same for the header and details cells, but the clientWidth is less for the detail cells.

There is no explicit width set on either grid, and all columns have explicit HeaderStyle-Widths set in pixels, not percentages.  TableLayout="Fixed".  If I shrink some of the cell widths the details columns shrink and there is white space on the right hand side, however the header still fills the available width, even though there are no width='100%' settings on the grid or any of the parent elements.  Setting an explicit width for the grid itself changes the width of the grid, but doesn't do anything to make the columns line up.

Both pages have exactly the same .css files included and no inline style that would override anything, I can't find any reason for the difference.

Anyone have any ideas about something else I can check?

Dimo
Telerik team
 answered on 22 Dec 2009
1 answer
169 views
Hi all,

I have a table with same height (100%) as the browser window. In this table I have two rows with dynamic heights, and in one of the rows I have a raddockzone, which i want to always having same height as the cell in which the dockzone is. Moreover I want all except one dock in the dockzone have static heights, and letting the last one automatically expand to fill out the left over space.

Anyone have any ideas what to do?

Merry Christmas to all of you!
Gido Geek
Top achievements
Rank 2
 answered on 22 Dec 2009
1 answer
83 views
Hi,

Just wondering if there is any way with which I can change the sliders with the icons of my choice?
With slider I mean the pointer of the slider, so that i can replace the default pointers with the image of my choice and then that replaced image should act as the pointer/pointers for the slider.

Ideas? :)
Martin
Telerik team
 answered on 22 Dec 2009
1 answer
368 views

I am using a RadMenu control along with some modal popups and the RadSpell control. The menu control always appears on top; the modal popups and RadSpell never overlay the menu.  I have tried using the Z-Index properties, and have had no luck. 

I am using VS 2008, IE7.  The version number of the my Telerik dll is: 2009.2.826.35. 

I was putting this into a Master Page/Content Page application. I then tried pulling it out into a simple, one page test application, and still cannot  get this to work.

Below is the ASPX page on my simple test application (no code-behind).  What am I doing wrong?

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MenuTest.aspx.cs" Inherits="Test.MenuTest" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
      
    <asp:ScriptManager ID="scriptManager" runat="server"></asp:ScriptManager> 
      
    <p>&nbsp;</p> 
    <p>Menu Test:</p> 
    <p>&nbsp;</p> 
      
    <telerik:RadMenu ID="rmnuNavigationMenu" runat="server" Skin="Default" Width="100%"   
        Enabled="True" ExpandDelay="0" CollapseDelay="100" CollapseAnimation-Duration="50" 
        EnableOverlay="false" style="z-index:0;">   
        <Items> 
            <telerik:RadMenuItem Text="Menu A"></telerik:RadMenuItem> 
            <telerik:RadMenuItem Text="Menu B"></telerik:RadMenuItem> 
        </Items> 
     </telerik:RadMenu>    
 
    <br /> 
    <br /> 
                
    <asp:Panel ID="pnlAdditionalNotesContent" runat="server" Height="335px" > 
        <div style="padding-left:20px; padding-top:20px; z-index:9000;">        
            <telerik:RadSpell ID="RadSpellAdditionalNotes" runat="server"   
                SupportedLanguages="en-US,English"    
                DictionaryPath="~/App_Data/RadSpell" 
                SpellCheckProvider="TelerikProvider"   
                ControlToCheck="txtAreaAdditionalNotes"                              
                ButtonType="ImageButton" 
                style="z-index:10000;" />   
            <br /> 
            <textarea id="txtAreaAdditionalNotes" runat="server"   
                style="width:96%; height:250px; font-family:Arial;" 
                rows="5" cols="50" tabindex="100"></textarea> 
            <br /> 
            <br />             
        </div> 
    </asp:Panel> 
      
 
      
    </div> 
    </form> 
</body> 
</html> 
 
Shinu
Top achievements
Rank 2
 answered on 22 Dec 2009
1 answer
123 views
Hello. I have the following issue, the data in the grid are displayed correctly but after the first refresh the page. How to make that data were displayed in the grid as soon as the page loads?

<%@ Page Language="VB" AutoEventWireup="true" CodeFile="raport_urlopy.aspx.vb" Inherits="raport_urlopy" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title>Intranet</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
      
    <div class="gora"><a href="default.aspx"><img src="gfx/intranet2.gif" alt="Intranet" border="0"></a> 
    </div> 
      
    <div class="menu">  
   <!-- #include file="inc-menu.aspx "-->      
        
    </div> 
      
    <div class="srodek">  
      
     
    <asp:ScriptManager ID="ScriptManager1" runat="server">  
    </asp:ScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        </telerik:RadAjaxManager> 
      
       <div style="text-align:left">  
       <div class="pasek">Raport o urlopach</div> 
       <table border="0">  
       <tr> 
       <td align="right" valign="middle">Rok:</td><td align="left" valign="middle">  
         
         <asp:DropDownList ID="ddl_rok" runat="server" DataSourceID="sql_rok"   
                            DataTextField="kp_rok" DataValueField="kp_rok" Width="258px" AutoPostBack="True">  
         </asp:DropDownList> 
         
       </td> 
       </tr> 
         
       <tr> 
       <td align="right" valign="middle">DziaÅ‚:</td><td align="left" valign="middle">  
                        <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="sql_dzial"   
                            DataTextField="nazdz" DataValueField="id" Width="258px" AutoPostBack="True"></asp:DropDownList></td>  
       </tr> 
                
       </table> 
         
    </div> 
         
            <asp:TextBox ID="txt_idp" runat="server" Visible="False"></asp:TextBox> 
         
        <br />      
       
        <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="sql_urlopy_glowne"   
            GridLines="None" AllowSorting="True" ShowGroupPanel="True" Skin="Hay" allow> 
        
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="idp" DataSourceID="sql_urlopy_glowne">  
                <DetailTables> 
                    <telerik:GridTableView AutoGenerateColumns="false" DataKeyNames="idp" DataSourceID="sql_urlopy_pomoc" Width="100%" runat="server">  
                                            
                        <ParentTableRelation> 
                            <telerik:GridRelationFields DetailKeyField="idp" MasterKeyField="idp" /> 
                        </ParentTableRelation> 
                        <Columns> 
                            <telerik:GridBoundColumn SortExpression="opis" HeaderText="Typ" DataField="opis" UniqueName="opis">  
                            </telerik:GridBoundColumn> 
                              
                             <telerik:GridBoundColumn SortExpression="pdn" HeaderText="Od" DataField="pdn" UniqueName="pdn"  DataFormatString="{0:dd-MM-yyyy}">  
                            </telerik:GridBoundColumn> 
                              
                              <telerik:GridBoundColumn SortExpression="odn" HeaderText="Do" DataField="odn" UniqueName="odn"  DataFormatString="{0:dd-MM-yyyy}">  
                            </telerik:GridBoundColumn> 
                        </Columns> 
                                     
                    </telerik:GridTableView> 
                </DetailTables> 
 
<ExpandCollapseColumn Visible="True"></ExpandCollapseColumn> 
 
                <Columns> 
                    <telerik:GridBoundColumn DataField="idp" DataType="System.Int32" HeaderText="idp" 
                        ReadOnly="True" SortExpression="idp" UniqueName="idp" Visible="false">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="naz" HeaderText="Nazwisko" SortExpression="naz" UniqueName="naz">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="IL_UrlopWymiar" DataType="System.Int16" HeaderText="Wymiar" 
                        SortExpression="IL_UrlopWymiar" UniqueName="IL_UrlopWymiar">  
                    </telerik:GridBoundColumn> 
                     
                    <telerik:GridBoundColumn DataField="KD_IL_UrlopPrzysl" DataType="System.Int16" HeaderText="PrzysÅ‚ugujÄ…cy" 
                        SortExpression="KD_IL_UrlopPrzysl" UniqueName="KD_IL_UrlopPrzysl">  
                    </telerik:GridBoundColumn> 
                      
                     <telerik:GridBoundColumn DataField="IL_UrlopDoWyk" DataType="System.Int16" HeaderText="PozostaÅ‚y" 
                        SortExpression="IL_UrlopDoWyk" UniqueName="IL_UrlopDoWyk">  
                    </telerik:GridBoundColumn> 
                </Columns> 
            </MasterTableView> 
            <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True"   
                ReorderColumnsOnClient="True">  
                <Selecting AllowRowSelect="True" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
                            
        <br /><br /><br /> 
                     
    </div> 
      
      
    <asp:SqlDataSource ID="sql_dzial" runat="server"   
        ConnectionString="<%$ ConnectionStrings:Polaczenie-Portal %>"   
        SelectCommand="proc_wczytaj_dzialy" SelectCommandType="StoredProcedure">  
     
       <SelectParameters> 
       
           <asp:FormParameter DefaultValue="122" FormField="txt_idp" Name="idpracownika"   
               Type="Int32" /> 
       
       
       </SelectParameters>        
              
     </asp:SqlDataSource> 
     
    <asp:SqlDataSource ID="sql_urlopy_glowne" runat="server"   
        ConnectionString="<%$ ConnectionStrings:Polaczenie-Portal %>"   
        SelectCommand="proc_pokaz_ilosc_urlopow_w_dziale"   
        SelectCommandType="StoredProcedure">  
          
        <SelectParameters> 
        
            <asp:ControlParameter ControlID="DropDownList1" Name="id_dzial"   
                PropertyName="SelectedValue" Type="Int32" /> 
          
             <asp:ControlParameter ControlID="ddl_rok" Name="rok"   
                PropertyName="SelectedValue" Type="Int32" />    
          
            <asp:SessionParameter Name="idpracownika" SessionField="idpracownika" Type="string" />                                        
          
        </SelectParameters> 
          
    </asp:SqlDataSource> 
   
    <asp:SqlDataSource ID="sql_urlopy_pomoc" ConnectionString="<%$ ConnectionStrings:Polaczenie-Portal %>" 
        ProviderName="System.Data.SqlClient" SelectCommand="select pracownik as idp, opis, pdn, odn from poza_biurem join urlopy on poza_biurem.id = urlopy.id_poza_biurem where pracownik = @idp and aktywny=1" 
        runat="server">  
        <SelectParameters> 
            <asp:SessionParameter Name="idp" SessionField="idp" Type="string" /> 
        </SelectParameters> 
        </asp:SqlDataSource> 
          
        <asp:SqlDataSource ID="sql_rok" ConnectionString="<%$ ConnectionStrings:Polaczenie-Portal %>" 
            ProviderName="System.Data.SqlClient" SelectCommand="select distinct kp_rok from kd_urlopy2" SelectCommandType="Text" 
            runat="server"></asp:SqlDataSource> 
     
      
    </form> 
</body> 
</html> 
 
Radoslav
Telerik team
 answered on 22 Dec 2009
5 answers
250 views
Hello,

I have a RadListBox on a page where a modal RadWindow is displayed. By declaring the RadWindow in the page, the RadListBox breaks. It lists all of its content as a bulleted list and not as a ListBox. I also have RadMenus on the page that show through the RadWindow when it is opened. If I remove the RadWindow declaration, the page works fine.

Any ideas on how to fix this so the RadWindow works correctly without breaking the RadListBox?

Thanks,

Steve


 
Georgi Tunev
Telerik team
 answered on 22 Dec 2009
1 answer
132 views

Using Version=2009.1.311.35
On an empty RadGrid, in insert mode, the <DateInput> of the Date Picker inside a grid template column, shows with no width (See attached image).

Here's my code:
  <telerik:GridTemplateColumn HeaderText="Start Date" HeaderStyle-Width="130px" SortExpression="StartDate" UniqueName="StartDate">  
                                    <EditItemTemplate> 
                                        <telerik:RadDatePicker ID="RadDatePickerStartDate" runat="server" Culture="English (United States)" 
                                        MinDate='<%# GetVideoStartDate(Eval("StartDate")) %>' MaxDate='<%# GetVideoEndDate() %>' 
                                            DbSelectedDate='<%# Bind("StartDate", "{0:d}") %>' SharedCalendarID="">  
                                            <DateInput ID="DateInputStartDate" runat="server" Width="130px" /> 
                                        </telerik:RadDatePicker> 
                                    </EditItemTemplate> 
                                    <ItemTemplate> 
                                        <asp:Label ID="dtLabelStartDate" runat="server" Text='<%# Eval("StartDate", "{0:d}") %>' 
                                            Width="130px" /> 
                                    </ItemTemplate> 
                                </telerik:GridTemplateColumn> 
 

Thanks,
Rob
Dimo
Telerik team
 answered on 22 Dec 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?