Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
142 views
I cannot figure out how to set the EnableRangeFiltering and EnableTimeIndependentFiltering properties in my code-behind when I create my columns. GridBoundColumn does not have these properties, and I cannot cast a GridBoundColumn to a GridDateTimeColumn, which does.
Jeanne
Top achievements
Rank 1
 answered on 19 Mar 2013
1 answer
97 views
Hi,

I have two issues

1) telerik Radwindow  not opened when I click on RadGrid's  "add new a row " image button. the below is the code

2) I gone through telerik sites but I couldn't apply stylesheets for radwinodw ( see code and also use the skin path)



<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="TelerikProject._Default" %>
  
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
  
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
     
   <div
    <link rel="stylesheet" type="text/css" href='<% =ResolveUrl("~/Styles/Telerik/Window.Web20.css") %>'
        media="screen, projection" />
  
        <link rel="stylesheet" type="text/css" href='<% =ResolveUrl("~/Styles/Telerik/Grid.Web20.css") %>'
        media="screen, projection" />
     
    </div>
       
       
     <style type="text/css">
   
       
   .RadWindow_web20 .rwWindowContent .radconfirm
    {       
        background-image: none !important;
    }
   .rwIcon  
    {  
        background-image: none !important;  
    }  
   .RadWindow_web20 .rwTitlebarControls 
   {
        font-weight:bold;
        font-size:8pt;
        white-space:nowrap;
        background-image: url('../images/bluebar2.png');
      
        color:#ffffff;
        height:25px;
    }
  
    </style>
                 
<telerik:RadScriptManager ID="radscriptmanager1" runat="server" 
  
</telerik:RadScriptManager>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" 
    EnableEmbeddedSkins="False" Skin="Web20" >
  
    <Windows>
             
  
       <telerik:RadWindow ID="rwGoogle" runat="server" Behavior="Default"
  
            Height="400px" InitialBehavior="None" NavigateUrl="http://www.google.com" 
  
            Title="Google Window" ToolTip="Google Window" Width="500px" 
  
            OpenerElementID="aGoogleWindow" Visible="true">
  
            <ContentTemplate>
  
                <h3>Automatic Window</h3>
  
                <p>This window is set to open automatically when the page is loaded, which is useful for setting reminders or messages. The content of the window
  
                    can be a separate page file that is loaded for display, or in this case a static content template defined in the window control itself.</p>
  
            </ContentTemplate>
  
        </telerik:RadWindow>
  
         
    </Windows>
  
