Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
101 views
Hi,

        I am using a radwindow with modal background. I have a requirement to make the window float when the page is scrolled. I referred the scripts from this link,
http://www.telerik.com/community/code-library/aspnet-ajax/window/floating-r-a-d-window-on-page-scroll-window-stays-visible-during-scrolling.aspx
Find below the style and scripts,

<head runat="server"
    <title>Untitled Page</title> 
    <style type="text/css"
    html, body, form 
    { 
      padding: 0px; 
      margin: 0px; 
      height: 100%; 
      width: 100%; 
    } 
     
    .RadWindow 
    { 
        position: fixed !important; 
 
    } 
    </style> 
</head> 
<script type="text/javascript"
            function GetSelectedWindow() 
            { 
                var oManager = GetRadWindowManager(); 
                return oManager.getActiveWindow();       
            } 
             
            function PositionWindow ()  
            { 
           
                var oWindow = GetSelectedWindow();   
                if (!oWindow) { 
                    return
                } 
                 
                var Y = document.body.clientHeight +  
                        document.body.scrollTop -  
                        oWindow.get_height(); 
                 
                var X = document.body.clientWidth +  
                        document.body.scrollLeft -  
                        oWindow.get_width(); 
 
                Y = (Y > 0) ? Y : 0; 
                X = (X > 0) ? X : 0;                     
                oWindow.moveTo(X, Y); 
            } 
 
            function InitWindow ()  
            { 
                setTimeout(function() 
                { 
                    var oWindow = GetRadWindowManager().getActiveWindow();   
                    if (!oWindow)  
                    { 
                        window.setTimeout('InitWindow()', 500); 
                    } 
 
               PositionWindow();}, 0); 
            } 

But the script is not working only in IE 6. This problem is because of the css property position : fixed. But when i tried removing, the scripts are not working. Please help with the code changes to make it work on all browsers including IE 6 mainly.

Regards,
Saravanan K
 

Svetlina Anati
Telerik team
 answered on 06 Jul 2010
1 answer
142 views
Hi!

I know it's possible to customize the text in the pager by modifying the PagerStyle and the property PagerStyleFormat. However, when using grouping and paging together, you'll notice that in the GroupHeader there will be messages like "XXX: YYY (Showing 3 of 4 items. Group continues on the next page.)" and "XXX: YYY (... group continued from the previous page. Showing 1 of 4 items.)".

Is it possible to customize these pager messages as with PagerStyleFormat? Also, if it can be done in the ItemDataBound-event by calculating the number of items in the group, how would it be done?

Thanks!
Veli
Telerik team
 answered on 06 Jul 2010
1 answer
80 views
Hi guys,

I was wondering if I can get the list items to be wider then the original RadComboBox itself. Please see the attached screenshot of the current situation. I would love for the item to be wider so the user doesn't need to scroll.

Thnx for the help!

-Robert
Shinu
Top achievements
Rank 2
 answered on 06 Jul 2010
11 answers
495 views
Hi,
  I use Tooltip as a confirmation box in my project.  I set ManualClose to True and add a "yes" and a "no" button inside the tooltip.

  The user has to click either the "yes" or "no" button to close the tooltip.  Is there a way to hide the "close" button at the top-right corner in the tooltip?  Maybe it's very easy, but I don't know how.

Thanks.
Svetlina Anati
Telerik team
 answered on 06 Jul 2010
