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

I need to place the description box in between image area and thumbnails area, and need to keep it visible permanently.

Can you help me please?
Eyup
Telerik team
 answered on 18 Apr 2014
4 answers
139 views
In HTML view "replace all" feature doesn't work. It returns "The search string was not found", in the same time find feature works as expected. 
It reproducible in Chrome, but works in IE. 
Ianko
Telerik team
 answered on 18 Apr 2014
2 answers
387 views
In my RadGrid I have AllowColumnResize="true" ResizeGridOnColumnResize="False" and Width="100%'.  None of my columns have a width set..  There is a problem with the RadGrid resizing back to 100% width after a column resize.

1.  RadGrid loads.
2.  Resize the browser window width to be smaller.
3.  Adjust a column width to be wider.
4.  Resize the browser window back to be wider or expand it full screen.

Expected result would be the RadGrid would return back to taking up the full width of the browser window.

What happens is the RadGrid stays at the width you had when the browser window was made smaller.

This does not happen if you don't resize the columns.  The RadGrid expands/contracts as expected.
john81
Top achievements
Rank 1
 answered on 18 Apr 2014
1 answer
239 views
Hello,

I need to show the calendar for a month but they have a different way for this. If the first day of the month does not start on a Sunday they need to show the days for the last week of the previous month fill in Sunday, etc. up to the first. And then on the last week of the month if the last day does not land on Saturday they do not want to see any of those days. Is there a way I can hide and show certain days in the calendar?

Thanks,
Warren
Abdul Rahim Shaik
Top achievements
Rank 2
 answered on 18 Apr 2014
9 answers
278 views
Hello,
I want to print grid content. I refer http://www.telerik.com/support/code-library/print-radgrid-contents this link.
referring this link print operation perform perfectly but I want to remove some attributes of grid like "allowscrolling,usestaticheader etc" at the time of print grid and after print  grid that property again bind to grid.
I am trying this two ways

1.st_approch
On Code Behind
protected void Page_Load(object sender, EventArgs e)
       {
            
               radgrid.ClientSettings.Scrolling.UseStaticHeaders = true;
               radgrid.ClientSettings.Scrolling.AllowScroll = true;
               radgrid.ClientSettings.Scrolling.SaveScrollPosition = true;
       }
protected void btn_print_Click(object sender, EventArgs e)
       {
             radgrid.ClientSettings.Scrolling.UseStaticHeaders = false;
               radgrid.ClientSettings.Scrolling.AllowScroll = false;
               radgrid.ClientSettings.Scrolling.SaveScrollPosition = false;
           ScriptManager.RegisterStartupScript(this, typeof(Page), "myscript", "function pageLoad(){PrintRadGrid();}", true);
       }
.aspx page
function PrintRadGrid() {
  
            $find("<%=radgrid.ClientID %>").get_masterTableView().hideFilterItem();
         
            var previewWnd = window.open('about:blank', '', '', false);
            var sh = '<%= ClientScript.GetWebResourceUrl(radgrid.GetType(),String.Format("Telerik.Web.UI.Skins.{0}.Grid.{0}.css",radgrid.Skin)) %>';
            var styleStr = "<html><head><link href = '" + sh + "' rel='stylesheet' type='text/css'></link></head>";
            var htmlcontent = styleStr + "<body>" + $find('<%= radgrid.ClientID %>').get_element().outerHTML + "</body></html>";
            previewWnd.document.open();
            previewWnd.document.write(htmlcontent);
            previewWnd.document.close();
            previewWnd.print();
 
            if (!$telerik.isChrome) {
                previewWnd.close();
            }
            $find("<%=radgrid.ClientID %>").get_masterTableView().showFilterItem();          
    }

2.nd_approch
.aspx
function PrintRadGrid() {
             $find("<%=radgrid.ClientID %>").get_masterTableView().hideFilterItem();
             var radGrid = $find("<%= radgrid.ClientID %>");
             radGrid.ClientSettings.Scrolling.AllowScroll = false;
             radGrid.ClientSettings.Scrolling.UseStaticHeaders = false ;
            radGrid.ClientSettings.Scrolling.SaveScrollPosition=false;
             
              
             var previewWnd = window.open('about:blank', '', '', false);
             var sh = '<%= ClientScript.GetWebResourceUrl(radgrid.GetType(),String.Format("Telerik.Web.UI.Skins.{0}.Grid.{0}.css",radgrid.Skin)) %>';
             var styleStr = "<html><head><link href = '" + sh + "' rel='stylesheet' type='text/css'></link></head>";
             var htmlcontent = styleStr + "<body>" + $find('<%= radgrid.ClientID %>').get_element().outerHTML + "</body></html>";
             previewWnd.document.open();
             previewWnd.document.write(htmlcontent);
             previewWnd.document.close();
             previewWnd.print();
 
             if (!$telerik.isChrome) {
                 previewWnd.close();
             }
             $find("<%=radgrid.ClientID %>").get_masterTableView().showFilterItem();
             radGrid.ClientSettings.Scrolling.AllowScroll = true;
             radGrid.ClientSettings.Scrolling.UseStaticHeaders = true;
             radGrid.ClientSettings.Scrolling.SaveScrollPosition = true;
     }
