Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
101 views
I have implemented the GridSettingsPersister class to save the state of my grids and i am still having issues with column widths.

The grid will re size itself to fit the default content - even when I adjust the grid and set the columns wider than the page allows.

If i use a fixed table - rows at the end seems to cut off.
If I use scrolling it works only if the content does not have to scroll vertically.

Is there some way just to turn off the self adjustments the grid makes and draw the columns at the widths being saved ???

It has to be a simple setting i am missing.
Pavlina
Telerik team
 answered on 02 Mar 2011
2 answers
93 views
Hello,

Is there a way I can set the currently selected date without the ValueChanged event firing?  Other than using a JavaScript variable?

Thanks.
Maria Ilieva
Telerik team
 answered on 02 Mar 2011
3 answers
187 views
Hello,

I come back to some of my code from 2009 and found that the RadStyleSheetManager is placed in the header section.
What was the advantage of this and is it still recommended for asp.net 4.0 ?

I recently found that my web application compiled with .net 3.5 but with .net 4 installed on the production server and with a Telerik version from 12/2010 is generating very large Viewstates and long load time.

I am porting it to ASP.Net 4 and checking every detail concerning compression and scripts combining.

Best regards
CS
Peter
Telerik team
 answered on 02 Mar 2011
1 answer
82 views
I put a radcombobox in a radwindow. the radwindow have difined a Opacity="93" property.
Wenn I click to the radcombobox to view the list items thy are not shown.
I find this article where the same behavior is discribed and shown:
http://www.telerik.com/community/forums/aspnet-ajax/combobox/radcombobox-dropdown-invisible-in-radwindow.aspx
I drop the opycity property from the radwindow defination and i can see the list entries.
do you have a solution to use the opycity property and to fix the problem?
thanks
thomas
Svetlina Anati
Telerik team
 answered on 02 Mar 2011
5 answers
274 views
Is there a way for the above so that when printing, all available items are shown?
Yana
Telerik team
 answered on 02 Mar 2011
1 answer
99 views
Hello,

I have a grid with the PagerStyle-Position set to Top. I have set the statusbar and showfooter both on True. However the default loadingpanel is not showing when I e.g. filter the grid or go to next page (see screen 1).

When I set the PagerStyle-Position="TopAndBottom" (see screen 2), I do get the animation at the left bottom. Is there a way to have only the top pager and have the loading panel show up there on the left side?

Thanks in advance

/Yeroon

Vasil
Telerik team
 answered on 02 Mar 2011
2 answers
146 views
Heyas;

I have a grid that I am trying to put a combo box in as a filter for a specific column.  I manually created the items in the combo box, then created a RadCodeBlock with a javascript function inside that is supposed to apply the appropriate filter, OR remove all the filters on that column.  So far, when I select a filter that is supposed to be "EqualTo", it works, but when I try to remove the filters entirely, I get a "No records to display" message.  This is clearly not the case, and I am not sure what else to try.   I've perused the forums and tried the solutions there, as well as the tried the API reference.  In fact, I copy/pasted the code directly, substituting where necessary, but it still does not work.  I am hoping someone can help me out here.  Here's the relevant aspx code:

