Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
98 views
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>

Viktor Tachev
Telerik team
 answered on 17 Jun 2014
3 answers
338 views
We are using the Editor as the WYSIWYG for our client CMS. I am trying to make the layout inside the Editor window look as close to the real site as possible, so I am using the <CssFiles> feature to include some CSS, and the <classes> feature in the toolset XML to add custom classes to the Apply CSS Class menu. However, when I try to add new classes or edit old ones in the toolset XML, they are not getting picked up by the editor when I refresh the page.

Here is the code I am using to pull in CSS files into the editor window:
<CssFiles>
  <telerik:EditorCssFile Value="~/_EditorToolSets/bootstrap.css" />
  <telerik:EditorCssFile Value="~/_EditorToolSets/editor2.css" />
</CssFiles>

Bootstrap.css is the framework styles, the fonts css is for webfont support, and editor2.css is to define the custom styles I want the client to see in the window.

Here is the code from the toolset XML:
<classes>
<class name="Lead Paragraph" value=".lead" />
<class name="CAC Image" value=".cac-img" />
<class name="CAC Button" value=".cac-btn" />
</classes>

The only one that is working is the "Lead Paragraph" style. The others do not appear in the dropdown no matter what I do. I have tried changing the name of the toolset file to force a recache; cleaning and rebuilding the solution; and of course, viewing the page in a new browser to bypass cache issues.

Is there some kind of syntax rule I'm not aware of? Or limitations to the style sheets that can be added to the editor window using the <CssFiles> feature?
Ianko
Telerik team
 answered on 17 Jun 2014
1 answer
103 views
Using 2014.1.403. In the image properties dialog, the icon for the option to constrain the image aspect ratio is missing. The browser loads the icon image from http://d35islomi5rx1v.cloudfront.net/ajaxz/2014.1.403/Common/CommonIcons.gif. The section with the constrain icons is empty. Your demo site pulls the image from a resource, and it is complete.

As a workaround, I took a local copy of the correct image, and added css to SetImageProperties.aspx to use my local copy.

I also modified this file to change the default setting of this button to constrain the size, which I think is more useful to users.
Ianko
Telerik team
 answered on 17 Jun 2014
2 answers
121 views
Hello, 

This is my first usage of PageLayout control.

I used the provided codes from this page: http://www.telerik.com/help/aspnet-ajax/page-layout-responsive-design-overview.html and run my website from my computer. It display correctly and when I resize the browser window it works well (e.g. 3 blocks from 2nd row changed to 1).

[IMG]http://i58.tinypic.com/2w4wtia.png[/IMG]

But when I publish this site to web server and when I browse it through my phone, it did not responsive as there is still 3 blocks in 2nd row.

[IMG]http://i60.tinypic.com/i25bvc.png[/IMG]

What did I miss? Is there any code that I need to tell PageLayoutControl that this is PC, this is Phone, etc.. ?

Thanks in advanced,
Robin
Ivan Zhekov
Telerik team
 answered on 17 Jun 2014
5 answers
145 views
Hi  -- I just updated to latest release yesterday and this morning I notice that all my menus do not show separator items anymore for the default skin -- I must change to another skin like windows 7 for them to show.

Is it me or is there a problem with latest release?
Ivan Zhekov
Telerik team
 answered on 17 Jun 2014
7 answers
347 views
hi,

  if i want to disable the option of rename how can i do it??means when the user right clicks the file the rename option should be disable.........how can i do it??secondly if i want to disable the rename option on directory which starts with name shortcuts how can i do it??

regards

samee javaid 
Princy
Top achievements
Rank 2
 answered on 17 Jun 2014
14 answers
762 views
    protected void ddlMake_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)  
    {  
        ViewState["Make"] = e.Text;  
    } 

Forgive me if this is an extremely easy question but for some reason I cannot get the SelectedValue rather than the SelectedText from the RadCombo in the SelectedIndesChanged event.  Can someone please help me find where this may be?  e.Text is the only thing that appears to be accessible.  My ID values are the hidden piece I need.

