Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
165 views
I have a RadGrid control in which I want to display a ToolTip for certain columns which contain information from the same data row in the data table.  I'm getting the results I expect on the first load of the RadGrid.  However, if I push a button which does a postback and databinds the RadGrid to the new SQL, I only get $nbsp; as the tooltip.  I've searched and can not find the answer.  Please help.

ASPX  (It does become visible in the button push).
<telerik:RadGrid ID="radgrid1" runat="server" Visible="False" MasterTableView-EnableNoRecordsTemplate="true" DataSourceID=""
    AllowPaging="True" PageSize="20" OnItemDataBound="radgrid1_ItemDataBound">
    <MasterTableView></MasterTableView>
</telerik:RadGrid>


This is the code within radgrid1_ItemDataBound which does provide the correct results the first rendering of the RadGrid.
If (TypeOf e.Item Is GridDataItem) Then
    Dim dataItem As GridDataItem = CType(e.Item, GridDataItem)
    dataItem("SSN4").ToolTip = dataItem("SSN").Text
    dataItem("Client").ToolTip = dataItem("Description").Text
    dataItem("Status").ToolTip = "Change date: " & dataItem("StatusChangeDate").Text
End If
Doug
Top achievements
Rank 1
 answered on 20 Dec 2013
6 answers
878 views
For some reason, the ajax loading panel is not showing when a partial postback involving my RadListView instance is going on.  Here is the top part of my code:

<form id="form1" runat="server">
    <telerik:RadScriptManager ID="scriptManagerExc" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
 
    <telerik:RadAjaxLoadingPanel ID="alpExc" runat="server" EnableSkinTransparency="true" Skin="Office2007" BackgroundPosition="TopLeft">
    </telerik:RadAjaxLoadingPanel>

Here is my radlistview instance:

<telerik:RadListView ID="lvExc" runat="server" ItemPlaceholderID="PlaceHolder1"
                AllowMultiFieldSorting="true" AllowPaging="true" Skin="Office2007"
                OnNeedDataSource="lvExc_NeedDataSource" onprerender="lvExc_PreRender">
                <LayoutTemplate>
                    <div class="RadListView RadListView_Office2007">
                        <table cellspacing="0">
                            <thead>
                                <tr class="rlvHeader">
                                    <th style="text-align: center;width:190px;">
                                        Portfolio
                                    </th>
                                    <th style="text-align: center;width:100px;">
                                        Average Actuals (SM/M)
                                    </th>
                                    <th style="text-align: center;width:100px;">
                                        Average Pgm Plan (SM/M)
                                    </th>
                                    <th style="text-align: center;width:100px;">
                                        Average Grp Plan (SM/M)
                                    </th>
                                    <th style="text-align: center;width:100px;">
                                        Pgm Plan minus Grp Plan (SM/M)
                                    </th>
                                </tr>
                            </thead>
                            <tfoot>
                                <tr>
                                    <td colspan="5">
                                        <telerik:RadDataPager ID="RadDataPager1" runat="server" PageSize="15" PagedControlID="lvExc" Skin="Office2007">
                                            <Fields>
                                                <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                                                <telerik:RadDataPagerButtonField FieldType="Numeric" />
                                                <telerik:RadDataPagerButtonField FieldType="NextLast" />
                                                <telerik:RadDataPagerPageSizeField PageSizeText="Page size: " />
                                                <telerik:RadDataPagerTemplatePageField>
                                                    <PagerTemplate>
                                                        <div style="float: right">
                                                            <strong>Items
                                                                <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" />
                                                                to
                                                                <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# Container.Owner.TotalRowCount > (Container.Owner.StartRowIndex+Container.Owner.PageSize) ? Container.Owner.StartRowIndex+Container.Owner.PageSize : Container.Owner.TotalRowCount %>" />
                                                                of
                                                                <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                                                <br />
                                                            </strong>
                                                        </div>
                                                    </PagerTemplate>
                                                </telerik:RadDataPagerTemplatePageField>
                                            </Fields>
                                        </telerik:RadDataPager>
                                    </td>
                                </tr>
                            </tfoot>
                            <tbody>
                                <tr style="background-color: #9AB5DB;">
                                    <td style="padding: 5px 7px 4px; text-align: right;">
                                        Grand Total:
                                    </td>
                                    <td style="text-align: center; padding: 5px 7px 4px;">
                                        <asp:Label ID="lblTotAvgAct" runat="server" />
                                    </td>
                                    <td style="text-align: center; padding: 5px 7px 4px;">
                                        <asp:Label ID="lblTotAvgPgm" runat="server" />
                                    </td>
                                    <td style="text-align: center; padding: 5px 7px 4px;">
                                        <asp:Label ID="lblTotAvgGrp" runat="server" />
                                    </td>
                                    <td style="text-align: center; padding: 5px 7px 4px;">
                                        <asp:Label ID="lblTotAvgPgmGrp" runat="server" />
                                    </td>
                                </tr>
                                <tr id="PlaceHolder1" runat="server">
                                </tr>
                            </tbody>
                        </table>
                    </div>               
                </LayoutTemplate>
                <ItemTemplate>
                    <tr class="rlvI">
                        <td style="width:190px;text-align: left;">
                            <asp:HyperLink ID="HyperLink1" NavigateUrl='<%# CreateHyperlink(Eval("PORTFOLIO").ToString()) %>' runat="server" Text='<%# Eval("PORTFOLIO").ToString() %>'></asp:HyperLink>
                        </td>
                        <td style="width:100px;text-align: center;">
                            <asp:Label ID="AvgActualsLabel" runat="server" Text='<%# Eval("AvgActuals") %>' />
                        </td>
                        <td style="width:100px;text-align: center;">
                            <asp:Label ID="ProgramPlanLabel" runat="server" Text='<%# Eval("ProgramPlan") %>' />
                        </td>
                        <td style="width:100px;text-align: center;">
                            <asp:Label ID="GroupPlanLabel" runat="server" Text='<%# Eval("GroupPlan") %>' />
                        </td>
                        <td style="width:100px;text-align: center;">
                            <asp:Label ID="lblPgmGrpVariance" runat="server" Text='<%# Eval("PgmVsGrp") %>' />
                        </td>
                    </tr>               
                </ItemTemplate>
                <AlternatingItemTemplate>
                    <tr class="rlvA">
                        <td style="width:190px;text-align: left;">
                            <asp:HyperLink ID="HyperLink1" NavigateUrl='<%# CreateHyperlink(Eval("PORTFOLIO").ToString()) %>' runat="server" Text='<%# Eval("PORTFOLIO").ToString() %>'></asp:HyperLink>
                        </td>
                        <td style="width:100px;text-align: center;">
                            <asp:Label ID="AvgActualsLabel" runat="server" Text='<%# Eval("AvgActuals") %>' />
                        </td>
                        <td style="width:100px;text-align: center;">
                            <asp:Label ID="ProgramPlanLabel" runat="server" Text='<%# Eval("ProgramPlan") %>' />
                        </td>
                        <td style="width:100px;text-align: center;">
                            <asp:Label ID="GroupPlanLabel" runat="server" Text='<%# Eval("GroupPlan") %>' />
                        </td>
                        <td style="width:100px;text-align: center;">
                            <asp:Label ID="lblPgmGrpVariance" runat="server" Text='<%# Eval("PgmVsGrp") %>' />
                        </td>
                    </tr>               
                </AlternatingItemTemplate>               
                <EmptyDataTemplate>
                    <div id="noRecordsMsg">
                        <asp:Literal ID="litMsg" runat="server"></asp:Literal>
                    </div>
                </EmptyDataTemplate>
            </telerik:RadListView>

