This is a migrated thread and some comments may be shown as answers.

Grid Template Column Problem

1 Answer 46 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Erdam Colak
Top achievements
Rank 1
Erdam Colak asked on 12 Jun 2014, 08:22 AM
Hi,

I have a grid like this ,


<GullsEye:GullsEyeGrid AllowPaging="true" AllowSorting="true"   PageSize="10" runat="server" ID="RadPortCheckInRequest" AutoGenerateColumns="false" <br>            AllowMultiRowSelection="false"  OnNeedDataSource="RadPortCheckInRequest_NeedDataSource"  OnItemCommand="RadPortCheckInRequest_ItemCommand" ><br><br>            <MasterTableView> <%--DataKeyNames="Id" AutoGenerateColumns="false">--%><br>                <Columns><br>                 <br>                    <telerik:GridBoundColumn DataField="RequestCode" HeaderText="<%$Resources:ContentResource, RequestCode%>" DataType="System.String"></telerik:GridBoundColumn><br>                    <telerik:GridDateTimeColumn DataField="RequestDate" HeaderText="<%$Resources:ContentResource, RequestDate%>" DataFormatString="{0:dd/MM/yyyy}"></telerik:GridDateTimeColumn><br>                    <telerik:GridBoundColumn DataField="AgentCode" HeaderText="<%$Resources:ContentResource, AgentCode%>" DataType="System.String"></telerik:GridBoundColumn><br>                    <telerik:GridBoundColumn DataField="LinerCode" HeaderText="<%$Resources:ContentResource, LinerCode%>" DataType="System.String"></telerik:GridBoundColumn><br>                    <telerik:GridBoundColumn DataField="VesselName" HeaderText="<%$Resources:ContentResource, VesselName%>" DataType="System.String"></telerik:GridBoundColumn><br>                    <telerik:GridBoundColumn DataField="BerthingRequestArrivalTrip" HeaderText="<%$Resources:ContentResource, ArrivalTrip%>" DataType="System.String"></telerik:GridBoundColumn><br>                    <telerik:GridBoundColumn DataField="BerthingRequestDepartureTrip" HeaderText="<%$Resources:ContentResource, DepartureTrip%>" DataType="System.String"></telerik:GridBoundColumn><br>                    <telerik:GridBoundColumn DataField="RequestAgentReferenceNumber" HeaderText="<%$Resources:ContentResource, RequestAgentReferenceNumber%>" DataType="System.String"></telerik:GridBoundColumn><br>                    <telerik:GridBoundColumn DataField="Status" HeaderText="<%$Resources:ContentResource, Status%>" DataType="System.String"></telerik:GridBoundColumn><br>                    <telerik:GridTemplateColumn UniqueName="Sennur" ShowFilterIcon="false" ShowSortIcon="false"  ><br>                                                    <ItemTemplate><br>                                                        <asp:LinkButton   ID="LinkButtonShow"  runat="server" Text="<%$Resources:ContentResource, Detail%>" CausesValidation="false"<br>                                                            CommandArgument='<%# DataBinder.Eval(Container.DataItem,"Id") %>'<br>                                                            CommandName="ShowDetailCommand"  /><br>                                                    </ItemTemplate><br>                                                </telerik:GridTemplateColumn>        <br>                </Columns><br>            </MasterTableView><br>        </GullsEye:GullsEyeGrid>


and code behind of this asp is ,

