Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
394 views
Hello all:

I followed the online documentation, but cannot get the RadTabStrip to correctly change the page when clicked. I used a RadTabStrip, Added a MultipageView, and then added page views but nothing changes when I click the tabs. The code is shown below. Note I am using CodeBehind files so need to have the Tab change action in the code behind.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!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>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
  <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
    </script>
</telerik:RadCodeBlock>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div style="z-index: 102; left: 0px; width: 800px; position: absolute; top: 0px; height: 1000px">
      <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" OnAjaxRequest="RadAjaxPanel1_AjaxRequest" Height="692px" Width="798px">
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0">
          <Tabs>
            <telerik:RadTab runat="server" Selected="True" Text="Store Information" PageViewID="RadPageView1">
            </telerik:RadTab>
            <telerik:RadTab runat="server" Text="General Information" PageViewID="RadPageView2">
            </telerik:RadTab>
            <telerik:RadTab runat="server" BackColor="#CCC0DA" Text="Fruits">
            </telerik:RadTab>
            <telerik:RadTab runat="server" BackColor="#C4BD97" Text="Nuts &amp; Ginseng">
            </telerik:RadTab>
            <telerik:RadTab runat="server" BackColor="#C4D79B" Text="Vegetables">
            </telerik:RadTab>
            <telerik:RadTab runat="server" BackColor="#B7DEE8" Text="Fish &amp; Shell Fish">
            </telerik:RadTab>
            <telerik:RadTab runat="server" BackColor="#E6B8B7" Text="Beef &amp; Veal">
            </telerik:RadTab>
          </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="RadMultiPage1" runat="server" Height="365px" SelectedIndex="0">
          <telerik:RadPageView ID="RadPageView1" runat="server" Height="360px" Width="787px">
            <asp:Label ID="Label1" runat="server" Font-Bold="True" Text="Store Information"></asp:Label>
            <asp:Label ID="Label2" runat="server" Font-Bold="True" Text="Store Name:"></asp:Label><asp:TextBox ID="txtStoreName" runat="server"></asp:TextBox>
            <asp:Label ID="Label3" runat="server" Font-Bold="True" Text="Store ID Number:"></asp:Label><asp:TextBox ID="txtStoreID" runat="server"></asp:TextBox>
            <asp:Label ID="Label4" runat="server" Font-Bold="True" Text="Corporate Name:"></asp:Label><asp:TextBox ID="txtCorpName" runat="server"></asp:TextBox>
            <asp:Label ID="Label5" runat="server" Font-Bold="True" Text="Store Address:"></asp:Label><asp:TextBox ID="txtAddress1" runat="server"></asp:TextBox>
            <asp:Label ID="Label6" runat="server" Font-Bold="True" Text="City, State, Zip:"></asp:Label><asp:TextBox ID="txtCityStateZip" runat="server"></asp:TextBox>
            <asp:Label ID="Label7" runat="server" Font-Bold="True" Text="Store Phone Number:"></asp:Label><asp:TextBox ID="txtStorePhone" runat="server"></asp:TextBox>
            <asp:Label ID="Label8" runat="server" Font-Bold="True" Text="PACA License #:"></asp:Label><asp:TextBox ID="txtPACA" runat="server"></asp:TextBox>
          </telerik:RadPageView>
          <telerik:RadPageView ID="RadPageView2" runat="server" Height="360px" Width="787px">
          </telerik:RadPageView>
        </telerik:RadMultiPage>
        <asp:TextBox ID="txtDebug" runat="server" style="z-index: 102; left: 6px; width: 400px; position: absolute; top: 548px; height: 400px" TextMode="MultiLine"></asp:TextBox>
            

      </telerik:RadAjaxPanel>


    </div>
    </form>
</body>
</html>

Plamen
Telerik team
 answered on 24 Dec 2014
5 answers
119 views
It's a pity that the GridTemplateColumn doesn't support standard filter editors based on either the DataType or DateField data type (e.g., a DateTime data type is rendered as though it was a GridDateTimeColumn filter editor).  This seems like an easy implementation if <FilterTemplate> is not included but filtering is turned on.  Or another idea would be an alternative to <FilterTemplate> that would turn on the standard filter editor and let you set attributes on that.  I really want the filter button without all the extra work.