1 answer
61 views
Hi,

  I seen demo of dock  (http://demos.telerik.com/aspnet-ajax/dock/examples/default/defaultcs.aspx) & i want control which is used in this demo.  they created user controls of news ,& blogs. i want same control which will be collapse & expand. which control i should use for this?

any help is appreciated.......
it's urgent............



  
 
Georgi Tunev
Telerik team
 answered on 06 Jul 2010
1 answer
205 views
Hi,

I have used RadGrid control without having Column tag as follows:
 
<telerik:RadGrid ID="radgridAuditReports" EnableEmbeddedSkins="false" runat="server" 
                Skin="WebBlue" Width="12000px"  PageSize="10" AllowSorting="true" AllowPaging="true"    
                ShowGroupPanel="false" AllowMultiRowEdit="false" AutoGenerateColumns="true" GridLines="None"   
                OnNeedDataSource="radgridAuditReports_NeedDataSource" AllowAutomaticInserts="false">  
                <SortingSettings EnableSkinSortStyles="false" /> 
                <HeaderStyle Width="125px" /> 
                <PagerStyle CssClass="Pager" Mode="NumericPages" Position="Bottom" HorizontalAlign="Left" 
                    ShowPagerText="false"></PagerStyle> 
                <CommandItemStyle HorizontalAlign="Right" /> 
                <ItemStyle HorizontalAlign="Left" Height="25px" /> 
                <AlternatingItemStyle HorizontalAlign="Left" Height="25px" /> 
                <HeaderStyle HorizontalAlign="Left" /> 
                <MasterTableView Width="100%" TableLayout="Fixed" CommandItemSettings-ShowRefreshButton="false" 
                    ItemStyle-HorizontalAlign="Left" GroupHeaderItemStyle-HorizontalAlign="Left" 
                    AllowSorting="true">  
                </MasterTableView> 
               
            </telerik:RadGrid> 
I have used a data table to bind the grid in Code behind (radgridAuditReports_NeedDataSource). When i clicked on the header text for sorting, it does not display the SortAsc/SortDesc image. Please help me with the solution to set the Sort image.
 
Thanks,
Abirami R.
Princy
Top achievements
Rank 2
 answered on 06 Jul 2010
2 answers
441 views
Hi,

In my current project, I have to write a web page containing a RadGrid with Persisted Sorting.

I have implement the web page similar to as follows RadGrid with Persisted Sorting

The RadGrid's SortExpressions are persisted in the Settings which are saved (i.e. serialized) on Page_UnLoad and loaded (i.e. deserialized) on Page_Load.

I created the class SortExpressions instead of using Telerik's GridSortExpression because GridSortExpression is not marked as Serializable.

The web page works as expected. However, can you please review my code if I have implemented it correctly?

The code is given as follows:

ASPX
<form id="form1" runat="server"
<div> 
    <telerik:RadScriptManager ID="radScriptManager" runat="server" /> 
    <telerik:RadGrid ID="radGrid" AutoGenerateColumns="false" AllowSorting="true" OnNeedDataSource="radGrid_NeedDataSource" runat="server"
        <ClientSettings> 
            <Scrolling UseStaticHeaders="true" /> 
        </ClientSettings>  
        <MasterTableView AllowMultiColumnSorting="true" TableLayout="Fixed"
            <Columns> 
                <telerik:GridBoundColumn DataField="Name" DataType="System.String" HeaderText="Name" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" SortExpression="Name" AllowSorting="true" UniqueName="Name" /> 
                <telerik:GridBoundColumn DataField="Founder" DataType="System.String" HeaderText="Founder" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" SortExpression="Founder" AllowSorting="true" UniqueName="Founder" /> 
            </Columns> 
        </MasterTableView> 
    </telerik:RadGrid>   
</div> 
</form> 

C#
public partial class RadGridWithSorting : Page 
    private const string SettingsFilename = "Settings.bin"
    private Settings _settings = null
    private List<Company> _companies = null
 
    protected Settings Settings 
    { 
        get 
        { 
            if (this._settings == null
            { 
                this._settings = new Settings(); 
            } 
            return this._settings; 
        } 
        set 
        { 
            this._settings = value; 
        } 
    } 
 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        LoadSettings(); 
        LoadSortExpressions(); 
 
        if (!IsPostBack) 
        { 
            this._companies = Company.Load(); 
            Session["COMPANIES"] = this._companies; 
        } 
        else 
        { 
            this._companies = (List<Company>)Session["COMPANIES"]; 
        } 
    } 
 
    protected void Page_UnLoad(object sender, EventArgs e) 
    { 
        SaveSortExpressions(); 
        SaveSettings(); 
    } 
 
    protected void radGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
    { 
        this.radGrid.DataSource = this._companies; 
    } 
 
    private void LoadSettings() 
    { 
        Settings = Helper.Load(SettingsFilename); 
    } 
 
    private void LoadSortExpressions() 
    { 
        this.radGrid.MasterTableView.SortExpressions.Clear(); 
        foreach (SortExpression sortExpression in Settings.SortExpressions) 
        { 
            GridSortExpression gridSortExpression = new GridSortExpression(); 
            gridSortExpression.FieldName = sortExpression.FieldName; 
            gridSortExpression.SortOrder = sortExpression.SortOrder; 
            this.radGrid.MasterTableView.SortExpressions.AddSortExpression(gridSortExpression); 
        } 
    } 
 
    private void SaveSettings() 
    { 
        Helper.Save(Settings, SettingsFilename); 
    } 
 
    private void SaveSortExpressions() 
    { 
        Settings.SortExpressions.Clear(); 
        foreach (GridSortExpression sortExpression in this.radGrid.MasterTableView.SortExpressions) 
        { 
            Settings.SortExpressions.Add(new SortExpression(sortExpression.FieldName, sortExpression.SortOrder)); 
        } 
    } 
 
[Serializable] 
public class Settings 
    public List<SortExpression> SortExpressions { getset; } 
 
    public Settings() 
    { 
        SortExpressions = new List<SortExpression> {}; 
    } 
    public Settings(List<SortExpression> sortExpressions) 
    { 
        SortExpressions = sortExpressions; 
    } 
 
[Serializable] 
public class SortExpression 
    public string FieldName { getset; } 
    public GridSortOrder SortOrder { getset; } 
 
    public SortExpression() 
    { 
        FieldName = null
        SortOrder = GridSortOrder.None; 
    } 
    public SortExpression(string fieldName, GridSortOrder sortOrder) 
    { 
        FieldName = fieldName; 
        SortOrder = sortOrder; 
    } 

Thanks,
Herman
Herman Gouw
Top achievements
Rank 2
 answered on 06 Jul 2010
1 answer
138 views
I have an object model defined using Open Access. The object has a collection of child objects.

I want to:
  1. display my objects in a grid
  2. display the objects in the child collection in a details grid.
  3. use the fact that OA is prefetching the child data for me to populate the child grids.

Items 1 and 2 are straightforward, I've created the grid and created a child grid. It's 3 that's causing me the problem.

All of the examples I've seen to use 2 separate fetches, usually via SQL to populate the grids; the first for the master table the 2nd for the child grid.

What I hoped to do was get the DetailTableDataBind event to fire for each row in the master table view that was bound, access the parent item and set the data source of the detail table to the collection of child objects.

Sadly this won't work (prolly 'cos I'm doing it wrong).

I've set the detail table up using this ...
<telerik:GridTableView Name="Locations" HierarchyLoadMode="ServerBind"

And from what I read in the docs, I expected this to cause the DetailTableDataBind to fire after the ItemDataBound event for each item in the MasterTableView. It doesn't. In fact it doesn't fire 'til the master table's row is expanded.

The next problem is that when the DetailTableDataBind event fires I can't get at the parent row's data object, this is, I assume, 'cos it's only available when the ItemDataBound event for that row fires.

So, just how much of what I've read in the docs have I failed to understand? 

And is it actually possible to bind a DetailTableView to the child objects of an object without going to the data store a 2nd time?

-- 
Stuart
Veli
Telerik team
 answered on 06 Jul 2010
1 answer
79 views
I've got a RadGrid that uses the basic inline insert and update functionality combined with RadComboBoxes for many of my fields in the EditItemTemplates. I want to combine my solution with the "Grid / Google-like Filtering" example that's posted at: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandcombo/defaultcs.aspx?product=grid.

What I want to happen is an AutoPostBack when the selected item is changed in the postback that filters the table based on the "Company" chosen. I want this done using AJAX as in the example. The end result would be a hybrid of the example in the link above that includes TWO modes for the CustomFilteringColumn. If Inserting/Updating, I want the RadComboBox to display. If just viewing, I simply want a basic bound field to show. 

I've spent the past day struggling. Does anyone have any pointers?
Yavor
Telerik team
 answered on 06 Jul 2010
1 answer
199 views
Hi,
       I have bit unusual requirement. I have to apply "contains" as default filter for an Integer data type column( with AutoPostBackOnFilter="true").

Please help me regarding this.

Regards,
Dheeraj
Martin
Telerik team
 answered on 06 Jul 2010
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?