And here is my RadAjaxManager instance:

<telerik:RadAjaxManager ID="ramExc" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnFilterData">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="lvExc" LoadingPanelID="alpExc" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnForceRefresh">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="lvExc" LoadingPanelID="alpExc" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="lvExc">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="lvExc" LoadingPanelID="alpExc" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

Here are the 2 buttons referenced above:

<div id="submitButton">
    <asp:Button ID="btnFilterData" runat="server" Text="Filter Data" Font-Names="Tahoma, Arial, Helvetica, Sans-Serif" Font-Size="11px"
        onclick="btnFilterData_Click" CausesValidation="true" />
</div>
 
<div id="refreshButton">
    <asp:Button ID="btnForceRefresh" runat="server"
        Text="Refresh Data"
        Font-Names="Tahoma, Arial, Helvetica, Sans-Serif" Font-Size="11px"
        CausesValidation="false" onclick="btnForceRefresh_Click" />            
</div>

In my code behind, I use the entity framework to pull the data from a stored procedure (thru data context) and then I take the results of the query, build a list of objects and bind them to the listview.

When the btnFilterData or btnForceRefresh buttons are clicked or when I page the listview, I expect that the loading image would show over top of the listview, but that's not happening. Any ideas why?
Martin
Top achievements
Rank 1
 answered on 20 Dec 2013
5 answers
155 views
Hi,

im trying to use Custom (external) Crop to have fixed crop dimensions (256 x 256) at dialog load. I have the two following issues (im using Q3 2012 btw):

1-In Chrome (Version 31.0.1650.63 m), if only my website in deployed on the server (in localhost, no problem), the dimension always falls to 258 x 258. I tried all these browsers (deployed and local) and they all have the same behavior than Chrome local (good): IE8,IE11,FF,Opera,Safari Ive checked the code from ImageEditorDialogs\Crop.ascx and the difference I see here might give us hints:

 <asp:Label ID="Label1" Text='<%$ appSettings:ImageResizeWidth %>' runat="server" style="display: none;" />
 <asp:Label ID="Label2" Text='<%$ appSettings:ImageResizeHeight %>' runat="server" style="display: none;" />

initialize:
function () {
                    $IE.Crop.callBaseMethod(this, "initialize");
 
                    this._xTxt = this._getControlFromParent("txtX");
                    this._yTxt = this._getControlFromParent("txtY");
                    this._widthTxt = this._getControlFromParent("txtWidth");
                    this._heightTxt = this._getControlFromParent("txtHeight");
                    this._presetDD = this._findControlFromParent("rieAspectRatio");
                    this._cropBtn = this._findControlFromParent("btnApply");
                    this._cancelBtn = this._findControlFromParent("btnCancel");
                    this._constraintBtn = this._findControlFromParent("btnConstraint");
                    this._swapBtn = this._findControlFromParent("btnSwap");
                    this._sizeRatio = null;
                    this._zoomLevel = this._getImageZoomLevel();
 
                    this._createCropBox();
                    this._updateControlsFromCropBox();
                    this._constraintBtnClick(this._constraintBtn);
                    this._attachHandlers(true);
                    this.get_imageEditor().get_formDecorator().decorate($get(this.get_parentId() + "Table"));
 
                     
                      this.set_width(this._getControlFromParent("Label1").innerText); //where the size fixing is called
                      this.set_height(this._getControlFromParent("Label2").innerText); //where the size fixing is called
                     
                },
