Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
148 views
Hello,

there's a problem when using the built-in pager for RadGrid: when the page size over the pager is changed by the user, it changes its location in the MasterTableView - from the bottom of the view to about 3/4 of the height of the view?
<PagerStyle Position="Bottom" /> won't solve this issue.

Where can i explicitly set the align of the pager?
Are there any known bugs?

Kind regards,
A. Koch
Eyup
Telerik team
 answered on 01 Apr 2014
2 answers
142 views
Hi,

The RadCaptcha component always generating new code after a ajax requesting. I´m doing a request using the ajaxRequestWithTarget method from a RadAjaxPanel.

What I can do for work properly?

Thanks,

Danilo Pimentel
Slav
Telerik team
 answered on 01 Apr 2014
1 answer
152 views
We are using the FileExplorer in an internal web site, and using this code to open a file:

  function OnExplorerFileOpen(oExplorer, args) {
      if (!args.get_item().isDirectory()) {
          setTimeout(function () {
              var oWindowManager = oExplorer.get_windowManager();
              var previewWindow = oWindowManager.getActiveWindow(); // Gets the current active widow.
              try {
                  previewWindow.setSize(500, 500);
                  previewWindow.maximize();
              } catch (e) {
              }
          }, 100);   // Some timeout is required in order to allow the window to become active
      }
  }

How does the FileExplorer determine whether a file opens in a modal or as an attachment?  







Vessy
Telerik team
 answered on 01 Apr 2014
1 answer
146 views
We are looking for client-side events that will fire when the built-in image manager tool is used with the RadEditor.  We are currently implementing client-side events for the FileManager tool outside of the RadEditor and are looking for similar events for the built-in tool in the Editor. 
Specifically, we are looking for an event that will fire when a user selects a thumbnail icon in the ImageManager just before the preview is rendered in the right-hand side panel of the Image manager dialog window.

Thank you,
Ed Sudit
Ianko
Telerik team
 answered on 01 Apr 2014
1 answer
87 views
Hello Support,

I noticed some strange behavior of RadEditor control. 
I am trying to put the next image tag into Rad Editor content area (edit mode is HTML):
<img src="#PATH#Upload/calendar.png" alt="" />
On button click I want to store this value into a session. The problem is that it seems that page reloads on button click (I have IsPostBack check in OnInit event, and IsPostBack is false). Since I need session to be cleared in OnInit, you realize that all session data are lost. This page reload occurs even I change EditMode from HTML to Design, and inversely. The issue doesn't happen if I change "#PATH#" with "PATH#".
This is the source of RadEditor control:
<telerik:RadEditor ID="editorDroplistItemValue" runat="server" ToolbarMode="Default"
    EditModes="Design, Preview, HTML" Skin="Simple" ContentFilters="None" NewLineMode="Br"
    Height="315" Width="640px" EnableResize="false" ToolsFile="~/Admin/Controls/ToolsFileFull.xml">
    <Content>
    </Content>
    <CssFiles>
    <telerik:EditorCssFile Value="../../css/RadEditorCSS.css" />
    </CssFiles>
</telerik:RadEditor>
Ianko
Telerik team
 answered on 01 Apr 2014
3 answers
111 views

Select on enter is broken on Chrome, when matched, and enter the contol seelction is null.
The cleint has to hit the mouse click anywhere on the page to get the combo to select..
Anyone know a work around to make the combo work with enter on chrome?

I have recieved nothing back from Telerik support, and need this to work on both IE and Chrome, the majority of my users..

Ray..
Kate
Telerik team
 answered on 01 Apr 2014
3 answers
1.5K+ views
Hi All,

In my page I have date column inside my telerik radgrid. On clicking of the column header the date is not sorting properly. Tag is like this -

<telerik:GridBoundColumn DataField="date" HeaderText="Date" UniqueName="date"
         ReadOnly="true" AllowSorting="true" DataType="System.DateTime"
                        DataFormatString="{0:MM/dd/yyyy}" SortExpression="date"/>

The date is sorting only from month not from  year, month and date. In the database the data type is smalldatetime. While retriving from database, I am using  'convert(char(10),GETDATE(),101)' .
The result I am getting is
12/30/2011
12/28/2011
12/20/2011
11/30/2011
1/04/2012
It should be
11/30/2011
12/20/2011
12/28/2011
12/30/2011
1/04/2012

Thanks in Advance.
Akki
Princy
Top achievements
Rank 2
 answered on 01 Apr 2014
4 answers
137 views
On my website, I have a master page where my RadAjaxLoadingPanel resides. On my content page, I have a RadGrid where one of the template columns is an ImageButton that when clicked will read a file from my database and using the code below will allow the user to view it:

