Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
168 views
Upon client side binding of a radgrid, the button images do not display if the AllowFilteringByColumn property is set to false.  The images do display using the exact same code, if the AllowFilteringByColumn property is set to true.

button images will display on this grid...
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SimpleGrid.ascx.cs" Inherits="UserControls_SimpleGrid" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<script language="javascript" type="text/javascript" src="SimpleGridJs.js">
<!--    //
//--></script>
 
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="true" AutoGenerateColumns="False">
      <MasterTableView ClientDataKeyNames="makecode, make">
        <Columns>
              <telerik:GridBoundColumn DataField="makeid" HeaderText="makeid">
              </telerik:GridBoundColumn>
              <telerik:GridBoundColumn DataField="makecode" HeaderText="makecode">
              </telerik:GridBoundColumn>
              <telerik:GridBoundColumn  DataField="make" HeaderText="make">
              </telerik:GridBoundColumn>
              <telerik:GridButtonColumn ButtonType="ImageButton"ImageUrl="images/technote1.gif">
              </telerik:GridButtonColumn>
        </Columns>
      </MasterTableView>
      <ClientSettings>
        <DataBinding Location="SimpleService.asmx" SelectMethod="GetDataAndCount" />
      </ClientSettings>
</telerik:RadGrid>

...but if the AllowFilteringByColumn is changed to "false", there are no button images.  There are a couple radgrids in my project that don't need to have the filter functionality, and don't have the space to waste on an unneeded FilterMenu row.  Am I doing something wrong, or is there a work around?
Maria Ilieva
Telerik team
 answered on 14 Apr 2011
1 answer
51 views

Hello,

when i am using  below weekend recurrence rule with repeatingInterval = 1
why it is showing other days events in current day slot.

DTSTART:20110411T043000Z
DTEND:20110411T053000Z
RRULE:FREQ=WEEKLY;COUNT=3;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR

please check the attachment for your knowledge what i am getting exactly.

please help me in this then it will be great for me.

Regards
Shashi

Peter
Telerik team
 answered on 14 Apr 2011
1 answer
91 views
Controls
I have multiple RadGrid controls on a page, each grid with an ItemDatabound event. All columns are set to be sortable except for the gridTemplateColumns

Database
Each grid has their own EntityDataSource, with a single parameter set to point at a hidden control which is set at the page load.

ItemDatabound Event
The grids have GridTemplateColumns with placeholder controls of which get populated with text or images.

Problem
Clicking the header of a column (to sort by that column) will sort the grid, but the other grid loses the data in the template columns. If you click the header of a sortable column in the grid that lost it's data, the grid will return to normal and the prior grid will now lose data in it's GridTemplateColumns. This problem isn't limited to sorting, the second grid on the page has multiple pages of data, switching to another page will also cause this problem as well.

This appears to occur whether using the RadAjaxPanel or not.

Is there supposed to be a way to link the controls together so that they are aware of each other? This is quite a simple setup, the SQL or even the filter being set by the hidden control -- nothing is changing, and yet this odd behavior occurs.
Maria Ilieva
Telerik team
 answered on 14 Apr 2011
3 answers
299 views
Hi,
       I am binding data source to radGrid. By default its displaying rows in top to bottom flow.
I want to display data with column repeat direction = "horrizotal" .

Is that possible?

waiting for reply..
Mira
Telerik team
 answered on 14 Apr 2011
1 answer
143 views
We are using jQuery to place the focus on the first or last element of the page, however we are having some issues with Telerik controls.

The jQuery which we are using is the following:

$(function() {   $("#divId :input:not(:hidden):first").focus();});


When we try to place the focus on the textbox in RadDateTimePicker, it always sets the focus on the RadDateTimePicker itself. We would have to set the focus on the 2nd element of the page to have focus in the text box.

<telerik:RadDateTimePicker ID="DatePickerOdometerUpdateDate" runat="server" CssClass="edit" Skin="Default" <br>                MinDate="1800-01-01" meta:resourcekey="DatePickerResource" TabIndex="1" ToolTip="<%$ Resources:dtpDateCounters_ToolTip %>" onkeydown="return checkIfPrev(this, event);"><br>                    <DateInput runat="server" LabelCssClass="riLabel radLabelCss_Telerik" TabIndex="1" Skin="Default" ></DateInput><br>                    <Calendar runat="server" Skin="Default" ViewSelectorText="x" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False"></Calendar><br>                <DatePopupButton HoverImageUrl="" ImageUrl="" TabIndex="-1" /><br>                <TimePopupButton HoverImageUrl="" ImageUrl="" TabIndex="-1" /><br>                <TimeView CellSpacing="-1" runat="server"><br>                </TimeView><br>                </telerik:RadDateTimePicker>