But maybe this is a quick way around it?  This is the column in the grid:

<telerik:GridTemplateColumn HeaderText="Expires On" DataType="System.DateTime" Visible="true" ShowFilterIcon="true" ShowSortIcon="true" UniqueName="dpExpDate" DataField="EXPIRATION_DATE" AllowFiltering="true" SortExpression="EXPIRATION_DATE" AllowSorting="true" FilterListOptions="VaryByDataType" >
    <HeaderStyle Width="240px" />
    <ItemStyle Width="240px" />
    <ItemTemplate>
        <asp:Label runat="server" ID="lblExpDate" />
    </ItemTemplate>
    <EditItemTemplate>
        <telerik:RadDateTimePicker runat="server" ID="dpExpDate" Skin="Office2010Blue" Width="220px">
            <DateInput Display="true" DisplayDateFormat="G" DateFormat="G" runat="server" Font-Size="13px" Font-Name="Arial" />
            <TimePopupButton Visible="false" />
        </telerik:RadDateTimePicker><asp:Label runat="server" ID="lblInsertIn" Text="In" />
        <telerik:RadDropDownList runat="server" ID="ddlInsertHours" Font-Names="Arial" Font-Size="13px" Width="80px" Skin="Office2010Blue" />
        <asp:Label runat="server" ID="lblInsertHours" Text="Hours" />
    </EditItemTemplate>
</telerik:GridTemplateColumn>

And here's what I did in grid_ItemCreated:

if (e.Item is GridFilteringItem)
{
    GridFilteringItem item = e.Item as GridFilteringItem;
    if (item["dpExpDate"].Controls[0] is TextBox)
    {
        DateTime value = DateTime.MinValue;
        DateTime.TryParse(gridBatches.MasterTableView.GetColumn("dpExpDate").CurrentFilterValue, out value);
 
        RadDateTimePicker pick = new RadDateTimePicker();
        pick.Width = Unit.Pixel(200);
        pick.DateInput.DateFormat = "G";
        pick.DateInput.DisplayDateFormat = "G";
        pick.TimePopupButton.Visible = false;
        pick.DateInput.Width = Unit.Pixel(180);
        pick.Skin = "Office2010Blue";
        pick.DateInput.Font.Size = FontUnit.Parse("13px");
        pick.DateInput.Font.Name = "Arial";
        if (!value.Equals(DateTime.MinValue)) pick.DbSelectedDate = value;
 
        item["dpExpDate"].Controls.RemoveAt(0);
        item["dpExpDate"].Controls.AddAt(0, pick);
    }
}

Any reason I can't do that?  It seems to filter perfectly and appears to fit in with the Telerik examples that just assume there's always TextBox in Controls[0] anyway.

Feedback?
Kostadin
Telerik team
 answered on 24 Dec 2014
1 answer
84 views
I currently have 3 listboxes - Each one contains a "CustomAttr" attribute.

Listbox1.items["CustomAttr"] = 1
Listbox2.items["CustomAttr"] = 2
Listbox3.items["CustomAttr"] = 3

Destination Listbox = DestinationListBox

So when I drag an item from Listbox 1 to DestinationListBox, the item in DestinationListBox will still maintain ["CustomAttr"] = 1 (I believe)

In the OnClientTransferring client event, is it possible to get a count of items in DestinationListBox by attribute? 

The reason I ask is I want to be able to add only 5 items of ["CustomAttr"]  = 1, and ensure that if that is the case from OnClientTransferring, I can cancel the event using args.set_cancel(true);


If anyone has a better way of carrying out this type of function, I would really appreciate the assistance..

Many thanks,
Laurence
Bozhidar
Telerik team
 answered on 24 Dec 2014
1 answer
159 views
Hi:

Just struggling tog et a very simple RadTabStrip POC working, am now getting an error:

Control 'ScriptManager1' of type 'ScriptManager' must be placed inside a form tag with runat=server.