and the above print code call on button onclientclick event
above both ways not working to achieve the task.
So please tell me how achieve this task.
Testing
Top achievements
Rank 1
 answered on 18 Apr 2014
5 answers
171 views
I have a simple  textbox and a simple dropdownlist like this:
<asp:TextBox ID="txtState" runat="server" Width="200px" AutoPostBack="true"    ></asp:TextBox>
 <asp:DropDownList ID="cboCities" runat="server"  Width="200px" AutoPostBack="true" >  </asp:DropDownList> 

When the user enters a state in the textbox, I want to fill the dropdownlist with appropriate cities. I am using an Open Access Data Model.I have tried several different ways to bind the dropdownlist in the page’s load complete event when it detects that txtState.text <> “” and cboCities.items.count = 0

'Attempt 1
 'No errors but no values filled either. If it did work I would want to replace the where clause with c.State = txtState.text
Using model As New MyDataModel.EntitiesModel
       Dim Stations As List(Of City) = (From c In model.Cities Where c.State = "MA" _ And c.IsActive = 1).ToList
       If Not Stations Is Nothing Then
            cboCities.DataSource = Stations
            cboCities.DataBind()
       End If
End Using

'Attempt 2 
  ''this one works but doesn't have the ability to filter by state. DBContext is defined on the DataAccesPage which this page inherits from
  cboCities.DataSource = DbContext.Cities.ToList()
  cboCities.DataTextField = "CityID"
  cboCities.DataBind()

   'Attempt 3
'THIS ONE WORKS TO FILL THE CBO BUT ANY CODE AFTER THIS THROWS ERRORS I really wanted this one to work because it calls a function in my '     'BLL (FillCitiesList) which seems the most “Proper” way to go about it