</telerik:RadWindowManager>
  
  
    <telerik:RadGrid 
      
     EnableEmbeddedSkins="False" Skin="Web20" 
  
     AutoGenerateColumns="false" ID="RadGrid1" Width="760px" AllowSorting="true"
            PageSize="20" ShowFooter="True" AllowPaging="True" runat="server" GridLines="None">
            <PagerStyle Mode="NextPrevAndNumeric" />
            <GroupingSettings CaseSensitive="false" />
            <MasterTableView 
          
            AutoGenerateColumns="false" AllowFilteringByColumn="true" ShowFooter="True"
                TableLayout="Auto" 
              
                 CommandItemDisplay="Bottom" CommandItemSettings-ShowRefreshButton="False" 
                CommandItemSettings-ShowAddNewRecordButton="True" CommandItemSettings-AddNewRecordText="Add a Row" EnableColumnsViewState="true" EditMode="PopUp" >
                <NoRecordsTemplate>
                    <div style="color:Red">No items found.</div>
                </NoRecordsTemplate>
  
  
                <Columns>
                    <telerik:GridBoundColumn DataField="OrderID" HeaderText="OrderID" SortExpression="OrderID"
                        UniqueName="OrderID" FilterControlWidth="40px" CurrentFilterFunction="EqualTo"
                        FilterDelay="4000" ShowFilterIcon="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn FilterControlWidth="105px" DataField="ShipName" HeaderText="ShipName"
                        SortExpression="ShipName" UniqueName="ShipName" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                        ShowFilterIcon="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridDateTimeColumn FilterControlWidth="50px" DataField="OrderDate" HeaderText="OrderDate"
                        AllowFiltering="false" SortExpression="OrderDate" UniqueName="OrderDate" PickerType="None"
                        AllowSorting="false" DataFormatString="{0:d}">
                    </telerik:GridDateTimeColumn>
                    <telerik:GridDateTimeColumn FilterControlWidth="120px" DataField="ShippedDate" HeaderText="ShippedDate"
                        SortExpression="ShippedDate" UniqueName="ShippedDate" PickerType="DatePicker"
                        AllowSorting="false" AllowFiltering="false" DataFormatString="{0:D}">
                        <HeaderStyle Width="160px" />
                    </telerik:GridDateTimeColumn>
                    <telerik:GridBoundColumn FilterControlWidth="50px" DataField="ShipCountry" HeaderText="ShipCountry"
                        AutoPostBackOnFilter="true" SortExpression="ShipCountry" UniqueName="ShipCountry"
                        AllowFiltering="true" CurrentFilterFunction="StartsWith" ShowFilterIcon="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridMaskedColumn FilterControlWidth="50px" DataField="ShipPostalCode" HeaderText="ShipPostalCode"
                        SortExpression="ShipPostalCode" UniqueName="ShipPostalCode" Mask="#####" AllowFiltering="false"
                        AllowSorting="false">
                        <FooterStyle Font-Bold="true" />
                    </telerik:GridMaskedColumn>
                    <telerik:GridBoundColumn HeaderStyle-Width="90px" FilterControlWidth="50px" DataField="Freight"
                        DataType="System.Decimal" HeaderText="Freight" SortExpression="Freight" UniqueName="Freight">
                        <FooterStyle Font-Bold="true" />
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings>
                <Scrolling AllowScroll="false"  />
                <Selecting AllowRowSelect="True" />
                <ClientEvents OnCommand="OnCommand" />
            </ClientSettings>
  
    </telerik:RadGrid>
  
     
  
</asp:Content>


Thank You
Bala
Pavlina
Telerik team
 answered on 19 Mar 2013
1 answer
102 views
I have a page with two tabs on it.  When clicking a tab there is an ajax postback.  On the first tab is a tree control with check boxes enabled.  The tree is loaded on page load if it is not a postback.  If I check some boxes in the tree, go to the second tab, then back to the first tab, all the items in the tree are unchecked.  What am I missing?

<telerik:RadTreeView ID="treeView" runat="server" DataFieldID="ID" DataFieldParentID="ParentID" DataTextField="Text" DataValueField="ID" Skin="Outlook" CssClass="tree" CheckBoxes="true" OnClientNodeChecked="ClientNodeChecked" EnableViewState="true">
                                    <DataBindings><telerik:RadTreeNodeBinding CheckedField="Checked" Checkable="true" /></DataBindings>
                                        <NodeTemplate>......
Boyan Dimitrov
Telerik team
 answered on 19 Mar 2013
1 answer
82 views
Does anyone know if there is a way to use a different template for the Active tab as opposed to the inactive tabs?

I have a button I want only on the active tab and I don't want it to show on the other tabs. Is there a way to do this? I'm not finding anything in the demo pages or the documentation.

Any help with this would be greatly appreciated.
Thanks.
Nencho
Telerik team
 answered on 19 Mar 2013
2 answers
263 views
Hi,

When I check the root "All" nodes, all the children get checked as expected.

1. However, when I un-check one of the children,  I would expect  the root "All" node to be unchecked but it stays checked.
2. Also, on a cleared treeview, when I go through and check all the chidren, I would like the "All" to be automatically checked.

Are there options to do this or does all of this take custom script?

David
Top achievements
Rank 1
 answered on 19 Mar 2013
2 answers
116 views
I am doing something like the below. When I try to do a delete, however, I'm getting a NullReferenceException. Apparently, the FindControl doesn't find the control on delete, so when it tries to access the .Text, it causes the exception. Shouldn't it find the control?

