Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
335 views
I have a radgrid and have enabled filtering. I have restricted the filtering to contains only. The problem is that when I enter in some filter text it fires the ItemCommand event which is fine but, it does not filter the grid. If I re-type the filter string again it fires the ItemCommand event again and the second time and any more subsequent attempts work as expected resulting in the grid being filtered. This is so wierd and I have no idea whi I have to type in a filter string twice to get it to work.

protected void policeGrid_ItemCommand(object sender, GridCommandEventArgs e)
       {
           if (e.CommandName == "Select")
           {
               var stationId = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["station_id"];
               Session["station_id"] = stationId;
 
               radAjaxMgr.ResponseScripts.Add("radopen('information.aspx','null')");
           }
       }


<telerik:RadWindowManager ID="rw" runat="server" ReloadOnShow="True"></telerik:RadWindowManager>
            <telerik:RadGrid ID="policeGrid" runat="server" AllowSorting="false" Skin="Default" OnNeedDataSource="LoadPoliceTable" OnItemCommand="policeGrid_ItemCommand"
                GridLines="Both" AutoGenerateColumns="False" ShowFooter="false" AllowPaging="true"  AllowFilteringByColumn="true"
                PageSize="25" PagerStyle-AlwaysVisible="true" OnUpdateCommand="policeGrid_UpdateCommand" OnInsertCommand="policeGrid_InsertCommand"
                EnableLinqExpressions="false" OnDeleteCommand="policeGrid_DeleteCommand" GroupingEnabled="True" ShowGroupPanel="True"
                GroupPanel-Enabled="True">
                <ClientSettings AllowDragToGroup="True"/>
                <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="TopAndBottom" />
                <MasterTableView AllowMultiColumnSorting="true" CommandItemDisplay="Top" DataKeyNames="station_id"
                    NoMasterRecordsText="No current police." TableLayout="Fixed" CommandItemSettings-ShowRefreshButton="False">
                    <RowIndicatorColumn Visible="False">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <Columns>
                        <telerik:GridEditCommandColumn UniqueName="btnEdit" ButtonType="ImageButton" EditText="Edit" Resizable="False" >
                            <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                            <HeaderStyle Width="15px" />
                        </telerik:GridEditCommandColumn>
                        <telerik:GridButtonColumn UniqueName="infoPolice" ButtonType="ImageButton" ImageUrl="../../RadControls/Grid/Skins/info.png" CommandName="Select" Text="Info">
                            <HeaderStyle Width="15px" />
                        </telerik:GridButtonColumn>
                        <telerik:GridBoundColumn DataField="STATION_ID" HeaderText="STATION_ID" UniqueName="STATION_ID"
                            AllowFiltering="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" >
                            <HeaderStyle Width="50px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="PRIMARY_CONTACT_ID" HeaderText="PRIMARY_CONTACT_ID" UniqueName="PRIMARY_CONTACT_ID"
                            AllowFiltering="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" >
                            <HeaderStyle Width="50px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="STATE_NAME" HeaderText="STATE_NAME" UniqueName="STATE_NAME"
                            AllowFiltering="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" >
                            <HeaderStyle Width="75px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="TROOP" UniqueName="TROOP" HeaderText="TROOP"
                            AllowFiltering="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
                            <HeaderStyle Width="75" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="PH_HAZMAT" HeaderText="PH_HAZMAT" UniqueName="PH_HAZMAT"
                            AllowFiltering="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
                            <HeaderStyle Width="75px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridButtonColumn ConfirmText="Delete this group?" ConfirmDialogType="RadWindow"
                            ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                            UniqueName="DeleteColumngroups" Visible="true">
                            <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                            <HeaderStyle Width="50px" />
                        </telerik:GridButtonColumn>
                    </Columns>
                    <EditFormSettings UserControlName="EditPolice.ascx" EditFormType="WebUserControl">
                        <EditColumn UniqueName="EditCommandColumn1">
                        </EditColumn>
                    </EditFormSettings>
                </MasterTableView>
            </telerik:RadGrid>
Princy
Top achievements
Rank 2
 answered on 18 Apr 2013
2 answers
46 views
I have a webpage, with a RadAjaxManager, a RadAjaxLoadingPanel which contains RadGrid1, a second RadAjaxLoadingPanel which contains RadGrid2.  RadGrid2 has a template column which has a couple controls and an asp:ImageButton.  The desired functionality is when the ImageButton is pressed, it copies the rowdata and inserts it into RadGrid1.  This process works, however the row is not displayed in RadGrid1 until a page refresh happens.  Is there a way to trigger the reload of RadGrid1 after the ImageButton (from RadGrid2) is pressed?
Mike
Top achievements
Rank 1
 answered on 17 Apr 2013
5 answers
207 views
Hi Telerik team!
Thanks I want to say thank you for the good work you are doing on the support, really appreciate that!

So, lets go to the problem I have.

I need to show in a RadChart Bars the behaivor per month the booking I have been doing in each month and sum all the booking by month.
For example I have this in my data source:

<
Date    Booking
1/2/2013      2
3/2/2013      1
5/2/2013      2

1/3/2013      2
5/3/2013      6

1/4/2013      1

>

When I group on my RadChart will be this way
<
Month    Booking
1 5
3 8
4 1
>

What I want to show on my Chart is for the Y the value of the Booking and for the X the month (1,2,3,4...12), if the value Booking in a month doesnt exist then would be zero.
How could I group by month(include all month even if there are not Booking for that month).
Thanks in advance!!!

Petar Kirov
Telerik team
 answered on 17 Apr 2013
1 answer
122 views

Hi Telerik Team. I made a last post but no answer so I thought I didnt explain enough, so starting again. 
I need to show in a Chart bars during the current year (starting from January to december) the total of the booking done per month. 
For example I have on my DB table (BookingDate, BookingValue). 

BookingDate      BookingValue

1/1/2013              3
3/1/2013              6
13/2/2013            5
3/4/2013              3
13/4/2013            15

When I do a query to my DB I get a list of BookingObject: List<BookingObject>, this will be my ObjectDataSource.
What I need to do is to show all the booking per month in the current year. My X will be 1,2,3,4..12 months and my Y the BookingValue.
I need to show all month (1-12) even if I dont have booking for that month.

I was trying to do it but really dont have idea, how to Sum the bookingValue per month and Grouping by Month, because I have on the Object Date and not month. 
If anyone can help me I would appreciate it.
Thanks in advance.

Petar Kirov
Telerik team
 answered on 17 Apr 2013
3 answers
263 views
Hi
I'm having a problem with narrow columns, in that the filter icon is not visible: instead you have to faff around to try to select the teeny tiiny line that is visible.
Can anyone advise how to force the grid to display/give enough room for the filter icons?
It's my first Telerik grid, so there is nothing fancy going on behind the scenes!
Thanks!
Niki
Top achievements
Rank 1
 answered on 17 Apr 2013
1 answer
101 views
Im trying to get the contents of a radgrid from a child window and am having some problems.  I cant access the mastertable view to get the contents... The gridPsap var picks up the element, but I cant get the master table.

Here is part of my code:
<body onload="formOnLoad();">
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">   
        <script language="javascript" type="text/javascript">
            function formOnLoad() {
 
                var gridPsap = window.opener.document.getElementById("GridPsapHistory");
                var gridPsapTableView = gridPsap.get_masterTableView();
                var gridAli = window.opener.document.getElementById("GridAliHistory");
 
                //window.close();
            }
        </script>
        </telerik:RadCodeBlock>
        <table>

Jayesh Goyani
Top achievements
Rank 2
 answered on 17 Apr 2013
3 answers
123 views

Telerik.Web.UI.RadGrid with ID='RadGridResizing' was unable to find an embedded skin with the name 'WebBlue'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: Telerik.Web.UI.RadGrid with ID='RadGridResizing' was unable to find an embedded skin with the name 'WebBlue'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[InvalidOperationException: Telerik.Web.UI.RadGrid with ID='RadGridResizing' was unable to find an embedded skin with the name 'WebBlue'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.]
   Telerik.Web.SkinRegistrar.GetEmbeddedSkinAttributes(ISkinnableControl control, Type controlType, Boolean designTime) +752
   Telerik.Web.SkinRegistrar.RegisterCssReferences(ISkinnableControl _control) +246
   Telerik.Web.UI.RadGrid.ControlPreRender() +51
   System.Web.UI.Control.PreRenderRecursiveInternal() +108
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394


Efren
Top achievements
Rank 1
 answered on 17 Apr 2013
3 answers
132 views
Hi,

I am using a RadCalendar in one of my pages where I am unable to select a year before 1980.

Please help,
Ben.
Angel Petrov
Telerik team
 answered on 17 Apr 2013
1 answer
161 views

I need to create a wpf diagram designer which consist multiple layers design (user can add layers according to their need, can switch among layers and can also show/ hide layers) and each layer can have different diagram but they are part of single design. Now my question is that how we can create multiple layers like we have different layers in Photoshop where layers are used to work on individual parts of an image while not affecting other parts. And the same thing I have to create in wpf diagram designer if it's possible or also looking for any alternative solution.... 

Lancelot
Top achievements
Rank 1
 answered on 17 Apr 2013
3 answers
69 views
Hi,

I seem to have noticed that in the Q1.2013 release the action of visible on the RadGrid has changed. I am discovering that every bound column with the visible="false" attribute, which used to work previously, now returns &nbsp;

I am having to change all of these columns to Display="false" instead, which fixes the issue where I need to access those columns, but I have over 100 pages which use grids and all of them have until now been using visible="false"

Is this change of behavior deliberate in this release? Is there anything I can do as a work around short of searching for all occurences within grids and changing them from visible to display?

David Penny
Maria Ilieva
Telerik team
 answered on 17 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?