Dim listStations As IQueryable(Of CanFillStation)
listStations = FillCitiesList ("MA”)
cboCities.DataSource = listStations
cboCities.DataBind() 

Public Function FillCitiesList (ByVal stState As String) As IQueryable(Of City)
        Using model As New MyDataModel.EntitiesModel
            Dim query = From c In model.Cities Where c.State = strState
               Select c
            Return query
        End Using
    End Function 

This is the error message that is thrown after attempt 3 code executes:
System.ObjectDisposedException was unhandled by user code  Message=The ObjectScope has already been disposed and it's managed persistent objects can no longer be accessed. The ObjectScope should be disposed at the end of the life cycle of your business logic instance. This can also be done in the Dispose of your ASP page or MVC controller.Object name: 'OpenAccessRuntime.EnlistableObjectScope'.  ObjectName=OpenAccessRuntime.EnlistableObjectScope  Source=Telerik.OpenAccess.Runtime  StackTrace:       at OpenAccessRuntime.ObjectScope.CheckNotDisposed()       at OpenAccessRuntime.ObjectScope.Telerik.OpenAccess.SPI.IExtendedObjectScope.get_ShouldLogExpressions()       at Telerik.OpenAccess.Query.ExtentQueryImpl`1.Telerik.OpenAccess.Query.ExecutionSettings.get_ShouldLogExpressions()       at Telerik.OpenAccess.Query.ExpressionCutter.CutAndExecute(Expression expression, ExecutionSettings settings, Expression whole)       at Telerik.OpenAccess.Query.Piece`1.ExecuteMultiple()       at Telerik.OpenAccess.Query.Piece`1.System.Collections.IEnumerable.GetEnumerator()       at System.Web.UI.WebControls.ListControl.PerformDataBinding(IEnumerable dataSource)       at System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e)       at System.Web.UI.WebControls.ListControl.PerformSelect()       at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()       at ELSATracking.EditRelations.Page_LoadComplete(Object sender, EventArgs e) in C:\_DEVELOPMENT\ELSATracking\ELSATracking\UserPages\Shop\EditRelations.aspx.vb:line 132       at System.Web.UI.Page.OnLoadComplete(EventArgs e)       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)  InnerException:


Obviously, I don't know what I'm doing! Can anyone help me fill the dropdownlist programatically after the user enters a state, using OpenAccess, and preferably using a business layer function?

Thanks
Doroteya
Telerik team
 answered on 18 Apr 2014
1 answer
72 views
Hello,
I noticed that the PivotTable control is not compatible with touchscreen tablet on Windows 8.
How do I use it better?

Thanks
Francesco
Dimitar
Telerik team
 answered on 18 Apr 2014
1 answer
94 views
Just curious if it works before investing too much time into it.  I have tried to implement it and have had no luck.  Please advise.
Genady Sergeev
Telerik team
 answered on 18 Apr 2014
1 answer
68 views
Hello there,

i am using RADtreeview within my User Control (*.ascx). I also configured it to get its nodes from a webservice. So far so good, all is working fine as long as i open the Page with "http://". I see the Control is sending its request with POST to my WebService and gets all needed information to populate the Tree.

But as soon as i switch to "https://" the Control is asking the WebService with GET instead of POST. How to configure it to always send POST?

UseHttpGet="false" doens't change anything. Also my WebService only have a POST OperationContract.

WebService Contract:

[OperationContract]
[WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.WrappedRequest, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
RadTreeNodeData[] GetNodes(RadTreeNodeData node, IDictionary<string, object> context);

User Control (*.ascx):

<telerik:RadTreeView
    ID="RadTreeView1"
    runat="server"
    Width="100%"
    PersistLoadOnDemandNodes=   "false"
    EnableViewState         =   "false"
    LoadingStatusPosition   =   "AfterNodeText"
     
    >
    <ExpandAnimation Type="none"></ExpandAnimation>
    <CollapseAnimation Type="none"></CollapseAnimation>
    <WebServiceSettings Path="http://localhost/_vti_bin/xxxx.xxxx.xxxx/myTopBarNavigation.svc" Method="GetNodes" UseHttpGet="false"></WebServiceSettings>
    <Nodes>
        <telerik:RadTreeNode Text="Root Node" ExpandMode="WebService">
        </telerik:RadTreeNode>
    </Nodes>
</telerik:RadTreeView>
Hristo Valyavicharski
Telerik team
 answered on 18 Apr 2014
1 answer
168 views
I have a grid looks with a RadButton for editing with paging allowed. Out of grid I have a button for filtering. The problem is when the session is lost, the buttons for editing not works neither buttons for paging.

In code design, it looks like this:

    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
    </telerik:RadStyleSheetManager>
    <telerik:RadAjaxManager ID="RadAjaxManager" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RbtFiltrar">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RgParametros"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadWindowManager ID="RadWindowManager" runat="server">
    </telerik:RadWindowManager>

    <telerik:RadGrid ID="RgParametros" AllowPaging="true" PageSize="14" runat="server"
        AutoGenerateColumns="False" GridLines="none" OnItemDataBound="RgParametros_ItemDataBound"
        EnableLinqExpressions="true" meta:resourcekey="RgParametros" OnNeedDataSource="RgParametros_NeedDataSource"
        OnSortCommand="RgParametros_SortCommand" OnDataBound="RgParametros_DataBound">
        <GroupingSettings CaseSensitive="False" />
        <PagerStyle PageSizeControlType="None" />
        <MasterTableView DataKeyNames="Id,Nombre" AllowSorting="true" TableLayout="Fixed"
            AllowMultiColumnSorting="true" HeaderStyle-HorizontalAlign="Center">
            <Columns>
                <telerik:GridBoundColumn UniqueName="ColCodigo" SortExpression="Id" DataField="Id"
                    meta:resourcekey="ColCodigo">
                    <ItemStyle Width="13%" Wrap="false" />
                    <HeaderStyle Width="13%" Wrap="false" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="ColNombre" SortExpression="Nombre" DataField="Nombre"
                    meta:resourcekey="ColNombre">
                    <ItemStyle Width="60%" Wrap="false" />
                    <HeaderStyle Width="60%" Wrap="false" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="ColTipo" SortExpression="Tipo" DataField="Tipo"
                    meta:resourcekey="ColTipo">
                    <ItemStyle Width="13%" Wrap="false" />
                    <HeaderStyle Width="13%" Wrap="false" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="ColValores" SortExpression="Valores" DataField="Valores"
                    meta:resourcekey="ColValores">
                    <ItemStyle Width="10%" Wrap="false" HorizontalAlign="Right" />
                    <HeaderStyle Width="10%" Wrap="false" />
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Right" UniqueName="ColEditar">
                    <ItemTemplate>
                        <telerik:RadButton ID="RbtEditar" runat="server" CausesValidation="false" OnClick="RbtEditar_Click"
                            Width="20px" Height="20px" Style="margin-right: 15px" HoveredCssClass="classHoveredImage"
                            DisabledButtonCssClass="classDisabledImage" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "Id") %>'>
                            <Image EnableImageButton="true" ImageUrl="<%$ Resources:Iconos,VER_DETALLE %>" DisabledImageUrl="<%$ Resources:Iconos,VER_DETALLE_DISABLED %>"
                                HoveredImageUrl="<%$ Resources:Iconos,VER_DETALLE_HOVER %>" />
                        </telerik:RadButton>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
            <SortExpressions>
                <telerik:GridSortExpression FieldName="Id" SortOrder="Ascending" />
            </SortExpressions>
        </MasterTableView>
    </telerik:RadGrid>

Eyup
Telerik team
 answered on 18 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?