.
.
.
 
              set_width: function (value) {
                     
 
                    var imageSize = this.get_imageSize();
                    var bounds = this._cropBox.getBounds();
 
                    alert(bounds.x); //returns in Chrome deployed -0.000002741.....  all other returns 0
               alert(imageSize.width); //returns in Chrome deployed 257.....  all other returns 256
 
                    value = this._restrictValue(value, 0, imageSize.width - bounds.x);
 
                    alert(imageSize.height);  //returns in Chrome deployed 257.....  all other returns 256
                    alert(bounds.y); //returns in Chrome deployed -0.000002741.....  all other returns 0
 
                    value = this._applyWidthConstraintRatio(value, imageSize.height - bounds.y);
                    this.set_inputValue(this._widthTxt, value);
             
                }


2-In FF 26.0, this._getControlFromParent("Label1").innerText and this._getControlFromParent("Label2").innerText from code above returns "undefined" instead of 256 like all other browsers mentioned.

Please help

TIA


Martin Roussel
Top achievements
Rank 1
 answered on 20 Dec 2013
1 answer
68 views
Dear Sir,
The requirement is that there are s two buttons (Retrieve and Apply) and one updatepanel. When user clicked the "Retrieve" button, the grid will be populated by search filter (No a grid filter). After that user selected those row for "Approval" button. There is working table to generated the record for this page by session id
It is expected that when the "Apply" button is clicked, the working table field -"TICK" to be updated automatically. However, the 'TICK' didn't update. Please help
<telerik:radgrid id="rgdApproval" runat="server" autogeneratecolumns="False" cellspacing="0"
cssclass="NoPadding" gridlines="Vertical" groupingenabled="False" height=" 200px" width="98%"  ShowHeader="true"
AllowAutomaticUpdates="True"  onitemcommand="rgdApproval_ItemCommand"
AllowMultiRowSelection="true" >
<AlternatingItemStyle BackColor="#DCE6F1" Font-Names="Verdana" Font-Size="9pt"
Height="20px" />
<MasterTableView AllowMultiColumnSorting="false"  EditMode="Batch"
ClientDataKeyNames="EACCAPV_DOCNO" Summary="RadGrid table"
TableLayout="Fixed" 
Width="100%">
                       <PagerStyle AlwaysVisible="true" />
                                            <Columns>
                                               
                                               <telerik:GridClientSelectColumn  UniqueName="chkTick"  DataType ="System.Boolean" Display="true"  >
                                                        <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="50px" />
                                                        <ItemStyle HorizontalAlign="left" VerticalAlign="Middle" Width="50px" />
                                                </telerik:GridClientSelectColumn>
                                                <telerik:GridCheckBoxColumn     ReadOnly ="true" HeaderText="Out Pay"
                                                                                UniqueName="chkOUTPAY">
                                                         <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="60px" />
                                                         <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="60px" />
                                                </telerik:GridCheckBoxColumn>
                                                <telerik:GridBoundColumn ReadOnly ="true" DataField ="EACCAPV_OUTSIDEPAY"
                                                                         Visible ="false" HeaderText=""
                                                                         UniqueName="OUTSIDEPAY">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridTemplateColumn
                                                             HeaderText="Document No" UniqueName="grvDocumentNo">
                                                             <ItemTemplate>
                                                                 <asp:LinkButton ID="LnkEACCAPV_DOCNO" runat="server"
                                                                     CommandArgument="<%#Container.ItemIndex%>" CommandName="ViewDocNo"
                                                                     Text='<%# Bind("EACCAPV_DOCNO") %>'></asp:LinkButton>
                                                             </ItemTemplate>
                                                             <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="135px" />
                                                             <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="135px" />
                                                </telerik:GridTemplateColumn>
                                            </Columns>
                                            <GroupByExpressions>
                                                <telerik:GridGroupByExpression>
                                                     <GroupByFields>
                                                            <telerik:GridGroupByField FieldName="EACCAPV_CLMCCY"></telerik:GridGroupByField>
                                                     </GroupByFields>
                                                    <SelectFields>
                                                        <telerik:GridGroupByField FieldName="EACCAPV_CLMCCY" HeaderText=""></telerik:GridGroupByField>
                                                    </SelectFields>
                                                </telerik:GridGroupByExpression>
                                            </GroupByExpressions>
                                        </MasterTableView>
                                        <SortingSettings EnableSkinSortStyles="False" SortedBackColor="Azure" />
                                         <ClientSettings EnableRowHoverStyle="true"  >
                                             <Resizing AllowColumnResize="True" AllowRowResize="False"
                                                 EnableRealTimeResize="True" ResizeGridOnColumnResize="False" />
                                             <Selecting AllowRowSelect="True"    />
                                             <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                                         </ClientSettings>
                                        <PagerStyle Height="20px" />
                                    </telerik:radgrid>