However when I look at the code (pasted below) it seems to me the Scriptmanager tag is very clearly inside the form tag with the runat=server tag. Can anyone offer any suggestions?

John.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!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">

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div style="z-index: 102; left: 0px; width: 800px; position: absolute; top: 0px; height: 1000px">
      <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="692px" Width="798px">
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0">
          <Tabs>
            <telerik:RadTab runat="server" Selected="True" Text="Store Information" PageViewID="RadPageView1">
            </telerik:RadTab>
            <telerik:RadTab runat="server" Text="General Information" PageViewID="RadPageView2">
            </telerik:RadTab>
            <telerik:RadTab runat="server" BackColor="#CCC0DA" Text="Fruits">
            </telerik:RadTab>
            <telerik:RadTab runat="server" BackColor="#C4BD97" Text="Nuts &amp; Ginseng">
            </telerik:RadTab>
            <telerik:RadTab runat="server" BackColor="#C4D79B" Text="Vegetables">
            </telerik:RadTab>
            <telerik:RadTab runat="server" BackColor="#B7DEE8" Text="Fish &amp; Shell Fish">
            </telerik:RadTab>
            <telerik:RadTab runat="server" BackColor="#E6B8B7" Text="Beef &amp; Veal">
            </telerik:RadTab>
          </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="RadMultiPage1" runat="server" Height="365px" SelectedIndex="0">
          <telerik:RadPageView ID="RadPageView1" runat="server" Height="360px" Width="787px">
            <asp:Label ID="Label1" runat="server" Font-Bold="True" Text="Store Information"></asp:Label>
            <asp:Label ID="Label2" runat="server" Font-Bold="True" Text="Store Name:"></asp:Label><asp:TextBox ID="txtStoreName" runat="server"></asp:TextBox>
            <asp:Label ID="Label3" runat="server" Font-Bold="True" Text="Store ID Number:"></asp:Label><asp:TextBox ID="txtStoreID" runat="server"></asp:TextBox>
            <asp:Label ID="Label4" runat="server" Font-Bold="True" Text="Corporate Name:"></asp:Label><asp:TextBox ID="txtCorpName" runat="server"></asp:TextBox>
            <asp:Label ID="Label5" runat="server" Font-Bold="True" Text="Store Address:"></asp:Label><asp:TextBox ID="txtAddress1" runat="server"></asp:TextBox>
            <asp:Label ID="Label6" runat="server" Font-Bold="True" Text="City, State, Zip:"></asp:Label><asp:TextBox ID="txtCityStateZip" runat="server"></asp:TextBox>
            <asp:Label ID="Label7" runat="server" Font-Bold="True" Text="Store Phone Number:"></asp:Label><asp:TextBox ID="txtStorePhone" runat="server"></asp:TextBox>
            <asp:Label ID="Label8" runat="server" Font-Bold="True" Text="PACA License #:"></asp:Label><asp:TextBox ID="txtPACA" runat="server"></asp:TextBox>
          </telerik:RadPageView>
          <telerik:RadPageView ID="RadPageView2" runat="server" Height="360px" Width="787px">
          </telerik:RadPageView>
        </telerik:RadMultiPage>      
      </telerik:RadAjaxPanel>


    </div>
    </form>
</body>
</html>
Hristo Valyavicharski
Telerik team
 answered on 24 Dec 2014
5 answers
116 views
Not sure where to post this but I'm having a simple question please.

I'm using a RadMultiPage control with a few RadPageViews. Inside one of the pages, I would like to have a footer section at the bottom of the page. On the telerik help pages, it says header and footers are possible but I don't see the tag for it.

Here is an example of what I've got:

<telerik:RadMultiPage ID="RadMultiPage1" SelectedIndex="0" runat="server" >

<telerik:RadPageView ID="RadTabDetails" runat="server">
// some code here

// I want a footer here:
<footer> ... </footer>

</telerik:RadPageView>

...

 

 

 

 

 

 

 

 

="server">

<telerik:RadMultiPage ID="RadMultiPage1" SelectedIndex="0" runat="server" BorderStyle="Solid" BorderWidth="1" Width="800px" Height="600px">