Thanks in advance.
Doug

Shinu
Top achievements
Rank 2
 answered on 17 Jun 2014
1 answer
157 views
I have a radgrid with a  GridBoundColumn. There is a button outside the radgrid with is enabled only when one or more rows are selected. How can I achieve this client side? I tried the following but did not work:
this._RadGrid1.ClientSettings.ClientEvents.OnRowSelected = "OnRowSelected";
Shinu
Top achievements
Rank 2
 answered on 17 Jun 2014
1 answer
186 views
Hi

I am retrieving data from database table (MS SQL Server), which can have thousands of rows. DataSource for RadGrid is an EntityDataSource control.

For performance & usability reasons I have activated paging. This works really good as long as grouping is not involved! SQL on server-side only returns rows for current page when grouping is not enabled, but when it is always all rows get returned. It was verified by SQL Profiler.

I have checked all properties in EntityDataSource (and of EntityDataSourceView control - in OnQueryCreated event) and they are all correct for paging and sorting (see http://msdn.microsoft.com/en-us/library/vstudio/cc488534%28v=vs.100%29.aspx).

And also RadGrid.EnableLinqExpressions and MasterTableView.EnableLinqGrouping are set to true.

Here relevant markup:

<telerik:RadGrid ID="VialsGrid" runat="server" CellSpacing="0"
    AllowPaging="true" PageSize="50" AllowFilteringByColumn="true" AutoPostBackOnFilter="true" AutoGenerateColumns="false" AllowSorting="true"
    GridLines="None" Width="1000" ItemStyle-VerticalAlign="Top" AlternatingItemStyle-VerticalAlign="Top"
    DataSourceID="VialsGridDataSource" EnableLinqExpressions="true" OnUpdateCommand="VialsGrid_UpdateCommand" OnItemCreated="VialsGrid_ItemCreated">
    <MasterTableView DataKeyNames="VialLocationID" Name="MasterTableView" CommandItemDisplay="Top" EnableLinqGrouping="true">
        <Columns>
            ...
        </Columns>
        <CommandItemSettings ShowAddNewRecordButton="true" ShowRefreshButton="true"></CommandItemSettings>
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <SelectFields>
                    <telerik:GridGroupByField FieldName="VialLocationGroupName" FieldAlias="VialLocationGroupName" HeaderText="Group" />
                </SelectFields>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="VialLocationGroupName" />
                </GroupByFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
    </MasterTableView>
    <ClientSettings>
        <ClientEvents OnCommand="function(){}" OnMasterTableViewCreated="MasterTableViewCreated" />
    </ClientSettings>
</telerik:RadGrid>
</div>
 
<asp:EntityDataSource ID="VialsGridDataSource" runat="server"
    ConnectionString="name=EmbryoDBEntities"
    DefaultContainerName="EmbryoDBEntities" EnableFlattening="false"
    EnableInsert="false" EnableUpdate="true" EnableDelete="false"
    EntitySetName="VialLocationViews" OrderBy="it.VialLocationGroupName, it.VialLocation asc"
    AutoPage="true" AutoSort="true"
    OnQueryCreated="VialsGridDataSource_QueryCreated">
</asp:EntityDataSource>

Any ideas?

Thanks,
Roger

Daniel
Telerik team
 answered on 16 Jun 2014
1 answer
121 views
We are displaying a lightbox with a simple form and button within a relatively complex page (complex mostly due to the foundation css classes used), and as soon as it comes up it closes within 1-4 seconds.  If there is a javascript timer on the page closes in 1-2 seconds; if the same page doesn't have the timer it closes in 3-4 seconds.  A simple page with the same lightbox (using their same master page) stays open until manually closed.  It appears then that other stuff is causing the closing.  Is there a way the lightbox can block the page until it is closed? Are there any best practices on keeping a lightbox isolated from what else is going on in the page?
Thanks very  much
Angel Petrov
Telerik team
 answered on 16 Jun 2014
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?