<telerik:radgrid id="rgdApproval" runat="server" autogeneratecolumns="False" cellspacing="0"
                                        cssclass="NoPadding" gridlines="Vertical" groupingenabled="False" height=" 200px" width="98%"  ShowHeader="true"
                                       AllowAutomaticUpdates="True"  onitemcommand="rgdApproval_ItemCommand"
                                         AllowMultiRowSelection="true" >
                                        <AlternatingItemStyle BackColor="#DCE6F1" Font-Names="Verdana" Font-Size="9pt"
                                                                Height="20px" />
                                        <MasterTableView AllowMultiColumnSorting="false"  EditMode="Batch"
                                                          ClientDataKeyNames="EACCAPV_DOCNO" Summary="RadGrid table"
                                                          TableLayout="Fixed"
                                                         Width="100%">
                                            <PagerStyle AlwaysVisible="true" />
                                            <Columns>
                                                
                                               <telerik:GridClientSelectColumn  UniqueName="chkTick"  DataType ="System.Boolean" Display="true"  >
                                                        <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="50px" />
                                                        <ItemStyle HorizontalAlign="left" VerticalAlign="Middle" Width="50px" />
                                                </telerik:GridClientSelectColumn>
                                                <telerik:GridCheckBoxColumn     ReadOnly ="true" HeaderText="Out Pay"
                                                                                UniqueName="chkOUTPAY">
                                                         <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="60px" />
                                                         <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="60px" />
                                                </telerik:GridCheckBoxColumn>
                                                <telerik:GridBoundColumn ReadOnly ="true" DataField ="EACCAPV_OUTSIDEPAY"
                                                                         Visible ="false" HeaderText=""
                                                                         UniqueName="OUTSIDEPAY">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridTemplateColumn
                                                             HeaderText="Document No" UniqueName="grvDocumentNo">
                                                             <ItemTemplate>
                                                                 <asp:LinkButton ID="LnkEACCAPV_DOCNO" runat="server"
                                                                     CommandArgument="<%#Container.ItemIndex%>" CommandName="ViewDocNo"
                                                                     Text='<%# Bind("EACCAPV_DOCNO") %>'></asp:LinkButton>
                                                             </ItemTemplate>
                                                             <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="135px" />
                                                             <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="135px" />
                                                </telerik:GridTemplateColumn>
                                            </Columns>
                                            <GroupByExpressions>
                                                <telerik:GridGroupByExpression>
                                                     <GroupByFields>
                                                            <telerik:GridGroupByField FieldName="EACCAPV_CLMCCY"></telerik:GridGroupByField>
                                                     </GroupByFields>
                                                    <SelectFields>
                                                        <telerik:GridGroupByField FieldName="EACCAPV_CLMCCY" HeaderText=""></telerik:GridGroupByField>
                                                    </SelectFields>
                                                </telerik:GridGroupByExpression>
                                            </GroupByExpressions>
                                        </MasterTableView>
                                        <SortingSettings EnableSkinSortStyles="False" SortedBackColor="Azure" />
                                         <ClientSettings EnableRowHoverStyle="true"  >
                                             <Resizing AllowColumnResize="True" AllowRowResize="False"
                                                 EnableRealTimeResize="True" ResizeGridOnColumnResize="False" />
                                             <Selecting AllowRowSelect="True"    />
                                             <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                                         </ClientSettings>
                                        <PagerStyle Height="20px" />
                                    </telerik:radgrid>

Best Regards,
Judy Wong
Konstantin Dikov
Telerik team
 answered on 20 Dec 2013
9 answers
364 views

Hi,

I have a RadGrid that binds using NeedDataSource. The NeedDataSource calls a tableadapter that uses a combobox SelectedValue as an input parameter. So the grid is populated based on the SelectedValue.

That works fine when the page first loads. Though I am having issues with when I change a combobox SelectedValue.

I believe it is a matter of the event ordering. As in the NeedDataSource kicks off BEFORE the SelectedIndexChanged is fired.

Below is my RadGrid:


<telerik:RadGrid ID="RDHauls" runat="server" AutoGenerateEditColumn="True" GridLines="Horizontal" AutoGenerateColumns="False" AlternatingItemStyle-BackColor="#ecf3f4" BorderColor="#28899A" EditItemStyle-BackColor="#009999" EditItemStyle-Font-Bold="true" OnItemDataBound="RDHauls_ItemDataBound" OnItemCreated="RDHauls_ItemCreated" OnNeedDataSource="RDHauls_NeedDataSource" CssClass="Radgrid">
          <AlternatingItemStyle BackColor="#ECF3F4"></AlternatingItemStyle>
          <HeaderStyle BorderColor="#28899A" Font-Bold="True" Font-Size="12px" Font-Names="Verdana" />
             <MasterTableView EnableViewState="false">
                   <Columns>
                       <telerik:GridBoundColumn DataField="TripCode" FilterControlAltText="Filter TripCode column" HeaderText="Trip Code" SortExpression="TripCode" UniqueName="TripCode" ReadOnly="true"></telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="VessReg"  FilterControlAltText="Filter VessReg column" HeaderText="Vessel" SortExpression="VessReg" UniqueName="VessReg" ReadOnly="true"></telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="HaulNumber" HeaderText="Haul" UniqueName="HaulNumber" ReadOnly="true"></telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="RigNumber" HeaderText="Rig"  UniqueName="RigNumber" ReadOnly="true"></telerik:GridBoundColumn>
                       <telerik:GridDropDownColumn DataField="Technique" HeaderText="Technique" ListTextField="Name" ListValueField="Code" UniqueName="Technique" ColumnEditorID="Technique" Visible="false" DropDownControlType="DropDownList"></telerik:GridDropDownColumn>
                       <telerik:GridCheckBoxColumn DataField="HaulSampledTrueFalse" HeaderText="Haul Sampled?" Visible="false" UniqueName="HaulSampledTrueFalse" ColumnEditorID="HaulSampled"></telerik:GridCheckBoxColumn>
                       <telerik:GridCheckBoxColumn DataField="TowDisruptedTrueFalse" HeaderText="Tow Disrupted?" Visible="false" UniqueName="TowDisruptedTrueFalse"></telerik:GridCheckBoxColumn>
                       <telerik:GridBoundColumn DataField="CodEnd" HeaderText="Cod End (mm)" UniqueName="CodEnd" ColumnEditorID="CodEnd" Visible="false" ConvertEmptyStringToNull="true"></telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="MeshSize" HeaderText="Mesh Size (mm)" UniqueName="MeshSize" Visible="false"></telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="SelectivityMesh" HeaderText="Selectivity Mesh (mm)" UniqueName="SelectivityMesh" Visible="false"></telerik:GridBoundColumn>                
                       <telerik:GridDropDownColumn DataField="TwineCode" HeaderText="Twine" ListTextField="Name" ListValueField="Code" UniqueName="TwineCode" ColumnEditorID="TwineCode" Visible="false" DropDownControlType="DropDownList"></telerik:GridDropDownColumn>                     
                       <telerik:GridBoundColumn DataField="TwineThickness" HeaderText="Twine Thickness (mm)" UniqueName="TwineThickness" Visible="false" DataType="System.Decimal"></telerik:GridBoundColumn>
                       <telerik:GridDropDownColumn DataField="GroundGear" HeaderText="Ground Gear" ListTextField="Name" ListValueField="Code" UniqueName="GroundGear" ColumnEditorID="GroundGear" Visible="false" DropDownControlType="DropDownList"></telerik:GridDropDownColumn>  
                       <telerik:GridBoundColumn DataField="Bridal" HeaderText="Bridal (m)" UniqueName="Bridal" Visible="false" DataType="System.Int32"></telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="HeadlineHeight" HeaderText="Headline Height (m)" UniqueName="HeadlineHeight" Visible="false"></telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="WarpLength" HeaderText="Warp Length (fath)" UniqueName="WarpLength" Visible="false"></telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="DoorSpread" HeaderText="Door Spread (m)" UniqueName="DoorSpread" Visible="false"></telerik:GridBoundColumn>
                       <telerik:GridDropDownColumn DataField="TidalStateCode" HeaderText="Tidal State" ListTextField="Name" ListValueField="Code" UniqueName="TidalStateCode" ColumnEditorID="TidalStateCode" Visible="false" DropDownControlType="DropDownList"></telerik:GridDropDownColumn>     
                       <telerik:GridDropDownColumn DataField="TidalStrengthCode" HeaderText="Tidal Strength" ListTextField="Name" ListValueField="Code" UniqueName="TidalStrengthCode" ColumnEditorID="TidalStrengthCode" Visible="false" DropDownControlType="DropDownList"></telerik:GridDropDownColumn>                 
                       <telerik:GridDropDownColumn DataField="TidalDirectionCode" HeaderText="Tidal Direction" ListTextField="Name" ListValueField="Code" UniqueName="TidalDirectionCode" ColumnEditorID="TidalDirectionCode" Visible="false" DropDownControlType="DropDownList"></telerik:GridDropDownColumn
                       <telerik:GridBoundColumn DataField="GroundSpeed" HeaderText="Speed Over Ground (kts)" UniqueName="GroundSpeed" Visible="false" DataType="System.Decimal"></telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="ShotDate" HeaderText="Shot Date" UniqueName="ShotDate" Visible="false">
                        <ColumnValidationSettings EnableRequiredFieldValidation="True">
                                <RequiredFieldValidator ID="RFShotDate" Font-Bold="True"> Enter Shot date</RequiredFieldValidator>
                            </ColumnValidationSettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridDropDownColumn DataField="ShotTime" HeaderText="Shot Time" ListTextField="vchTime" ListValueField="vchTime" UniqueName="ShotTime" ColumnEditorID="ShotTime" Visible="false" DropDownControlType="DropDownList"></telerik:GridDropDownColumn
                       <telerik:GridBoundColumn DataField="ShotDepth" HeaderText="Shot Depth (fath)" UniqueName="ShotDepth" Visible="false" DataType="System.Decimal"></telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="ShotLatd" HeaderText="Shot Latitude (deg)" UniqueName="ShotLatd" Visible="false">
                          <ColumnValidationSettings EnableRequiredFieldValidation="True">
                                <RequiredFieldValidator ID="RFShotLatitudeD" Font-Bold="True"> Enter Shot Latitude (deg)</RequiredFieldValidator>
                            </ColumnValidationSettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="ShotLatm" HeaderText="Shot Latitude (min)" UniqueName="ShotLatm" Visible="false">
                          <ColumnValidationSettings EnableRequiredFieldValidation="True">
                                <RequiredFieldValidator ID="RFShotLatitudeM" Font-Bold="True"> Enter Shot Latitude (min)</RequiredFieldValidator>
                            </ColumnValidationSettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="ShotLond" HeaderText="Shot Longitude (deg)" UniqueName="ShotLond" Visible="false">
                         <ColumnValidationSettings EnableRequiredFieldValidation="True">
                                <RequiredFieldValidator ID="RFShotLongitudeD" Font-Bold="True"> Enter Shot Longitude (deg)</RequiredFieldValidator>
                            </ColumnValidationSettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="ShotLonm" HeaderText="Shot Longitude (min)" UniqueName="ShotLonm" Visible="false">
                          <ColumnValidationSettings EnableRequiredFieldValidation="True">
                                <RequiredFieldValidator ID="RFShotLongitudeM" Font-Bold="True"> Enter Shot Longitude (min)</RequiredFieldValidator>
                            </ColumnValidationSettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridTemplateColumn UniqueName="ShotEastWest" ColumnEditorID="ShotEastWest" HeaderText="Shot East/West" Visible="false">
                           <ItemTemplate>
                               <%# Eval("ShotEW")%>
                           </ItemTemplate>
                           <EditItemTemplate>
                               <asp:RadioButtonList ID="rdShotEastWest" runat="server" RepeatDirection="Horizontal"
                                  <asp:ListItem Text="East" Value="2"></asp:ListItem>
                                  <asp:ListItem Text="West" Value="1"></asp:ListItem>
                               </asp:RadioButtonList>
                           </EditItemTemplate>
                       </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="HaulDate" HeaderText="Haul Date" UniqueName="HaulDate" Visible="false">
                            <ColumnValidationSettings EnableRequiredFieldValidation="True">
                                <RequiredFieldValidator ID="RFHaulDate" Font-Bold="True"> Enter Haul date</RequiredFieldValidator>
                            </ColumnValidationSettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridDropDownColumn DataField="HaulTime" HeaderText="Haul Time" ListTextField="vchTime" ListValueField="vchTime" UniqueName="HaulTime" ColumnEditorID="HaulTime" Visible="false" DropDownControlType="DropDownList"></telerik:GridDropDownColumn>   
                       <telerik:GridBoundColumn DataField="HaulDepth" HeaderText="Haul Depth (fath)" UniqueName="HaulDepth" Visible="false" DataType="System.Decimal"></telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="HaulLatd" HeaderText="Haul Latitude (deg)" UniqueName="HaulLatd" Visible="false">
                         <ColumnValidationSettings EnableRequiredFieldValidation="True">
                                <RequiredFieldValidator ID="RFHaulLatitudeD" Font-Bold="True"> Enter Haul Latitude (deg)</RequiredFieldValidator>
                            </ColumnValidationSettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="HaulLatm" HeaderText="Haul Latitude (min)" UniqueName="HaulLatm" Visible="false">
                          <ColumnValidationSettings EnableRequiredFieldValidation="True">
                                <RequiredFieldValidator ID="RFHaulLatitudeM" Font-Bold="True"> Enter Haul Latitude (min)</RequiredFieldValidator>
                            </ColumnValidationSettings>                       
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="HaulLond" HeaderText="Haul Longitude (deg)" UniqueName="HaulLond" Visible="false">
                           <ColumnValidationSettings EnableRequiredFieldValidation="True">
                                <RequiredFieldValidator ID="RFHaulLongitudeD" Font-Bold="True"> Enter Haul Longitude (deg)</RequiredFieldValidator>
                            </ColumnValidationSettings>    
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="HaulLonm" HeaderText="Haul Longitude (min)" UniqueName="HaulLonm" Visible="false">
                          <ColumnValidationSettings EnableRequiredFieldValidation="True">
                                <RequiredFieldValidator ID="RFHaulLongitudeM" Font-Bold="True"> Enter Haul Longitude (min)</RequiredFieldValidator>
                            </ColumnValidationSettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridTemplateColumn UniqueName="HaulEastWest" ColumnEditorID="HaulEastWest" HeaderText="Haul East/West" Visible="false">
                           <ItemTemplate>
                               <%# Eval("HaulEW")%>
                           </ItemTemplate>
                           <EditItemTemplate>
                               <asp:RadioButtonList ID="rdHaulEastWest" runat="server" RepeatDirection="Horizontal">
                                   <asp:ListItem Text="East" Value="2"></asp:ListItem>
                                   <asp:ListItem Text="West" Value="1"></asp:ListItem>
                               </asp:RadioButtonList>
                           </EditItemTemplate>
                       </telerik:GridTemplateColumn>
                       <telerik:GridDropDownColumn DataField="TowRegion" HeaderText="Tow Region" ListTextField="Name" ListValueField="Name" UniqueName="TowRegion" ColumnEditorID="TowRegion" Visible="false" DropDownControlType="DropDownList"></telerik:GridDropDownColumn>
                       <telerik:GridDropDownColumn DataField="HaulRectangle" HeaderText="Haul Rectangle" ListTextField="Code" ListValueField="Code" UniqueName="HaulRectangle" ColumnEditorID="HaulRectangle" Visible="false" DropDownControlType="DropDownList"></telerik:GridDropDownColumn
                       <telerik:GridDropDownColumn DataField="WindSpeedCode" HeaderText="Wind Speed" ListTextField="Name" ListValueField="Code" UniqueName="WindSpeed" ColumnEditorID="WindSpeed" Visible="false" DropDownControlType="DropDownList"></telerik:GridDropDownColumn>                   
                       <telerik:GridDropDownColumn DataField="WindDirectionCode" HeaderText="Wind Direction" ListTextField="Name" ListValueField="Code" UniqueName="WindDirection" ColumnEditorID="WindDirection" Visible="false" DropDownControlType="DropDownList"></telerik:GridDropDownColumn>
                       <telerik:GridDropDownColumn DataField="SeaStateCode" HeaderText="Sea State" ListTextField="Name" ListValueField="Code" UniqueName="SeaState" ColumnEditorID="SeaState" Visible="false" DropDownControlType="DropDownList"></telerik:GridDropDownColumn>   
                       <telerik:GridDropDownColumn DataField="SelectivityDeviceCode" HeaderText="Selectivity Device" ListTextField="nvcSelectivityDeviceName" ListValueField="intSelectivityDeviceID" UniqueName="SelectivityDevice" Visible="false" DropDownControlType="DropDownList"></telerik:GridDropDownColumn>                
                    </Columns>
                  </MasterTableView>
              </telerik:RadGrid>