<telerik:RadPageView ID="RadTabDetails" runat="server">

 

 

 

Ben
Top achievements
Rank 1
 answered on 23 Dec 2014
3 answers
533 views
I have the following scenario: 

<%-- UF --%>
    <tr>
        <td>
            <label>UF</label>
            <br />
            <telerik:RadComboBox ID="rcbUF" runat="server" CheckBoxes="True" EnableCheckAllItemsCheckBox="True" CausesValidation="false"
                Culture="pt-BR" CssClass="lt-width-10" MaxHeight="250" OnItemChecked="rcbUF_ItemChecked" AutoPostBack="true">
            </telerik:RadComboBox>
        </td>
    </tr>
    <%-- Rodovia --%>
        <tr>
            <td>
                <label>Rodovia</label>
                <br />
                <asp:UpdatePanel runat="server" ID="uppRodovia">
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="rcbUF" />
                    </Triggers>
                    <ContentTemplate>
                        <telerik:RadComboBox ID="rcbRodovia" runat="server" CheckBoxes="True" EnableCheckAllItemsCheckBox="True" Culture="pt-BR" MaxHeight="250" CssClass="lt-width-10" />
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>


When an item is checked on rcbUF, the following method is called (something like that):

protected void rcbUF_ItemChecked(object sender, RadComboBoxItemEventArgs e)
    {
    if (rcbUF.HasSelectedValue())
    {
        var _listaUF = rcbUF.Items.Where(x => x.Checked).Select(x => x.Value).ToList();
        var _rodovias = Repositorio<Rodovia>.GetAll.Where(x => x.ListaUF.Any(y=>_listaUF.Contains(y.UF.Id))).Select(x => x.Id).ToArray();
         
        if (_listaUF.Count > 0)
        {
            rcbRodovia.Carregar<Rodovia>(x => x.Numero, x => x.Id,
                Constantes.TextoVazioEspaco,
                true,
                x => _rodovias.Contains(x.Id),
                x => x.Numero);
        }
        else
        {
            rcbRodovia.Carregar<Rodovia>(x => x.Numero, x => x.Id,
                Constantes.TextoVazioEspaco,
                true,
                x => x.Numero);
        }
         
        rcbRodovia.Items.Distinct();
        rcbRodovia.Enabled = true;
    }
    }

My problem is that everytime I click on the item instead of the checkbox, it triggers a postback (much on the OnItemSelected way), and I really don't want it to occur.

Later I tried setting the rcbUF OnClientSelectedIndexChanging event to trigger this function:

function OnClientSelectedIndexChanging(sender, args)
{
    args.set_cancel(true);
}

But the event never fires, like it does fire the codebehind event but not the client-side one.

Boyan Dimitrov
Telerik team
 answered on 23 Dec 2014
1 answer
47 views
I have several different pageviews within a multipage control that is within a tabstrip. My first tab/pageview contains fields that the each of the following pageviews needs access to. This is a multi-step, complex form that is not saved until the last step so I need to know what the values of the fields are currently on the unsaved form instead of say pulling them from a database.

I can find no way to access the field values before the form is submitted. I cannot read the values client-side (using jQuery) for tabs/pageviews that are not active as the fields are not in the DOM.  I cannot get any data from the viewstate as it is encrypted no matter what my web.config says to the contrary.  I can get data from Request.Form, but only for the fields that are on the tab that immediately precedes the current one, not from the whole form.

Is there some shadow copy of the DOM that is persisting the data across page loads? Or, better yet, some way to access the current form field values sever-side when the page reloads? 
 
I cannot be the first person to encounter this issue....
Hristo Valyavicharski
Telerik team
 answered on 23 Dec 2014
2 answers
313 views
Hi,

i am populating dropdownlists in a grid and want to export in excel as it is with data. how can i do this.
please help

With Regards,

Faisal
Gangyada
Top achievements
Rank 1
 answered on 23 Dec 2014