When we try to place the focus a RadNumericTextBox and it is in the last position, it requires us to place the focus on the before last element.
<telerik:RadNumericTextBox ID="txtTotalHours" Skin="Default" runat="server" CssClass="edit" Width="65px" Height="13px" MaxLength="11" TabIndex="5" MinValue="-70368744177663" ToolTip="<%$ Resources:txtRunTime_ToolTip %>" onkeydown="return checkIfNext(this, event);"><br>                <NumberFormat DecimalDigits="1" /><br>            </telerik:RadNumericTextBox>    

Is there an easy way to by-pass these additional text boxes and set the focus on the elements easily.

Thanks.
Vasil
Telerik team
 answered on 14 Apr 2011
1 answer
66 views
I am trying to use the Splitter/Sliding Panel as a "Message Center" for errors in my master page.  I would like it at the BOTTOM of my Window.  Currently it shows up at the Bottom of My HTML...Can I get it so that it is ALWAYS at the Bottom of the Browser Window?  Here is my currently markup:

Thanks, much appreciated.

Mark

<telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Vertical" Skin="WebBlue" Width="100%" ><br>            <telerik:RadPane ID="RadPane1" runat="server"><br>                <telerik:RadSlidingZone ID="RadSlidingZone1" runat="server" SlideDirection="Top"><br>                    <telerik:RadSlidingPane ID="RadSlidingPane1" runat="server" Title="Message Center" Height="100" Scrolling="Y" BackColor="Red"><br>                        <asp:Label ID="lblErrorMessage" CssClass="textFields" runat="server" Text="Label"></asp:Label><br>                    </telerik:RadSlidingPane><br>                </telerik:RadSlidingZone><br>            </telerik:RadPane><br>        </telerik:RadSplitter>

See attached image for current placement.
Svetlina Anati
Telerik team
 answered on 14 Apr 2011
1 answer
58 views
Can anyone point me to where the MSI is for 2010.2.0924 (2010.2.0924.1040) version of telerik can be found? The engineers at my company have informed me that we have a "custom" version but cannot provide any more information. We currently have MSI installers for Telerik.Web.UI_2010_2_826_Dev.msi and Telerik.Web.UI_2010_2_713_Dev.msi, but not the version our software is on. Any help would be appreciated.

Brian
Sebastian
Telerik team
 answered on 14 Apr 2011
1 answer
59 views
When i define the client handler for calendar OnDateSelected event  i get strange action
as when i select date some dates after being set get change automatically to another date one or 2 days after the date i set

the code is as blow:
<telerik:RadDatePicker ID="calDOB" runat="server" Culture="en" MinDate="1900-01-01"
                Width="100%" TabIndex="5">
                <Calendar runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x">
                </Calendar>
                <DateInput runat="server" DisplayDateFormat="d/M/yyyy" DateFormat="d/M/yyyy" TabIndex="5">
                </DateInput>
                <DatePopupButton ImageUrl="" HoverImageUrl="" TabIndex="5"></DatePopupButton>
                <ClientEvents OnDateSelected="SelectedDateChanged" />
            </telerik:RadDatePicker>

function SelectedDateChanged(sender,args) {
 
          var PckrBirthDate = $find('<%=calDOB.ClientID %>');
          var LblYears = $find('<%= TxtYears.ClientID %>');
          var LblMonths = $find('<%= TxtMonths.ClientID %>');
          var LblDays = $find('<%= TxtDays.ClientID %>');
 
           
 
          var birthDate = PckrBirthDate.get_selectedDate();
 
          if (birthDate != null) {
              var calday = birthDate.getDate();            
              var calmon = birthDate.getMonth();
              var calyear = birthDate.getFullYear();
              getAge(calday, calmon, calyear, LblYears, LblMonths, LblDays); 
          }
          else {
              LblYears.set_value("");
              LblMonths.set_value("");
              LblDays.set_value("");
          }           
      }