And the table that contains the comboboxes is as follows:

<table class="tbldialog" id="Table1" cellspacing="1" cellpadding="1" width="500" border="0">
            <tr>
                <td><asp:label id="lblId" runat="server" CssClass="label">Observer Name</asp:label></td>
                <td>
                    <asp:DropDownList ID="ddlID" runat="server" DataSourceID="ODS_Observers" DataTextField="ObserverName" DataValueField="ObserverInitials" CssClass="inputLong" AutoPostBack="True"></asp:DropDownList>
                    <asp:ObjectDataSource ID="ODS_Observers" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="DS_DiscardsTableAdapters.USP_ObserversSelectTableAdapter"></asp:ObjectDataSource>
                  </td>
            </tr>
            <tr>
              <td><asp:Label ID="lblYear" runat="server" CssClass="label">Year:</asp:Label></td>
              <td>
               <asp:DropDownList ID="ddlYear" runat="server" AutoPostBack="True" CssClass="inputLong" DataSourceID="objTripCodeYears" DataTextField="TripYears" DataValueField="TripYears"></asp:DropDownList>
                  <asp:ObjectDataSource ID="objTripCodeYears" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataTripCodeYears" TypeName="TripCodeYearsTableAdapters.SelectYearsFromTripCodesByIDTableAdapter">
                     <SelectParameters>
                             <asp:ControlParameter ControlID="ddlID" Name="ObserverID" PropertyName="SelectedValue" Type="String" />
                         </SelectParameters>
                   </asp:ObjectDataSource>               
              </td>
            </tr>
                <tr>
                    <td><asp:label id="lblTripCode" runat="server" CssClass="label">Trip Code:</asp:label></td>
                    <td>
                    <asp:Label ID="lblTripCount" runat="server" CssClass="labelNoCount" Visible="false"></asp:Label>
                      <asp:DropDownList ID="ddlTripCode" runat="server" AutoPostBack="True" CssClass="inputLong" DataSourceID="objTripCodes" DataTextField="TripCode" DataValueField="TripCode"></asp:DropDownList>
                      <asp:ObjectDataSource ID="objTripCodes" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetDisTripCodesByIDAndYear" TypeName="TripCodeYearsTableAdapters.DisGetTripCodesByIDAndYearTableAdapter">
                       <SelectParameters>
                             <asp:ControlParameter ControlID="ddlID" Name="ObserverID" PropertyName="SelectedValue" Type="String" />
                             <asp:ControlParameter ControlID="ddlYear" Name="TripYear" PropertyName="SelectedValue" Type="Int32" />
                         </SelectParameters>
                     </asp:ObjectDataSource>
                   </td>
                </tr>
             </table>