<telerik:RadGrid ID="gridAllSurveys"
    runat="server"
    AllowFilteringByColumn="True"
    AutoGenerateColumns="False"
    DataSourceID="dsAllSurveys"
    GridLines="None"
    AllowPaging="True"
    AllowSorting="True"
    PageSize="20">
    <mastertableview
        datakeynames="SessionID"
        datasourceid="dsAllSurveys">
        <commanditemsettings exporttopdftext="Export to Pdf" />
        <rowindicatorcolumn>
            <HeaderStyle Width="20px" />
        </rowindicatorcolumn>
        <expandcollapsecolumn>
            <HeaderStyle Width="20px" />
        </expandcollapsecolumn>
        <Columns>
            <telerik:GridBoundColumn
                DataField="SessionID"
                DataType="System.Int32"
                HeaderText="SessionID"
                ReadOnly="True"
                Visible="false"
                SortExpression="SessionID"
                UniqueName="SessionID">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn
                DataField="GuestEmail"
                HeaderStyle-HorizontalAlign="Center"
                ItemStyle-Width="150"
                FilterControlWidth="150"
                HeaderText="GuestEmail"
                SortExpression="GuestEmail"
                UniqueName="GuestEmail" />
            <telerik:GridDateTimeColumn
                DataField="SubmitDate"
                HeaderStyle-HorizontalAlign="Center"
                ItemStyle-HorizontalAlign="Center"
                ItemStyle-Width="120"
                FilterControlWidth="120"
                HeaderText="Submit Date"
                SortExpression="SubmitDate"
                UniqueName="SubmitDate" />
            <telerik:GridDateTimeColumn
                DataField="DateOfFirstEmail"
                HeaderStyle-HorizontalAlign="Center"
                ItemStyle-HorizontalAlign="Center"
                ItemStyle-Width="120"
                FilterControlWidth="120"
                HeaderText="1st Email"
                SortExpression="DateOfFirstEmail"
                UniqueName="DateOfFirstEmail" />
            <telerik:GridDateTimeColumn
                DataField="DateOfSecondEmail"
                HeaderStyle-HorizontalAlign="Center"
                ItemStyle-HorizontalAlign="Center"
                ItemStyle-Width="120"
                FilterControlWidth="120"
                HeaderText="2nd Email"
                SortExpression="DateOfSecondEmail"
                UniqueName="DateOfSecondEmail" />
            <telerik:GridDateTimeColumn
                DataField="DateOfThirdEmail"
                HeaderStyle-HorizontalAlign="Center"
                ItemStyle-HorizontalAlign="Center"
                ItemStyle-Width="120"
                FilterControlWidth="120"
                HeaderText="3rd Email"
                SortExpression="DateOfThirdEmail"
                UniqueName="DateOfThirdEmail" />
            <telerik:GridBoundColumn
                DataField="Status"
                HeaderStyle-HorizontalAlign="Center"
                ItemStyle-HorizontalAlign="Center"
                ItemStyle-Width="75"
                FilterControlWidth="75"
                HeaderText="Status"
                SortExpression="Status"
                UniqueName="Status" />
            <telerik:GridBoundColumn
                DataField="Quality"
                HeaderStyle-HorizontalAlign="Center"
                ItemStyle-HorizontalAlign="Center"
                ItemStyle-Width="90"
                FilterControlWidth="90"
                HeaderText="Survey Type"
                SortExpression="Quality"
                UniqueName="Quality" >
                <FilterTemplate>
                    <telerik:RadComboBox ID="RadComboBox1"
                        runat="server"
                        Width="90"
                        OnClientSelectedIndexChanged="SelectedIndexChanged">
                        <Items>
                            <telerik:RadComboBoxItem
                                Selected="True"
                                Text="Choose filter"
                                Value="" />
                            <telerik:RadComboBoxItem
                                Text="NoFilter"
                                Value="NoFilter" />
                            <telerik:RadComboBoxItem 
                                Text="positive"
                                Value="positive" />
                            <telerik:RadComboBoxItem 
                                Text="negative"
                                Value="negative" />
                        </Items>
                    </telerik:RadComboBox>
                    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                    <script type="text/javascript">
                        function SelectedIndexChanged(sender, args)
                        {
                            var tableView = $find("<%=gridAllSurveys.ClientID %>").get_masterTableView();
                             
                            if (tableView.filter("Quality", args.get_item().get_value()) == "NoFilter")
                            {
                                tableView.filter("Quality", "", Telerik.Web.UI.GridFilterFunction.NoFilter);
                            }
                            else {
                                tableView.filter("Quality", args.get_item().get_value(), "EqualTo");
                            }
                        }
                    </script>
                    </telerik:RadScriptBlock>
                </FilterTemplate>
            </telerik:GridBoundColumn>
            <telerik:GridButtonColumn
                ButtonType="LinkButton"
                CommandName="Select"
                HeaderStyle-HorizontalAlign="Center"
                ItemStyle-HorizontalAlign="Center"
                ItemStyle-Width="25"
                FilterControlWidth="25"
                Text="Detail"
                UniqueName="btnViewDetail" />
        </Columns>
    </mastertableview>