protected void RadPortCheckInRequest_ItemCommand(object sender, GridCommandEventArgs e)<br>        {<br>            if (e.Item != null)<br>            {<br>                if (e.Item is Telerik.Web.UI.GridDataItem && (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem))<br>                {<br>                    if (e.CommandName == "ShowDetailCommand")<br>                    {<br>                        Guid requestId = new Guid(e.CommandArgument.ToString());<br>                        if (Guid.Empty != requestId)<br>                        {<br><br>                            string url = ConfigurationManager.AppSettings["WebSiteUrl"] + "/View/Request/RequestDetail.aspx?RequestId=" + requestId.ToString();<br>                            RadWindow foundedWindow = (RadWindow)Master.FindControl("RadPopup");<br>                            INavigationService navigationService = ServiceFactory.GetInstance().GetService<INavigationService>();<br>                            navigationService.OpenPopup(url, foundedWindow, true);<br>                        }<br>                    }<br><br><br>                }<br> }

When i first sort a column it works fine and after that click Detail button in ItemTemplateColumn it shows Detail Popup.
But the problem is that after detail Popup shown, when i  try to sort a column it pops up Detail screen everytime.

Can you help me with this situation?

Regards..

<div class="reCodeBlock" style="border:solid 1px #7f9db9;width:1;height:1;overflow-y:auto;"><div style=" background-color: #fff;"><span style=" "><span style=" margin-left: 0px !important;"><code style="color: #000;"><</code><code style="color: #069;font-weight: bold;">GullsEye:GullsEyeGrid</code> <code style="color: #808080;">AllowPaging</code><code style="color: #000;">=</code><code style="color: blue;">"true"</code> <codestyle="color: #808080;">AllowSorting</code><code style="color: #000;">=</code><code style="color: blue;">"true"</code>   <code style="color: #808080;">PageSize</code><code style="color: #000;">=</code><code style="color: blue;">"10"</code> <code style="color: #808080;">runat</code><code style="color: #000;">=</code><code style="color: blue;">"server"</code> <code style="color: #808080;">ID</code><code style="color: #000;">=</code><codestyle="color: blue;">"RadPortCheckInRequest"</code> <code style="color: #808080;">AutoGenerateColumns</code><codestyle="color: #000;">=</code><code style="color: blue;">"false"</code> <code style="color: #000;"><br>            AllowMultiRowSelection="false"  OnNeedDataSource="RadPortCheckInRequest_NeedDataSource"  OnItemCommand="RadPortCheckInRequest_ItemCommand" ><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>            <</code><code style="color: #069;font-weight: bold;">MasterTableView</code><code style="color: #000;">> <%--DataKeyNames="Id" AutoGenerateColumns="false">--%><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                <</code><code style="color: #069;font-weight: bold;">Columns</code><code style="color: #000;">><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                 <</code><code style="color: #069;font-weight: bold;">br</code><codestyle="color: #000;">>                    <</code><code style="color: #069;font-weight: bold;">telerik:GridBoundColumn</code> <code style="color: #808080;">DataField</code><code style="color: #000;">=</code><code style="color: blue;">"RequestCode"</code> <code style="color: #000;">HeaderText="<%$Resources:ContentResource, RequestCode%>" DataType="System.String"></</code><code style="color: #069;font-weight: bold;">telerik:GridBoundColumn</code><code style="color: #000;">><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                    <</code><code style="color: #069;font-weight: bold;">telerik:GridDateTimeColumn</code> <code style="color: #808080;">DataField</code><code style="color: #000;">=</code><code style="color: blue;">"RequestDate"</code> <code style="color: #000;">HeaderText="<%$Resources:ContentResource, RequestDate%>" DataFormatString="{0:dd/MM/yyyy}"></</code><code style="color: #069;font-weight: bold;">telerik:GridDateTimeColumn</code><code style="color: #000;">><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                    <</code><code style="color: #069;font-weight: bold;">telerik:GridBoundColumn</code> <code style="color: #808080;">DataField</code><codestyle="color: #000;">=</code><code style="color: blue;">"AgentCode"</code> <code style="color: #000;">HeaderText="<%$Resources:ContentResource, AgentCode%>" DataType="System.String"></</code><code style="color: #069;font-weight: bold;">telerik:GridBoundColumn</code><code style="color: #000;">><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                    <</code><code style="color: #069;font-weight: bold;">telerik:GridBoundColumn</code> <code style="color: #808080;">DataField</code><code style="color: #000;">=</code><code style="color: blue;">"LinerCode"</code> <code style="color: #000;">HeaderText="<%$Resources:ContentResource, LinerCode%>" DataType="System.String"></</code><code style="color: #069;font-weight: bold;">telerik:GridBoundColumn</code><code style="color: #000;">><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                    <</code><code style="color: #069;font-weight: bold;">telerik:GridBoundColumn</code> <code style="color: #808080;">DataField</code><code style="color: #000;">=</code><code style="color: blue;">"VesselName"</code> <code style="color: #000;">HeaderText="<%$Resources:ContentResource, VesselName%>" DataType="System.String"></</code><code style="color: #069;font-weight: bold;">telerik:GridBoundColumn</code><code style="color: #000;">><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                    <</code><code style="color: #069;font-weight: bold;">telerik:GridBoundColumn</code> <code style="color: #808080;">DataField</code><code style="color: #000;">=</code><code style="color: blue;">"BerthingRequestArrivalTrip"</code> <code style="color: #000;">HeaderText="<%$Resources:ContentResource, ArrivalTrip%>" DataType="System.String"></</code><codestyle="color: #069;font-weight: bold;">telerik:GridBoundColumn</code><code style="color: #000;">><</code><codestyle="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                    <</code><codestyle="color: #069;font-weight: bold;">telerik:GridBoundColumn</code> <code style="color: #808080;">DataField</code><code style="color: #000;">=</code><code style="color: blue;">"BerthingRequestDepartureTrip"</code> <code style="color: #000;">HeaderText="<%$Resources:ContentResource, DepartureTrip%>" DataType="System.String"></</code><code style="color: #069;font-weight: bold;">telerik:GridBoundColumn</code><code style="color: #000;">><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                    <</code><code style="color: #069;font-weight: bold;">telerik:GridBoundColumn</code> <code style="color: #808080;">DataField</code><code style="color: #000;">=</code><code style="color: blue;">"RequestAgentReferenceNumber"</code> <code style="color: #000;">HeaderText="<%$Resources:ContentResource, RequestAgentReferenceNumber%>" DataType="System.String"></</code><code style="color: #069;font-weight: bold;">telerik:GridBoundColumn</code><code style="color: #000;">><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                    <</code><code style="color: #069;font-weight: bold;">telerik:GridBoundColumn</code> <code style="color: #808080;">DataField</code><codestyle="color: #000;">=</code><code style="color: blue;">"Status"</code> <code style="color: #000;">HeaderText="<%$Resources:ContentResource, Status%>" DataType="System.String"></</code><code style="color: #069;font-weight: bold;">telerik:GridBoundColumn</code><code style="color: #000;">><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                    <</code><code style="color: #069;font-weight: bold;">telerik:GridTemplateColumn</code> <code style="color: #808080;">UniqueName</code><code style="color: #000;">=</code><code style="color: blue;">"Sennur"</code> <code style="color: #808080;">ShowFilterIcon</code><codestyle="color: #000;">=</code><code style="color: blue;">"false"</code> <code style="color: #808080;">ShowSortIcon</code><code style="color: #000;">=</code><code style="color: blue;">"false"</code>  <codestyle="color: #000;">><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                                                    <</code><code style="color: #069;font-weight: bold;">ItemTemplate</code><code style="color: #000;">><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                                                        <</code><codestyle="color: #069;font-weight: bold;">asp:LinkButton</code>   <code style="color: #808080;">ID</code><codestyle="color: #000;">=</code><code style="color: blue;">"LinkButtonShow"</code>  <code style="color: #808080;">runat</code><code style="color: #000;">=</code><code style="color: blue;">"server"</code> <codestyle="color: #000;">Text="<%$Resources:ContentResource, Detail%>" CausesValidation="false"<</code><codestyle="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                                                            CommandArgument='<%# DataBinder.Eval(Container.DataItem,"Id") %>'<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                                                            CommandName="ShowDetailCommand"  /><</code><code style="color: #069;font-weight: bold;">br</code><codestyle="color: #000;">>                                                    </</code><code style="color: #069;font-weight: bold;">ItemTemplate</code><code style="color: #000;">><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                                                </</code><codestyle="color: #069;font-weight: bold;">telerik:GridTemplateColumn</code><code style="color: #000;">>        <</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>                </</code><code style="color: #069;font-weight: bold;">Columns</code><code style="color: #000;">><</code><codestyle="color: #069;font-weight: bold;">br</code><code style="color: #000;">>            </</code><codestyle="color: #069;font-weight: bold;">MasterTableView</code><code style="color: #000;">><</code><codestyle="color: #069;font-weight: bold;">br</code><code style="color: #000;">>        </</code><code style="color: #069;font-weight: bold;">GullsEye:GullsEyeGrid</code><code style="color: #000;">></code></span></span></div></div>

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 17 Jun 2014, 07:24 AM
Hello Erdam,

The behavior you describe seems rather strange, however it would be hard to pinpoint the reason for the issue from the provided code. Would you try using a standard RadGrid control and see if the behavior will persist? If it does, would you open a formal support ticket and send us a runnable project where the problem is replicated? This would allow us to investigate the problem locally and look for its cause.


Regards,
Viktor Tachev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Erdam Colak
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or