1 answer
183 views
Hello,
         I used the Rad Scheduler For selection of Etc Date in calendar. Example - If "Phase Start Date" is 2014-11-28 and "Phase End Date" is 2014-12-04 in "Development" then in Calender should show the Selection (11/28) to (12/04). But In my application, show the selection 1 day less in calendar. Means selection show (11/28) to (12/03) in Calender, It is wrong. But My database is correct. Its get correct data  like Phase_Start_Date = 2014-11-28 12:00:00.000 and Phase_End_Date = 2014-12-04 12:00:00.000.
         So I don't know why its show the 1 less day selection in calendar. Attach the screen shot of Database and Application. Please see it.

I using Rad Scheduler coding like-

 <telerik:RadScheduler runat="server" ID="rscCalender" GroupBy="ProjectID" GroupingDirection="Vertical" 
            AppointmentStyleMode="Default" DataSourceID="EventsDataSource" DataKeyField="ProjectID" Width=" "  CssClass="rshcCalender"
            DataSubjectField="Stage" FirstDayOfWeek="Monday" LastDayOfWeek="Friday"  ShowFullTime="false" 
            DataStartField="Phase_Start_Date" DataEndField="Phase_End_Date" ShowAllDayRow="true" WeekView-ShowAllDayInsertArea="false" WeekView-ShowHoursColumn="false" WeekView-DayStartTime="9:00:00" WeekView-DayEndTime="9:00:00" 
            SelectedView="WeekView" thView-ReadOnly="true" DayView-ReadOnly="true" TimelineView-ReadOnly="true" TimelineView-UserSelectable="false"
            OnResourceHeaderCreated="rscCalender_ResourceHeaderCreated" AllowDelete="false" AllowEdit="false" AllowInsert="false" OverflowBehavior="Scroll">

            <WeekView ColumnHeaderDateFormat="ddd(M/d)"  HeaderDateFormat="MM/dd" />
      
            <AdvancedForm Modal="false"></AdvancedForm>
           
            <ResourceHeaderTemplate >
                <asp:Panel ID="ResourceImageWrapper" runat="server">               
                    <asp:LinkButton ID="lnkProjectName" runat="server" ></asp:LinkButton>
                </asp:Panel>
            </ResourceHeaderTemplate>
            <ResourceTypes>
                <telerik:ResourceType KeyField="ProjectIDs" Name="ProjectID" TextField="ProjectName" ForeignKeyField="ProjectIDs"
                 DataSourceID="ProjectSource"  ></telerik:ResourceType>
            </ResourceTypes>
          <DayView  UserSelectable="false"/>
    <MonthView  UserSelectable="false"/>
    <TimelineView  UserSelectable="false"/>
        </telerik:RadScheduler>

         <asp:ObjectDataSource ID="EventsDataSource" runat="server" SelectMethod="GetETCDates" TypeName="ProjectTrakObjects.DO_GetData">
               <SelectParameters>
                <asp:Parameter Name="ProjectID"   Type="Int32" DefaultValue="0" />
            </SelectParameters>
                </asp:ObjectDataSource>
           <asp:ObjectDataSource ID="ProjectSource" runat="server" SelectMethod="GetCalanderProjects" TypeName="ProjectTrakObjects.DO_GetData">
               <SelectParameters>
                <asp:Parameter Name="ProjectID"   Type="Int32" DefaultValue="0" />
            </SelectParameters>
                </asp:ObjectDataSource>
Boyan Dimitrov
Telerik team
 answered on 23 Dec 2014
8 answers
97 views
I'm using the file explorer with the demonstration CustomFileSystem provider. I have only one root folder and this always displays correctly.

When clicking on a sub folder, file explorer will quite often display its busy overlay and fail to update to display the new folder and the busy overlay remains.  The only way to resolve this is to reset the service / close the browser start a new session.

I'm using IE11 but can see the same behaviour in Chrome.

As far as I can tell the CustomFileSystem provider is returning lists of folders and files when the click happens.

Any ideas what may be causing this or what else I can check?

TIA

Nic


Nic
Top achievements
Rank 1
 answered on 23 Dec 2014
Narrow your results
Selected tags
Tags
+124 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
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
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?