function getAge(date, month, year, yearControl, monthControl, dayControl) {
 
    today = new Date();
    dateStr = today.getDate();
    monthStr = today.getMonth();
    yearStr = today.getFullYear();
 
    theYear = yearStr - year;
    theMonth = monthStr - month;
    theDate = dateStr - date;
 
    var days = "";
    if (monthStr == 0 || monthStr == 2 || monthStr == 4 || monthStr == 6 || monthStr == 7 || monthStr == 9 || monthStr == 11) days = 31;
    if (monthStr == 3 || monthStr == 5 || monthStr == 8 || monthStr == 10) days = 30;
    if (monthStr == 1) days = 28;
 
    yearControl.set_value(theYear);
 
    if (month < monthStr && date > dateStr) {
        yearControl.set_value(parseInt(yearControl.get_value()) + 1);
        monthControl.set_value(theMonth - 1);
    }
    if (month < monthStr && date <= dateStr) { monthControl.set_value(theMonth); }
    else if (month == monthStr && (date < dateStr || date == dateStr)) { monthControl.set_value(0); }
    else if (month == monthStr && date > dateStr) { monthControl.set_value(11); }
    else if (month > monthStr && date <= dateStr) {
        yearControl.set_value(yearControl.get_value()- 1);
        monthControl.set_value(((12 - -(theMonth))));
    }
    else if (month > monthStr && date > dateStr) { monthControl.set_value(((12 - -(theMonth)))); }
 
    if (date < dateStr) { dayControl.set_value(theDate); }
    else if (date == dateStr) { dayControl.set_value(0); }
    else { yearControl.set_value(yearControl.get_value() - 1); dayControl.set_value(days - (-(theDate))); }
}

Hope I can get solution to such a problem as soon as possible
Mira
Telerik team
 answered on 14 Apr 2011
1 answer
76 views
Hi Guys,
i,m new bee for telerik chart. i want to set YAxis2 scale range with 8 hours step for stacked bar value. i have tried. but its not giving correct result. please help me, its very very urgent.

 protected void EmployeesChart_BeforeLayout(object sender, EventArgs e)
        {
            foreach (LabelItem item in EmployeesChart.Legend.Items)
            {
                item.Marker.Appearance.Figure = Telerik.Charting.Styles.DefaultFigures.Rectangle;
                item.Marker.Appearance.Dimensions.Width = 25;
            }
           
            int mins = 0;
            int hours = 0;
            foreach (ChartAxisItem axisItem in EmployeesChart.PlotArea.YAxis2.Items)
            {
                axisItem.TextBlock.Text = string.Format("{0:0}", hours) + ":" + string.Format("{0:00}", mins);
                hours = hours + 8;
            }


        }