Private Sub RadGrid1_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
        Select Case e.CommandName
            Case RadGrid.PerformInsertCommandName
                Dim editableItem As GridEditableItem = CType(e.Item, GridEditableItem)
                Dim val = DirectCast(editableItem.FindControl("tbVal"), TextBox).Text
                PerformInsert(val)
 
            Case RadGrid.UpdateCommandName
                Dim editableItem As GridEditableItem = CType(e.Item, GridEditableItem)
                Dim val = DirectCast(editableItem.FindControl("tbVal"), TextBox).Text
                PerformUpdate(val)
 
            Case RadGrid.DeleteCommandName
                Dim editableItem As GridEditableItem = CType(e.Item, GridEditableItem)
                Dim val = DirectCast(editableItem.FindControl("tbVal"), TextBox).Text
                PerformDelete(val)
 
        End Select
End Sub
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 19 Mar 2013
2 answers
102 views
I'm using the ItemsRequested event to databind my RadComboBox by searching the database for the Text typed in the textbox portion on the ComboBox. The only problem is, when the user initially clicks into the textbox the ItemsRequested event immediately fires so it pulls in all possible data. Is there a way to not fire this event when the user clicks into the textbox -but- still fire the event if the user clicks the down arrow on the ComboBox itself?
Hristo Valyavicharski
Telerik team
 answered on 19 Mar 2013
4 answers
232 views
I've the following nested Grid structure.

<telerik:RadGrid ....>
   <MasterTableView...>
         <DetailTables>
            <GridTableView  Name="Users".....>
                  <Columns>
                          <telerik:GridBoundColumn UniqueName="Status" DataField="Status" HeaderText="Status"  AllowFiltering="false" />
                  </Columns>
                 <NestedViewTemplate>
                              ...................
                 </NestedViewTemplate>     
              </GridTableView>
           </DetailTables>
      <Columns>
           ............
      </Columns>
   </MasterTableView>
 </telerik:RadGrid>

I want to hide the NestedViewTemplate if "Status" has some specific value.

I'm binding the DetailTable as follows and probably can access the current item's Status value in the same event but not sure how to do that.

 protected void RadGridTest_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e)
        {
            GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
            switch (e.DetailTableView.Name)
            {
                case "Users":
                    {
                        int testID = Convert.ToInt32(dataItem.GetDataKeyValue("ID"));
                        e.DetailTableView.DataSource = UserInTest.GetUsersInTest(testID,"Untaken");
                        break;
                    }


            }
        }

So, how can I access the current item's Column values of DetailTable and the NestedViewTemplate to hide it if the column (Status) has a certain value.

Andrey
Telerik team
 answered on 19 Mar 2013
1 answer
97 views
There doesnt seem to be a way to get around the FileSharing error when a user attempts to upload a file that happens to be open on their own desktop locally (like an Excel file).

Why hasn't Telerik fixed it yet? If so what is the workaround 'cause it ain't built into the control and all the relevant topics deadend with no resolution.
Plamen
Telerik team
 answered on 19 Mar 2013
1 answer
143 views
Hi, I am using the RadAsyncUpload without enabling plugins, so I am using straight-up javascript on my page. In other words I have the property DisablePlugins="True".

My problem is that I can not distinguish the reason for error when the user atempts to upload a file that happens to be open at the time of the upload attempt, essentially this is a file-sharing error.

I know that you can distinguish the difference from the wrong extension and the max size errors by this post:

http://www.telerik.com/help/aspnet-ajax/asyncupload-onclientvalidationfailed.html

I cannot, however, find javascript code that will distinguish these two possible errors:

1) wrong extension
2) max file size

...as well as

3) file-sharing (while the file is open and upload attempted on it)

All three at once.

???

There seem to be solutions if you are using Silverlight, but if you are not, you do not have access to same objects and properties that you would if I was assuming the use of Silverlight.
Plamen
Telerik team
 answered on 19 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?