Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
131 views
Hi team,
I do all the steps described in your site to create custom commands in the editor and it worked successfully, I create the editor in a user control and add this control to my page , its ok great .

I do the following scenario

  1. Add the editor in user control (say  UCtrl ) with the new custom button.
  2. Add two instance of the user control (Say UCtrl1,UCtrl2 ) in the same page.
  3. unfortunately when I click the custom command button in the editor in the first instance( UCtrl1 ) , the execution of the comand occurs in the second instance (UCtrl2)

 

Breifly the command executed in the last instance of control added to the page.

Is there any solution for this issues??

Tools and Technologies

ajax control for asp.net  version 9 Q3.
IE as web browser
windows 7 as an operating system
microsoft asp.net 3.5
sql server 2005 database
Dobromir
Telerik team
 answered on 02 Mar 2011
2 answers
120 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
142 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
247 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
107 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
341 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
129 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
165 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
532 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
188 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?