Response.Buffer = true;
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}", "MillCert.pdf"));
Response.BinaryWrite(BinaryFile);
Response.Flush();
Response.End();

The entire RadGrid is wrapped in a RadAjaxPanel with it's ClientEvents-OnRequestStart set to cancel the Postback:

function conditionalPostback(sender, args) {
    args.set_enableAjax(false);
}

This works fine but after the PDF is opened, the RadAjaxLoadingPanel just stays on and won't hide!

I've searched through the forums and Google but nothing anyone has suggested will work.

The opening of the file is done through the OnItemCommand method of the RadGrid but I also have some custom filtering being done through there so I can't separate it out, I need it ONLY for this one item.

Any suggestions?
Shinu
Top achievements
Rank 2
 answered on 01 Apr 2014
2 answers
76 views
Hi,

I need an urgent support. The requirement is as foll.

Suppose
a telerik grid has 10 pages with 10 records displaying on each page.
Now if i click on page no 4. I will fetch only 10 records from 41 to 50.
But on page it should display as no of pages 10 and selected page as 4.

Please help me ASAP.

Regards,
Gaurav
Eyup
Telerik team
 answered on 01 Apr 2014
1 answer
109 views

I have a page that has a number of complicated radgrids on it - lots of template columns, lots of eval statements, custom controls binding to properties of properties, etc. I'm already using custom paging with this, and my page size is 60 records. The underlying data source is a list of objects. It's taking something like 6 or 7 seconds just to get from the Grid DataBinding event to the Grid DataBound event. This decreases as I remove columns from my grid. 

 - I know that Microsoft mentions that Eval can be slow because it uses reflection (http://msdn.microsoft.com/en-us/library/4hx47hfe(v=vs.110).aspx), so I'm trying to find ways to avoid that. Would I get any improvement by making the grid itself pretty simple with the data in individual GridBoundColumn columns, and then doing more complicated formatting/binding in the ItemDataBound event. 

- Some of my template columns contain custom controls that bind from an object. That object is a property of the object I'm binding to the grid. Would this cause performance issues? Should my datasource be very flat rather than having nested objects? Could I store the object in the DataKey collection? I can't imagine that populating the DataKey collection with a ton of data is a very good for performance.

- Other than values that have already been bound to the grid, the only way to access underlying data in the ItemDataBound event is by storing it in the DataKey collection, right? There's no way to access the underlying object I'm binding to, right?

For reference, here is an example of one the grids:

<rad:RadGrid ID="gridData" AllowFilteringByColumn="false" AllowSorting="false" runat="server"
    Ondate="GridData_DataBinding" OnNeedDataSource="GridData_NeedDataSource" OnItemDataBound="GridData_ItemDataBound"
    OnItemCommand="GridData_ItemCommand" OnUpdateCommand="GridData_ItemUpdated">
    <GroupingSettings CaseSensitive="false" />
    <ExportSettings ExportOnlyData="false" />
    <MasterTableView Name="Exceptions" EditMode="InPlace" EnableHeaderContextMenu="true" DataKeyNames="MurexMkt, PrimaryTicker">
        <Columns>
            <rad:GridTemplateColumn HeaderText="" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="10"
                HeaderStyle-Font-Bold="true" UniqueName="Approve" AllowFiltering="false">
                <HeaderTemplate>
                    <input type="checkbox" id="chkAll" onclick="CheckAll(this);" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="chkApprove" Style="margin-right: -6px;" runat="server" CssClass="GridApproveCheckbox" />
                </ItemTemplate>
            </rad:GridTemplateColumn>
            <rad:GridBoundColumn DataField="StagePriceExceptionId" ReadOnly="true" HeaderText="ExcID"
                AllowFiltering="false" HeaderStyle-Width="40" Display="false" />
            <rad:GridBoundColumn DataField="StagePriceId" ReadOnly="true" HeaderText="ID" AllowFiltering="false"
                Display="false" HeaderStyle-Width="40" />
            <rad:GridBoundColumn DataField="SecurityId" UniqueName="SecurityId" Display="false" HeaderText="Security Id" />
            <rad:GridBoundColumn DataField="PriceTypeId" UniqueName="PriceTypeId" Display="false" HeaderText="Price Type Id" />
            <rad:GridBoundColumn DataField="AsOfDate" ReadOnly="true" HeaderText="Date" DataFormatString="{0:MM/dd/yyyy}"
                ItemStyle-CssClass="GridColNumber" />
            <rad:GridTemplateColumn UniqueName="SecurityName" HeaderText="Security" ReadOnly="true" DataField="SecurityName">
                <ItemTemplate>
                    <asp:HyperLink ID="hl1" runat="server" NavigateUrl='<%# string.Format("~/SecurityXRef/SecurityXref.aspx?menuId=g2&search={0}", Eval("Ticker")) %>'>
                        <%# Eval("SecurityName") %>
                    </asp:HyperLink>
                </ItemTemplate>               
            </rad:GridTemplateColumn>
            <rad:GridBoundColumn DataField="SecurityName" UniqueName="SecurityNameSimple" HeaderText="Security" Display="false" />
            <rad:GridBoundColumn DataField="SecurityIsin" HeaderText="ISIN" Display="false" />
            <rad:GridBoundColumn DataField="Ticker" HeaderText="Ticker" ReadOnly="true" />           
            <rad:GridBoundColumn DataField="RIC" HeaderText="RIC" ReadOnly="true" /> 
            <rad:GridBoundColumn DataField="CurrencyCode" HeaderText="Currency" ReadOnly="true" />               
            <rad:GridBoundColumn UniqueName="PrimarySource" DataField="DataSourceShortName" ReadOnly="true" HeaderText="Primary Source" HeaderStyle-Wrap="true"/>
            <rad:GridBoundColumn DataField="PriceType" HeaderText="Price Type" ReadOnly="true" />         
            <rad:GridTemplateColumn HeaderText="Price" UniqueName="PriceCol" ItemStyle-CssClass="GridColNumber" DataField="PriceLast" SortExpression="PriceLast" >
                    <ItemTemplate>
                         <rad:RadToolTip ID="radToolTipPrice" runat="server" TargetControlID="lnkOverride">
                            <div style="text-align:left !important;">
                                <strong>Data Source: </strong> <%# Eval("DataSourceShortName")%><br />
                                <strong>Price Type: </strong> <%# Eval("PriceType")%> <br />
                                <strong>Field: </strong> <%# Eval("DataSourceFieldName")%> <br />
                                <strong>Comment: </strong> <%# Eval("Comments")%>
                            </div>                           
                        </rad:RadToolTip>
                        <asp:LinkButton ID="lnkOverride" runat="server" CommandName="Edit" DataTextFormatString="{0:0.000000}"/>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <div style="text-align:left !important;">
                            <strong>Override: </strong><br /><asp:TextBox ID="txtOverride" runat="server" Text='<%# Eval("PriceLast","{0:0.000000}") %>'/><br />
                            <strong>Comment: </strong><br /><asp:TextBox ID="txtComment" runat="server" TextMode="MultiLine" Text= '<%# Eval("Comments")%>' Rows="3" />
                            <p>
                                <asp:CheckBox ID="chkAddHAndPrice" runat="server" Text="Add Fixed Price" />
                            </p>
                            <asp:LinkButton ID="lnkSave" runat="server" CommandName="Update" Text="Update" />
                            <asp:LinkButton ID="lnkCancel" runat="server" CommandName="Cancel" Text="Cancel"/>
                        </div>
                    </EditItemTemplate>
                </rad:GridTemplateColumn>     
            <rad:GridBoundColumn DataField="JobName" HeaderText="Loader" UniqueName="Loader"
                Visible="false" />
            <rad:GridBoundColumn DataField="IsOverride" Visible="false" />
            <rad:GridBoundColumn DataField="PriceLast" Display="false" />
            <rad:GridTemplateColumn HeaderText="Bloomberg Price"  UniqueName="BloombergSource" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Display="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                        <%--<rad:RadToolTip ID="radToolTipBbg" runat="server" TargetControlID="lblBbgSource" >
                           <div style="text-align:left !important;">
                                <strong>Data Source:</strong> <%# Eval("BbgDataSource") %>
                                <br /><br />
                                <strong>Field:</strong> <%# Eval("BbgField") %> <br />
                                <strong>Loader:</strong> <%# Eval("BbgJob") %><br />
                                <strong>Loaded At:</strong> <%# Eval("BbgCreated") %>
                            </div>                           
                        </rad:RadToolTip>
                        <asp:Label ID="lblBbgSource" runat="server" Text='<%# Eval("BbgPrice","{0:0.000000}") %>' />--%>
                         <HMC:GridPrice Id="GridPriceBbg" runat="server" Price='<%# Eval("BbgPriceVO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>    
                <rad:GridTemplateColumn HeaderText="" DataField="AltSource1" UniqueName="AltSource1" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Visible="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                        <HMC:GridPrice Id="GridPrice1" runat="server" Price='<%# Eval("AltSource1VO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>           
                <rad:GridTemplateColumn HeaderText="Secondary Price" DataField="AltSource2" UniqueName="AltSource2" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Visible="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                        <HMC:GridPrice Id="GridPrice2" runat="server" Price='<%# Eval("AltSource2VO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
                <rad:GridTemplateColumn HeaderText="Tertiary Price" UniqueName="AltSource3" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Visible="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                        <HMC:GridPrice Id="GridPrice3" runat="server" Price='<%# Eval("AltSource2VO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
                <rad:GridTemplateColumn HeaderText="Fourth Price" DataField="AltSource4" UniqueName="AltSource4" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Visible="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                       <HMC:GridPrice Id="GridPrice4" runat="server" Price='<%# Eval("AltSource2VO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
                <rad:GridTemplateColumn HeaderText="Fifth Price" DataField="AltSource5" UniqueName="AltSource5" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Visible="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                        <HMC:GridPrice Id="GridPrice5" runat="server" Price='<%# Eval("AltSource2VO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
                <rad:GridTemplateColumn HeaderText="HMC Price" DataField="HMCPrice" UniqueName="HMCPrice" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Display="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>         
                         <rad:RadToolTip ID="radToolTipHMCPrice" runat="server" TargetControlID="lblHMCPrice">
                            <div style="text-align: left !important;">
                                <%# Eval("HMCPriceComment") %>
                            </div>
                        </rad:RadToolTip>          
                        <asp:Label ID="lblHMCPrice" runat="server" Text='<%# Eval("HMCPrice.Price","{0:0.000000}") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
            <rad:GridTemplateColumn UniqueName="OpenWindow" AllowFiltering="false" HeaderStyle-Width="70"
                ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton" runat="server" CommandName="OpenWindow" Text="View History"></asp:LinkButton>
                </ItemTemplate>
            </rad:GridTemplateColumn>
            <rad:GridTemplateColumn UniqueName="OpenWindow2" AllowFiltering="false" HeaderStyle-Width="70"
                ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton2" runat="server" CommandName="OpenWindow" Text="View Futures Curve"></asp:LinkButton>
                </ItemTemplate>
            </rad:GridTemplateColumn>
            <rad:GridTemplateColumn DataField="ExceptionMessage" ReadOnly="true" UniqueName="ExceptionMessage" HeaderText="Error Description">
                    <ItemTemplate>
                        <rad:RadToolTip ID="radToolTipException" runat="server" TargetControlID="lblExceptionMessage">
                            <div style="text-align: left !important;">
                                <%# Eval("ExceptionMessage") %>
                            </div>
                        </rad:RadToolTip>
                        <asp:Label ID="lblExceptionMessage" runat="server" Text='<%# Eval("ShortErrorDescription") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
            <rad:GridBoundColumn DataField="Comments" HeaderText="Comments" Display="false" />
            <rad:GridBoundColumn DataField="DataStatusCode" ReadOnly="true" HeaderText="Data Status" />
            <rad:GridBoundColumn DataField="ExceptionStatusCode" ReadOnly="true" HeaderText="Exception Status" Visible="false" />
        </Columns>
        <GroupByExpressions>
            <rad:GridGroupByExpression>
                <SelectFields>
                    <rad:GridGroupByField FieldName="MurexMkt" FieldAlias="MurexMkt" HeaderText="Murex Market" />
                     <rad:GridGroupByField Aggregate="Count" FieldName="StagePriceId" />
                </SelectFields>
                <GroupByFields>
                    <rad:GridGroupByField FieldName="MurexMkt" />
                </GroupByFields>
            </rad:GridGroupByExpression>
            <rad:GridGroupByExpression>
                <SelectFields>
                    <rad:GridGroupByField FieldName="PrimaryTicker" FieldAlias="PrimaryTicker" HeaderText="Primary Ticker" />
                     <rad:GridGroupByField Aggregate="Count" FieldName="StagePriceId" />
                </SelectFields>
                <GroupByFields>
                    <rad:GridGroupByField FieldName="PrimaryTicker" />
                </GroupByFields>
            </rad:GridGroupByExpression>
            <rad:GridGroupByExpression>
                    <SelectFields>                                   
                        <rad:GridGroupByField FieldName="ExceptionTypeCode" />                         
                        <rad:GridGroupByField Aggregate="Count" FieldName="StagePriceId" />                 
                    </SelectFields>
                    <GroupByFields>
                        <rad:GridGroupByField FieldName="ExceptionTypeCode" /> 
                    </GroupByFields>
                </rad:GridGroupByExpression>
        </GroupByExpressions>
    </MasterTableView>
</rad:RadGrid>



Jayesh Goyani
Top achievements
Rank 2
 answered on 01 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?