HTML:
<telerik:RadChart ID="EmployeesChart" runat="server" OnBeforeLayout="EmployeesChart_BeforeLayout"
        OnClick="EmployeesChart_Click" DefaultType="StackedBar" Width="750" SeriesOrientation="Horizontal"
        Style="margin-left: 100px">
        <ChartTitle TextBlock-Appearance-AutoTextWrap="Auto" TextBlock-Text="Week-to-Date Labor Hours by Employee">
            <Appearance Position-AlignedPosition="Top">
            </Appearance>
        </ChartTitle>
        <Series>
            <telerik:ChartSeries Name="Regular" Type="StackedBar">
                <Appearance>
                    <Border Visible="false" />
                    <FillStyle FillType="Solid" MainColor="79, 129, 189">
                    </FillStyle>
                    <LabelAppearance Position-AlignedPosition="Center" Distance="10" Visible="true">
                    </LabelAppearance>
                    <TextAppearance TextProperties-Color="Black">
                    </TextAppearance>
                    <Border Color="136, 166, 78" />
                </Appearance>
            </telerik:ChartSeries>
            <telerik:ChartSeries Name="Overtime" Type="StackedBar">
                <Appearance>
                    <Border Visible="false" />
                    <FillStyle FillType="Solid" MainColor="192, 80, 77">
                    </FillStyle>
                    <LabelAppearance Position-AlignedPosition="Center" Distance="10" Visible="False">
                    </LabelAppearance>
                    <TextAppearance TextProperties-Color="Black">
                    </TextAppearance>
                    <Border Color="136, 166, 78" />
                </Appearance>
            </telerik:ChartSeries>
            <telerik:ChartSeries Name="Projected" Type="StackedBar">
                <Appearance>
                    <Border Visible="false" />
                    <FillStyle FillType="Solid" MainColor="134,134, 134">
                    </FillStyle>
                    <LabelAppearance Position-AlignedPosition="Center" Visible="true">
                    </LabelAppearance>
                    <TextAppearance TextProperties-Color="Black">
                    </TextAppearance>
                    <Border Color="136, 166, 78" />
                </Appearance>
            </telerik:ChartSeries>
        </Series>
        <PlotArea>
            <XAxis VisibleValues="Positive" Visible="True">
                <AxisLabel Visible="true">
                    <TextBlock Text="Employees">
                    </TextBlock>
                    <Appearance Position-AlignedPosition="Center">
                    </Appearance>
                </AxisLabel>
                <Appearance>
                    <MajorGridLines Color="134, 134, 134" Width="0" />
                    <TextAppearance TextProperties-Color="Black">
                    </TextAppearance>
                </Appearance>
                <AxisLabel>
                    <Appearance RotationAngle="270">
                    </Appearance>
                    <TextBlock>
                        <Appearance TextProperties-Color="Black">
                        </Appearance>
                    </TextBlock>
                </AxisLabel>
            </XAxis>
            <YAxis2 VisibleValues="Positive" Visible="True">
                <AxisLabel Visible="true">
                    <TextBlock Text="Hours">
                        <Appearance TextProperties-Color="Black">
                        </Appearance>
                    </TextBlock>
                    <Appearance Position-AlignedPosition="Bottom">
                    </Appearance>
                </AxisLabel>
                <Appearance ValueFormat="ShortTime">
                    <MajorGridLines Color="134, 134, 134" Width="0" />
                    <TextAppearance TextProperties-Color="Black">
                    </TextAppearance>
                </Appearance>
                <AxisLabel>
                    <Appearance RotationAngle="0">
                    </Appearance>
                </AxisLabel>
            </YAxis2>
            <YAxis Visible="False" VisibleValues="All">
            </YAxis>
        </PlotArea>
    </telerik:RadChart>

Thanks
Ravi


Yavor
Telerik team
 answered on 14 Apr 2011
1 answer
155 views
Hello,

I have a gridview in which I inserted a GridTemplateColumn with a checkbox. The grid is loaded from your code and I can not set the checkbox value in the datatable.

Help
Best regards
Alessia
<telerik:RadGrid ID="G_Permessi" runat="server" AllowPaging="true" Width="100%" Height="100%"
    AutoGenerateColumns="false" GridLines="Both" PageSize="13" AllowSorting="true"
    AllowMultiRowSelection="true">
    <ClientSettings AllowKeyboardNavigation="true" ActiveRowIndex="0">
        <Scrolling AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders="True" />
        <Selecting AllowRowSelect="true" />
        <ClientEvents OnRowSelected="G_Permessi_OnRowSelected" />
    </ClientSettings>
    <AlternatingItemStyle BackColor="#C7E3E3" />
    <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" PagerTextFormat="{4} Numero record filtrati: {5}" />
    <MasterTableView runat="server" TableLayout="Fixed" DataKeyNames="IdPermesso" EditMode="InPlace">
        <Columns>
            <telerik:GridBoundColumn UniqueName="AttivoDB" DataField="Attivo" Display="false" />
            <telerik:GridBoundColumn UniqueName="IdPermesso" DataField="IdPermesso" Display="false" />
            <telerik:GridBoundColumn UniqueName="Modulo" DataField="Modulo" HeaderText="Modulo"
                meta:resourcekey="G_Permessi_Modulo">
                <HeaderStyle Width="100px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Permesso" DataField="Permesso" HeaderText="Permesso"
                meta:resourcekey="G_Permessi_Permesso">
                <HeaderStyle Width="100px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Descrizione" DataField="Descrizione" HeaderText="Descrizione"
                meta:resourcekey="G_Permessi_Descrizione">
                <HeaderStyle Width="100px" />
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn UniqueName="Attivo" DataField="Attivo" HeaderText="Attivo"
                meta:resourcekey="Grid_Attivo">
                <ItemTemplate>
                    <asp:CheckBox ID="Chk_Attivo" OnCheckedChanged="AssegnaPermesso" AutoPostBack="true"
                        runat="server" />
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
                <HeaderStyle HorizontalAlign="Center" Width="50px" />
            </telerik:GridTemplateColumn>
            
        </Columns>
    </MasterTableView>
</telerik:RadGrid>






Shinu
Top achievements
Rank 2
 answered on 14 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?