</telerik:RadGrid>

Any help would be appreciated.  The examples given in the documentation only provide examples using linq.  While I realize this may be the preferred method, what I am doing is upgrading an existing 2.x application.  Adding linq to it would be problematic.
Tsvetina
Telerik team
 answered on 02 Mar 2011
5 answers
440 views
Hello!

In my project I need to display employee listing in a hierarchical manner. The amount of data is pretty big to load all records from the data base and takes lots of time, sometimes it gives timeout exception etc. I found a solution to read only top nodes and then, when user expands one of the node, I add ID of the "expanded" employee into a list and then in my query I also check that employee supervisor belongs to this list. This allows to read from the database all top level nodes + children of all expanded nodes.

The problem is, that since I bind a reduced datasource to the grid, built-in filtering/searching mechanism of the grid has no access to the full data and so it doesn't search all employees. Is there a way to use FilterExpression with linq/dynamic linq queries? Or maybe there's some better solution?

Another related question is - is it possible to set ExpandMode per each item and not per TableView? In other words, if a node has been expanded, and child table has been rendered, can I set ExpandMode for this node to be ClientSide, so that there were no postbacks if a user collapses or expands this node again? It's possible for tree-views, if I set

e.Node.ExpandMode =

TreeNodeExpandMode.ClientSide

 

in NodeExpand event handler. But I guess that won't work with the grid, right?

Thank you very much in advance!!!
Andy.
Andy
Top achievements
Rank 1
 answered on 02 Mar 2011
6 answers
147 views
Hi,

I am facing another Problem with RadGrid:

I have grouped my data and added a checkbox to the groupheader with this code:

protected void rtl_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridGroupHeaderItem)
            {
                GridGroupHeaderItem item = (GridGroupHeaderItem)e.Item;
                DataRowView groupDataRow = (DataRowView)e.Item.DataItem;
  
                CheckBox chk = new CheckBox();
                item.DataCell.Controls.Add(chk);
            }
}

This is working. Every groupheader contains a checkbox.

After a postback, I want to get the state of this checkbox:

foreach (GridGroupHeaderItem headerItem in rtl.MasterTableView.GetItems(GridItemType.GroupHeader))
                {
                      
                        CheckBox chkbx = (CheckBox)headerItem.DataCell.Controls[0];                                           
                }

But now,  the controls collection of the headeritem.DataCell is empty. What is wrong here?
Pavlina
Telerik team
 answered on 02 Mar 2011
3 answers
152 views
Hi,
I am using Telerik RadScheduler.

I have a few questions to pose:

1) In my design, the admin is given the control of setting the date and time slots which is reflected to the user. I am able to do this successfully. What I want is, 

a) The time slots not scheduled by the admin should be reflected in black color. The user should be disabled from selecting this appointments as these are not scheduled. It should be displayed in black in day, week and month view.
b) Appointment already completed or already finished should be displayed in red color.
c) Available appointments for the future should be in blue color and as soon as the admin sets the schedule for a particular time it should be displayed in green and the unselected time in black.

For example:
lets take the example of March 23.
Initially all the appointment slots should be in Blue.If the admin selects, 7 am to 3 pm on March 23, then the slots from 7 am to 3pm should be in green and the rest 12 am to 7 am and 3 pm to 11:59 pm should be in black and the user should be disabled from selecting these black slots.
And soon as Mar 23 goes away, the color should be reflected Red.

2) When a user selects an appointment, it should be reflected in the scheduler which is happening. But as soon as the user selects his appointment, his name should be reflected at the admin side. I have taken the details of the user and have his credentials.

Looking for ward to your reply.Thank You.
Peter
Telerik team
 answered on 02 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?