Whenever the ddlTripCode SelectedValue is changed, the grid needs rebound. The problem is that when ddlTripCode SelectedValue changes, the NeedDataSource appears to be retaining the PREVIOUS SelectedValue, not the new one.

Here is my NeedDataSource code:

Protected Sub RDHauls_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) Handles RDHauls.NeedDataSource
            ' Get the Trip Code for binding the grid
            TripCode = RTrim(CStr(ddlTripCode.SelectedValue))
            ' Get all the haul(s) details for the trip code selected
            Dim ds As New DSHaulsTableAdapters.DisGetHaulDetailsByTripcodeTableAdapter
            ' Bind the grid to the haul(s) details
            RDHauls.DataSource = ds.GetHaulDetailsByTripcode(TripCode)
        End Sub

Any advice please? I have to keep re-selecting a ddlTripCode SelectedValue to get the grid to bind to the correct data.

Thank you, Ida
Kostadin
Telerik team
 answered on 20 Dec 2013
1 answer
106 views
Can i change the pagesize of the loadpersister being loaded? It seems to be that I am having a tunnel vision atm and can't think of any work around

    Dim LoadPersister As New GridSettingsPersister(RadGrid1)
LoadPersister.LoadSettings(*some string or session here*)
RadGrid1.Rebind()

this is the codebehind of loading the loadingpersister any process that I can change the pagesize being rebinded?

Thanks in advance
Daniel
Telerik team
 answered on 20 Dec 2013
1 answer
88 views
guys, I've  got a rad filter w/ several filters in there - for this purpose only one of the field editors is shown.
in the code behind for this filter in the OnItemCommand, i'm able to default it to zero - is there a way to also make this one filter "read only"
when it's chosen? or would I need a special "custom class"?
thanks for any Help on this.
rik

<telerik:RadFilter ID="WorkOrderItemsRadFilter" runat="server" Skin="WebBlue" ShowApplyButton="true"

OnApplyExpressions="WorkOrderItemsRadFilter_Apply" ApplyButtonText="Filter Work Order Items"

OnPreRender="WorkOrderItemsRadFilter_PreRender" OnFieldEditorCreating="RadFilter_FieldEditorCreating" OnItemCommand="WorkOrderItemsRadFilter_ItemCommand">

<FieldEditors>

<telerik:RadFilterNumericFieldEditor FieldName="MATERIALGRADEID" DisplayName="Empty Grade" DataType="System.Int32" />
</FieldEditors>
</telerik:RadFilter>
CODE BEHIND IN THE ON ITEM COMMAND - TAKEN OUT OF CONTEXT:

else if (myCmdArg == "MATERIALGRADEID")

{

e.Canceled = true;

RadFilterStartsWithFilterExpression item = new RadFilterStartsWithFilterExpression(e.CommandArgument.ToString());

//replace the current item with the new item that has the default filter set to StartsWith

int i = e.ExpressionItem.ItemIndex;

e.ExpressionItem.OwnerGroup.Expression.Expressions.RemoveAt(i);

e.ExpressionItem.OwnerGroup.Expression.Expressions.Insert(i, item);

item.Value = "0";//DEFAULT THIS TO ZERO

WorkOrderItemsRadFilter.RecreateControl();

 

 

 

Viktor Tachev
Telerik team
 answered on 20 Dec 2013
1 answer
112 views
Hi 

I have a grid rgrdServiceJob which has a number of columns, one of which uses a RadToolTipManager to show a user control CallDetails.ascx. I can pass in the service job number from the grid using the Public Property on the control - no problem there - and populate the tooltip with some data - groovy.

Now I need to click a button on the control which will then hide the control and expand the calling grid row  - this is where I'm stuck and could do with a little advice .

Steve
Eyup
Telerik team
 answered on 20 Dec 2013
1 answer
216 views
Hi
i have a buttoncolumn with buttontype as image . I want to create a hover effect for the button only. How to get it?
Shinu
Top achievements
Rank 2
 answered on 20 Dec 2013
1 answer
479 views
Hello

I'm building a photo cropper that loads an editor via html5 filereader.  The editor is loaded via a radAsyncUploader set to manual upload.  When the user finishes cropping they click upload, and the radAsyncUploader hits my custom handler.

That all is working fine -  however, I can't for the life of me get the server side FileUploaded event to work.  Here's my control markup:

<div class="buttons">
    <div>
        <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" OnClientFileDropped="RadAsyncUpload1_FileDropped" OnClientFileSelected="RadAsyncUpload1_FileSelected"
            OnClientFilesSelected="" HideFileInput="True" Width="221px" HttpHandlerUrl="~/CustomHandlers/CropImage.ashx" ManualUpload="True"
            OnClientFileUploaded="RadAsyncUpload1_FileUploaded" OnClientFileUploading="RadAsyncUpload1_FileUploading" EnableInlineProgress="True"
            DisableChunkUpload="True" CssClass="radButton" DropZones="#generated" OnClientFileUploadRemoved="RadAsyncUpload1_FileUploadRemoved"
            Skin="Default"></telerik:RadAsyncUpload>
    </div>
    <div >
        <input ID="UploadButton" class="upload-file" type="button" value="Upload"  onclick="startUpload()"/></div>
    <div style="clear: both">
    </div>
Server side I have this:
protected void Page_Load(object sender, EventArgs e)
{
    RadAsyncUpload1.PostbackTriggers = new string[] { "UploadButton" };
}
 
protected void RadAsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
{
    //nothing yet!
}
I have tried subscribing to FileUploaded in Page_Load, as well as triggering a postpack in the client-side RadAsyncUpload1_FileUploaded
handler.  Nothing so far has worked.  Appreciate any help on this!

update:  I modified a sample project you guys provided showing implementation.  The event fired when using a custom handler as soon as the upload button was clicked.  However, the handler fires as soon as the file is selected.  I therefore changed manual upload to true and added an upload button click event handler to start the upload.  In this setup, the handler runs when the upload button is clicked (this is what I need to happen), but the fileUploaded event never fires.

here's the page code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
 
<%@ Register Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
    <title></title>
 
 
 
</head>
<body>
    <form runat="server">
 
        <script type="text/javascript">
            
            
         
        </script>
        <telerik:RadScriptManager ID="ScriptManager1" runat="server" />
 
        <telerik:RadAsyncUpload ID="radAsyncUpload" runat="server" EnableInlineProgress="true" OnFileUploaded="RadAsyncUpload1_FileUploaded"
             MaxFileInputsCount="1" OnClientFileUploaded="onClientFileUploaded" OnClientFileUploadRemoved="onClientFileUploadRemoved"
             PostbackTriggers="radUpload" HttpHandlerUrl="~/CustomHandler.ashx" DisableChunkUpload="True" ManualUpload="True" OnClientFilesSelected="onClientFileSelected" />
 
        <telerik:RadButton ID="radUpload" runat="server" Text="Upload" Enabled="false" CausesValidation="false" OnClientClicked="radUpload_Clicked" />
 
        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
            <script type="text/javascript">
                function onClientFileUploaded(sender, args) {
                    var radUpload = $find("<%=radUpload.ClientID %>");
 
              radUpload.set_enabled(true);
          }
                function onClientFileUploadRemoved(sender, args) {
                    var radUpload = $find("<%=radUpload.ClientID %>");
 
              radUpload.set_enabled(false);
          }
                function onClientFileSelected(sender, args) {
                    var radUpload = $find("<%=radUpload.ClientID %>");
 
              radUpload.set_enabled(true);
          }
            function radUpload_Clicked(sender,args)
            {
                var upload = $find('<%=radAsyncUpload.ClientID%>');
                upload.startUpload();
            }
          </script>
        </telerik:RadScriptBlock>
 
 
 
 
 
 
    </form>
</body>
</html>




Thanks,
Michael
Kate
Telerik team
 answered on 20 Dec 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?