Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
438 views

Hello

I would like to know if there is a way to determine the range of the X and Y axis on a "zoomed" graph.  Particularly when we draw a box on a chart, is there a way to figure out the X and Y ranges of the zoomed/boxed section on Javascript ?

Thanks !

 

 

Ahmet
Top achievements
Rank 1
 answered on 29 May 2018
11 answers
994 views
Hi I have defined a programmatically chart as follows:

ASPX Part:
<telerik:RadHtmlChart ID="RadHtmlChartSerie" runat="server" Transitions="true" Skin="Office2007" >
                                                          <Appearance>
                                                              <FillStyle BackgroundColor="White"></FillStyle>
                                                          </Appearance>
                                                          <ChartTitle>
                                                              <Appearance Align="Center" BackgroundColor="White" Position="Top"></Appearance>
                                                          </ChartTitle>
                                                          <Legend>
                                                              <Appearance BackgroundColor="White" Position="Bottom"></Appearance>
                                                          </Legend>
 
                                                          <PlotArea>
                                                              <Appearance>
                                                                  <FillStyle BackgroundColor="White"></FillStyle>
                                                              </Appearance>
                                                              <XAxis DataLabelsField="Dia">
                                                                  <LabelsAppearance RotationAngle="90" />
                                                                  <TitleAppearance Text="Fecha" />
                                                                  <MajorGridLines Color="#EFEFEF" Width="1"></MajorGridLines>
                                                                  <MinorGridLines Color="#F7F7F7" Width="1"></MinorGridLines>
                                                                  <TitleAppearance Position="Center" RotationAngle="0" Text="Día"></TitleAppearance>
                                                              </XAxis>
                                                              <YAxis>
 
                                                                  <LabelsAppearance />
                                                                  <TitleAppearance Text="Valor" />
                                                                  <MajorGridLines Color="#EFEFEF" Width="1"></MajorGridLines>
                                                                  <MinorGridLines Color="#F7F7F7" Width="1"></MinorGridLines>
                                                              </YAxis>
                                                          </PlotArea>
 
 
                                                          <ChartTitle Text="Serie Analizada">
                                                          </ChartTitle>
                                                      </telerik:RadHtmlChart>

And on The server part,  add  Dynamically a scatter series to the Chart:

CS:
//Declare a ScatterSeries
       ScatterSeries pointMinimos = new ScatterSeries();
        pointMinimos.Name = "Mínimo";
        pointMinimos.Appearance.FillStyle.BackgroundColor = Color.Green;
        pointMinimos.LabelsAppearance.Visible = false;
        pointMinimos.TooltipsAppearance.DataFormatString = "{1}";
        pointMinimos.TooltipsAppearance.Color = Color.White;
 
//Fills The ScatterSeries
        foreach (DataRow dr in dsMaxMin.Tables["dtMinimos"].Rows)
        {           
          
ScatterSeriesItem itemCierre = new ScatterSeriesItem(Convert.ToDecimal(dr["X"].ToString()), Convert.ToDecimal(dr["Y"].ToString()));           
             
            pointMinimos.SeriesItems.Add(itemCierre);
 
        }
//Add The series to the Chart with XAxis numerical values
        RadHtmlChartSerie.PlotArea.Series.Add(pointMinimos);
 
//Clear the XAxis Items
      RadHtmlChartSerie.PlotArea.XAxis.Items.Clear();  
 
//Here the column "Dia" have a date string
foreach (DataRow row in dsMaxMin.Tables["dtMinimos"].Rows)
                            {
 
                                string formattedLabelText = string.Format("{0:MMMM}", row["Dia"].ToString());
                                AxisItem newAxisItem = new AxisItem(formattedLabelText);
 
                                RadHtmlChartSerie.PlotArea.XAxis.Items.Add(newAxisItem);
 
                            }

But, the labels on the X Axis dosn't changes , and have the numerical label.
 
I check the link  http://www.telerik.com/help/aspnet-ajax/htmlchart-date-axis.html but only works with databound RadHtmlChart which automatically detects the DateTime object data in the column/field and adjusts the distribution of the items on the XAxis.

There is a way to change the labels once defined the series in the server code?
Thanks A lot¡¡¡

Regards
Jorge RR
David
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 29 May 2018
0 answers
141 views

Hi, I'm trying to display the scheduler control in YearView mode and I am getting an error.

 

Cannot create an object of type 'Telerik.Web.UI.SchedulerViewType' from its string representation 'YearView' for the 'SelectedView' property.
at System.Web.UI.TemplateParser.ProcessException(Exception ex)
at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)

I get the same error even if I use the sample from the Telerik site. Here is the ascx

 

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EventCalendarDisplay.ascx.cs" Inherits="###.Web.iParts.Events.EventCalendar.EventCalendarDisplay" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%--Get around a z-index bug where event calendar header is drawn over top of fold down menus 'rsHeader' class only appears in this telerik calendar widget.--%>
<telerik:RadAjaxPanel ID="ContentPanel" runat="server" Visible="true" EnableAJAX="true" EnableViewState="true" LoadingPanelID="LoadingPanel">
    <asp:Panel runat="server" Translate="Yes">
        <telerik:RadScheduler runat="server" ID="Calendar" Height="600px"
            DayStartTime="08:00:00" DayEndTime="21:00:00"
            FirstDayOfWeek="Sunday" LastDayOfWeek="Saturday"
            SelectedView="MonthView"
            EnableDescriptionField="true"
            AppointmentStyleMode="Default"
            OnNavigationComplete="SchedulerNavigationComplete"
            OnAppointmentDataBound="SchedulerAppointmentDataBound"
            OnAppointmentClick="SchedulerAppointmentClick"
            DataKeyField="Id" DataSubjectField="Subject" DataDescriptionField="Description"
            AllowDelete="false"
            ReadOnly="true"
            DataStartField="Start" DataEndField="End"
            DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentId"
            DataReminderField="Reminder"
            CustomAttributeNames="StartText,EndText">
            <AdvancedForm Modal="true" />
            <AdvancedEditTemplate>
                <%--Certain set of CSS classes should be set when the Form is modal.--%>
                <div class="rsAdvancedEdit rsAdvancedModal rsEventCalendar" style="position: relative">
                    <div class="rsModalBgTopLeft">
                    </div>
                    <div class="rsModalBgTopRight">
                    </div>
                    <div class="rsModalBgBottomLeft">
                    </div>
                    <div class="rsModalBgBottomRight">
                    </div>
                    <div class="rsAdvTitle">
                        <h1 class="rsAdvInnerTitle">
                            <%# Container.Appointment.Subject %>
                        </h1>
                        <asp:LinkButton runat="server" ID="LinkButton1" CssClass="rsAdvEditClose" CommandName="Cancel"
                            CausesValidation="false" ToolTip='<%# Container.Appointment.Owner.Localization.AdvancedClose %>'>
                                        <%# Container.Appointment.Owner.Localization.AdvancedClose%>
                        </asp:LinkButton>
                    </div>
                    <div class="rsAdvContentWrapper">
                        <div class="PanelFieldLeft">
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("Description") %>'></asp:Label>
                        </div>
                        <div class="PanelFieldLeft">
                            <asp:Label ID="StartInput" Text='<%# Bind("StartText") %>' runat="server">
                            </asp:Label><br />
                        </div>
                        <div class="PanelFieldLeft">
                            <asp:Label ID="EndInput" Text='<%# Bind("EndText") %>' runat="server">
                            </asp:Label><br />
                        </div>
                    </div>
                </div>
            </AdvancedEditTemplate>
        </telerik:RadScheduler>
    </asp:Panel>
</telerik:RadAjaxPanel>
<telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel" Transparency="50" IsSticky="false"
    BackColor="LightGray" BackgroundPosition="Center">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="save">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="AjaxPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

 

 

Ross
Top achievements
Rank 1
 asked on 29 May 2018
2 answers
524 views
I do download function inside RadGrid, and want to show loadingpanel when press download button and hide loadingpanel when download finish.
Now, I can download file and show loadingpanel but can't hide loadingpanel.
Please Help me. Thanks.
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
  
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        var currentLoadingPanel = null;
        var currentUpdatedControl = null;
        function RequestStart(sender, args) {
            args.set_enableAjax(false);
            currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID%>");
            currentUpdatedControl = "<%= RadGrid1.ClientID%>";
            currentLoadingPanel.show(currentUpdatedControl);
        }
        function ResponseEnd(sender, args) {
            //hide the loading panel and clean up the global variables            
            if (currentLoadingPanel != null) {
                currentLoadingPanel.hide(currentUpdatedControl);
            }
            currentUpdatedControl = null;
            currentLoadingPanel = null;
        }
    </script>
</telerik:RadCodeBlock>
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
    <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd"></ClientEvents>
      
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Glow">
</telerik:RadAjaxLoadingPanel>
 
 
<telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" Culture="zh-TW"
        DataSourceID="SqlDataSource1" GridLines="None" OnItemCommand="RadGrid1_ItemCommand">
        <MasterTableView AllowNaturalSort="False" AutoGenerateColumns="False"
            CommandItemDisplay="Top" DataKeyNames="applylist_no" AllowPaging ="true" PageSize ="15"
            DataSourceID="SqlDataSource1" NoMasterRecordsText="無資料" HierarchyLoadMode="Client"
            EnableHierarchyExpandAll="true">
            <DetailTables>
                <telerik:GridTableView runat="server" DataSourceID="SqlDataSource2"
                    AutoGenerateColumns="False" HierarchyLoadMode ="Client"  >
                    <ParentTableRelation>
                        <telerik:GridRelationFields DetailKeyField="applylist_no"
                            MasterKeyField="applylist_no" />
                    </ParentTableRelation>
                    <CommandItemSettings ShowAddNewRecordButton="False" ShowRefreshButton="False" />
 
                    <Columns>
                        <telerik:GridBoundColumn DataField="data_type" FilterControlAltText="Filter type column"
                            HeaderText="類別" SortExpression="data_type" UniqueName="data_type">
                        </telerik:GridBoundColumn>
                        <telerik:GridCalculatedColumn UniqueName="year" SortExpression="year_history" HeaderText="年份"
                            DataFields="year_history,year_ipccar4,year_wrf" Expression='{0} + "" + {1}+ "" + {2}'
                            FooterText="CalculatedColumn footer">
                        </telerik:GridCalculatedColumn>
                        <telerik:GridCalculatedColumn DataFields="parameter_history,parameter_ipccar4,parameter_tri"
                            Expression='{0} + "" + {1}+ "" + {2}' FilterControlAltText="Filter parameter column"
                            HeaderText="參數" UniqueName="parameter">
                        </telerik:GridCalculatedColumn>
                        <telerik:GridBoundColumn DataField="theme" FilterControlAltText="Filter theme column"
                            HeaderText="情境" SortExpression="theme" UniqueName="theme">
                        </telerik:GridBoundColumn>
                        <telerik:GridCalculatedColumn DataFields="area_history,area_ipccar4,area_wrf" Expression='{0} + "" + {1}+ "" + {2}'
                            FilterControlAltText="Filter area column" HeaderText="地區" UniqueName="area">
                        </telerik:GridCalculatedColumn>
                        <telerik:GridTemplateColumn  HeaderText="審核是否通過" SortExpression="reject" UniqueName="reject">
                            <ItemTemplate >
                                <asp:Label ID="Label2" runat="server" Text='<%# WrapText(Eval("reject"))%>'></asp:Label>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
 
                    <ItemStyle HorizontalAlign="Center" />
                    <AlternatingItemStyle HorizontalAlign="Center" />
                    <HeaderStyle HorizontalAlign="Center" />
                    <CommandItemStyle HorizontalAlign="Center" />
                </telerik:GridTableView>
            </DetailTables>
 
 
            <CommandItemSettings ShowAddNewRecordButton="False" ShowRefreshButton ="false" />
            <Columns>
                <telerik:GridBoundColumn DataField="applylist_no"
                    FilterControlAltText="Filter applylist_no column" HeaderText="申請單號"
                    ReadOnly="True" SortExpression="applylist_no" UniqueName="applylist_no">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="date_apply" DataType="System.DateTime"
                    FilterControlAltText="Filter date_apply column" HeaderText="送審日期"
                    SortExpression="date_apply" UniqueName="date_apply">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="deadline_download"
                    DataType="System.DateTime"
                    FilterControlAltText="Filter deadline_download column"
                    HeaderText="下載有效期限" SortExpression="deadline_download"
                    UniqueName="deadline_download" DataFormatString="{0:yyyy/MM/dd}">
                </telerik:GridBoundColumn>
                <telerik:GridButtonColumn ButtonType="PushButton" CommandName="Download"
                    FilterControlAltText="Filter download column" HeaderText="下載" Text="下載檔案"
                    UniqueName="download">
                </telerik:GridButtonColumn>
            </Columns>
            <ItemStyle HorizontalAlign="Center" />
            <AlternatingItemStyle HorizontalAlign="Center" />
            <HeaderStyle HorizontalAlign="Center" />
            <CommandItemStyle HorizontalAlign="Center" />
        </MasterTableView>
    </telerik:RadGrid>
期涛
Top achievements
Rank 1
 answered on 29 May 2018
9 answers
437 views
Greetings,

Since I want to be as short as possible here is the thing...
I implemented File Explorer fetching files from a Shared folder, exactly as this post indicated (post). However while I fetch the data and I can see the file hierarchy and the files, when I am trying to open the files I get this message:

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Functions/Ethnological/FileSystemHandler.ashx


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272           


That is a "normal" Http error... Which is pretty weird since, as I said, I can see the files... In the shared folder I have full read/write etc permissions... When I tried accessing these files through a local folder, everything went as expected and I also had preview (which now I do not).

Still, if you want to see the code, just in case here it is...

In .cs
string[] viewPaths = new string[]
                    {
                        @"\\cmarinis-pc\ArchiveImages"
                    };
 
                    string[] uploadPaths = new string[]
                    {
                        @"\\cmarinis-pc\ArchiveImages"
                    };
 
                    string[] deletePaths = new string[] 
                    {
                        @"\\cmarinis-pc\ArchiveImages"
                    };
 
                    rfExplorer.Configuration.ViewPaths = viewPaths;
                    rfExplorer.Configuration.SearchPatterns = new[] { "*.*" };
                    rfExplorer.Configuration.ContentProviderTypeName = typeof(CustomFileSystemProvider).AssemblyQualifiedName;

In .aspx
<telerik:RadFileExplorer runat="server" ID="rfExplorer" Width="600px" Height="270px"
    OnClientItemSelected="OnClientItemSelected">
</telerik:RadFileExplorer>

and the mapping file.

<?xml version="1.0" encoding="utf-8" ?>
<CustomFileBrowserProvider>
  <Paths>
    <genericHandlerPath>FileSystemHandler.ashx</genericHandlerPath>
  </Paths>
  <Mappings>
    <Mapping>
      <PhysicalPath>
        <![CDATA[\\cmarinis-pc\ArchiveImages]]>
      </PhysicalPath>
      <VirtualPath><![CDATA[Shared/]]></VirtualPath>
    </Mapping>
 
  </Mappings>
</CustomFileBrowserProvider>


So where could this problem be???

PS: Another crucial, but a little out of the topic matter, is that I want to open .tif images with the explorer. I can open .tif images with the windows photo viewer, but not with the explorer. Any ideas???

Thanks in advance :)
Konstantinos Marinis
Vessy
Telerik team
 answered on 29 May 2018
3 answers
485 views

     Hi.  I am trying to convert an asp ImageButton to a RadImageButton because there are some useful features that would make my life a bit easier.  However, the binding for the image URL won't work - at least the way I am doing it.

So this works (both are in the same ListView):

<asp:ImageButton ID="im" runat="server" ImageUrl='<%# Eval("ImgUrl") %>'  /> 

 

But this:

<telerik:RadImageButton runat="server" ID="itemImageButton" ' >
     <Image Url='<%# Eval("ImgUrl") %>' />
 </telerik:RadImageButton>  

 

gives me an error something like Telerik.Web.UI.ButtonBase.ButtonImage does not have a DataBinding event.  

Is it possible to do this with the RadImageButton?

Vessy
Telerik team
 answered on 28 May 2018
5 answers
184 views

Hello,

It seems for years the many issues with frozen columns have existed in regards to smoothness, actual scrolling (not hiding and showing divs) and row heights changing as one scrolls

The ability to change this is surely possible as the Kendo demo shows. 

Kendo Frozen Columns (nice smooth implementation)

ASP.NET AJAX Frozen Columns (skippy implementation)

In the past I have received responses both publicly and privately that the ASP.NET AJAX feature set is essentially mature and complete. I understand it is mature but it is surely not a complete set of features that never need changes or additions.

Will there be updates to take care of these type of things or is this now a dead product?

Thanks,

John

 

Marin Bratanov
Telerik team
 answered on 28 May 2018
1 answer
9.0K+ views
Hellow, there is a we site, but i didnt programming...i just want to know how this website was created it, but some of the things i need to know ,its version of telerik do my website has....or where to find it-
Please i hope you can help me
Vessy
Telerik team
 answered on 28 May 2018
1 answer
345 views

I am having problems trying to get a radAsyncUpload control to show up in a row of a radGrid when the row is selected by clicking anyplace on that row.  I am guessing I need to toggle the radGrid into Edit mode once a row is selected?  I have the radAsyncUpload control in the EditItemTemplate of the radGrid for the "Upload" column.  I would then like for the single upload to be performed before any other row may be selected to upload another file.

RadPageView4 is the section in question.

.aspx

001.<telerik:RadTabStrip RenderMode="Lightweight" ID="rdTab" runat="server" Orientation="HorizontalTop"Align="Left" MultiPageID="RadMultiPage2" SelectedIndex="0">
002.    <Tabs>
003.        <telerik:RadTab Text="Status" Selected="True" ImageUrl="~/images/RedDot.png" ></telerik:RadTab>
004.        <telerik:RadTab Text="Ship Group"></telerik:RadTab>
005.        <telerik:RadTab Text="Tube Groups"></telerik:RadTab>
006.        <telerik:RadTab Text="Regulatory Work"></telerik:RadTab>
007.    </Tabs>
008.</telerik:RadTabStrip>
009. 
010.<telerik:RadMultiPage ID="RadMultiPage2" runat="server" SelectedIndex="0" Width="50%">
011.        <telerik:RadPageView ID="RadPageView1" runat="server" Width="100%">
012.            <br/>
013.            Approved: <asp:Label ID="lblApproved" runat="server" Text="False"></asp:Label>
014.            <br/><br/>
015.            <asp:Button ID="btnApproval" runat="server" Text="Submit Approval" Enabled="False"/>
016.        </telerik:RadPageView>
017. 
018.        <telerik:RadPageView ID="RadPageView2" runat="server" Width="100%">
019.        <asp:DetailsView ID="dvShipGroups" runat="server" DataSourceID="sqldsDVSG"AutoGenerateRows="False" DefaultMode="ReadOnly" DataKeyNames="SGID"
020.                         BorderStyle="None" Width="250px" CellPadding="3" GridLines="None"CellSpacing="2" InsertRowStyle-Wrap="False" RowStyle-Wrap="False">
021.            <FieldHeaderStyle Wrap="False" HorizontalAlign="Left" />
022.            <Fields>
023.                <asp:BoundField DataField="SGID" HeaderText="Ship Group#:" ReadOnly="True">
024.                </asp:BoundField>
025.                <asp:BoundField DataField="isApproved" HeaderText="Approved:"ReadOnly="True">
026.                </asp:BoundField>
027.                <asp:BoundField DataField="Qty" HeaderText="Qty:" ReadOnly="True">
028.                </asp:BoundField>
029.                <asp:BoundField DataField="ShipFromGLID" HeaderText="Ship From:"ReadOnly="True">
030.                </asp:BoundField>
031.                <asp:BoundField DataField="ShipToGLID" HeaderText="Ship To:"ReadOnly="True">
032.                </asp:BoundField>
033.                <asp:BoundField DataField="ShipDate" HeaderText="ShipDate:"DataFormatString="{0:MM/dd/yyyy}" ReadOnly="True">
034.                </asp:BoundField>
035.                <asp:BoundField DataField="ShipDocName" HeaderText="Shipment Form:"ReadOnly="True">
036.                </asp:BoundField>
037.                <asp:BoundField DataField="isRegWorkDone" HeaderText="Reg Work Done:"ReadOnly="True">
038.                </asp:BoundField>
039.                <asp:BoundField DataField="isShipped" HeaderText="Shipped:" ReadOnly="True"></asp:BoundField>
040.            </Fields>
041.        </asp:DetailsView>
042.    </telerik:RadPageView>
043. 
044.    <telerik:RadPageView ID="RadPageView3" runat="server" Width="100%">
045.        <telerik:RadGrid ID="rgTG" runat="server" RenderMode="Lightweight"AutoGenerateColumns="False" CellSpacing="-1" AllowSorting="True" width="100%" Visible="True"
046.                     AllowAutomaticUpdates="True" DataSourceID="sqldsRGTG" >
047.            <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
048.            <ClientSettings  EnableRowHoverStyle="True" Selecting-AllowRowSelect="True"EnablePostBackOnRowClick="True">
049.                <Scrolling AllowScroll="False" UseStaticHeaders="False"/>
050.            </ClientSettings>
051.            <MasterTableView DataSourceID="sqldsRGTG" DataKeyNames="TGID"EditMode="InPlace" CssClass="MyGridClass">
052.                <Columns>
053.                    <telerik:GridBoundColumn DataField="TGID" HeaderText="TGID"SortExpression="TGID" UniqueName="TGID" ReadOnly="True">
054.                    </telerik:GridBoundColumn>
055.                    <telerik:GridBoundColumn DataField="CreatedBy" HeaderText="Created By" SortExpression="CreatedBy" UniqueName="CreatedBy" ReadOnly="True">
056.                    </telerik:GridBoundColumn>
057.                    <telerik:GridBoundColumn DataField="Qty" HeaderText="Qty"SortExpression="Qty" UniqueName="Qty" ReadOnly="True">
058.                    </telerik:GridBoundColumn>
059.                </Columns>
060.            </MasterTableView>
061.            <FilterMenu RenderMode="Lightweight"></FilterMenu>
062.            <HeaderContextMenu RenderMode="Lightweight"></HeaderContextMenu>
063.        </telerik:RadGrid>
064.    </telerik:RadPageView>
065. 
066.    <telerik:RadPageView ID="RadPageView4" runat="server" Width="100%">
067.        <telerik:RadGrid ID="rgRegWork" runat="server" RenderMode="Lightweight"AutoGenerateColumns="False" CellSpacing="-1" AllowSorting="True" width="100%" Visible="True"
068.                         AllowAutomaticUpdates="True" DataSourceID="sqldsRGRW"CssClass="MyGridClass">
069.                <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
070.                <ClientSettings  EnableRowHoverStyle="True" Selecting-AllowRowSelect="True"EnablePostBackOnRowClick="True">
071.                    <Scrolling AllowScroll="False" UseStaticHeaders="False" />
072.                    <Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true"AllowResizeToFit="true" />
073.                </ClientSettings>
074.                <MasterTableView DataSourceID="sqldsRGRW" DataKeyNames="RWID"EditMode="InPlace" CssClass="MyGridClass">
075.                    <Columns>
076.                        <telerik:GridBoundColumn DataField="RWID" HeaderText="RWID"SortExpression="RWID" UniqueName="RWID" ReadOnly="True">
077.                        </telerik:GridBoundColumn>
078.                        <telerik:GridBoundColumn DataField="RegulatoryWork"HeaderText="Regulatory Work" SortExpression="RegulatoryWork" UniqueName="RegulatoryWork"ReadOnly="True">
079.                        </telerik:GridBoundColumn>
080.                        <telerik:GridTemplateColumn UniqueName="Upload"HeaderText="File Upload" Visible="True">
081.                            <ItemTemplate>
082.                                  
083.                            </ItemTemplate>
084.                            <EditItemTemplate>
085.                                <telerik:RadAsyncUpload RenderMode="Lightweight"ID="RadAsyncUpload1" TargetFolder="Uploads" HideFileInput="True" DisablePlugins="true"
086.                                    AllowedFileExtensions="pdf" MaxInput="1"runat="server" OnFileUploaded="rauFileUpload_FileUploaded"
087.                                    MultipleFileSelection="Disabled"OverwriteExistingFiles="true" ></telerik:RadAsyncUpload>
088.                            </EditItemTemplate>
089.                        </telerik:GridTemplateColumn>
090.                        <telerik:GridBoundColumn DataField="UpFName" HeaderText="File Name" SortExpression="UpFName" UniqueName="UpFName" ReadOnly="True">
091.                        </telerik:GridBoundColumn>
092.                    </Columns>
093.                </MasterTableView>
094.                <FilterMenu RenderMode="Lightweight"></FilterMenu>
095.                <HeaderContextMenu RenderMode="Lightweight"></HeaderContextMenu>
096.         </telerik:RadGrid>
097.         <asp:Button ID="btnUpload" runat="server" Text="Upload Files" />
098.    </telerik:RadPageView>
099.</telerik:RadMultiPage>

.aspx.vb

01.Private Sub rgRegWork_SelectedIndexChanged(sender As Object, e As EventArgs) HandlesrgRegWork.SelectedIndexChanged
02. 
03.        Dim dataItem As GridDataItem =CType(rgRegWork.SelectedItems(rgRegWork.SelectedItems.Count - 1), GridDataItem)
04.        Dim RWID As String = dataItem.GetDataKeyValue("RWID").ToString()
05. 
06.        'dataitem.Rows(rowIndex).RowState = DataControlRowState.Edit
07. 
08.        'For Each selectedItem As GridDataItem In rgRegWork.SelectedItems
09.        '    Dim index As Integer = selectedItem.ItemIndex
10.        'Next
11. 
12.        'For Each item In rgRegWork.MasterTableView.Items
13.        '    'rgRegWork.Rows(rowIndex).RowState = DataControlRowState.Edit
14.        '    Dim editableItem = TryCast(item, GridEditableItem)
15. 
16.        '    If editableItem Is Nothing Then
17.        '       editableItem.Edit = True
18.        '        rgRegWork.Rebind()
19.        '    End if
20.        'Next
21. 
22.        'rgRegWork.MasterTableView.EditMode = GridEditMode.EditForms
23. 
24.        'Dim rowIndex As Integer = rgRegWork.GridViewRow.RowIndex
25.        'rgRegWork.SelectedIndex = rowIndex
26.        'Me.EditIndex = rowIndex
27.        'Me.Rows(rowIndex).RowState = DataControlRowState.Edit
28. 
29. 
30.        'For Each item In rgRegWork.MasterTableView.Items
31.        '    Dim editableItem = TryCast(item, GridEditableItem)
32.        '    If editableItem Is Nothing Then Continue For
33.        '    editableItem.Edit = True
34.        '    rgRegWork.Rebind()
35.        'Next
36. 
37.    End Sub
38. 
39. 
40. Protected Sub rauFileUpload_FileUploaded(ByVal sender As Object, ByVal e AsTelerik.Web.UI.FileUploadedEventArgs)
41. 
42.        Using conn As NewSqlConnection(ConfigurationManager.ConnectionStrings("CassavaSeedTrackerConnectionString").ConnectionString)
43.            conn.Open()
44.            'Dim sql As String = "UPDATE [RegWorkDetail] SET UpFName=@FName WHERE SGID=@SGID AND RWID=@RWID"
45.            Dim sql As String = "UPDATE [RegWorkDetail] SET UpFName=@FName WHERE SGID=@SGID"
46.            Dim cmd As New SqlCommand(sql, conn)
47.            cmd.Parameters.AddWithValue("@FName", e.File.getName())
48.            cmd.Parameters.AddWithValue("@SGID", Session("sSGID"))
49.            'cmd.Parameters.AddWithValue("@RWID", Session("sSGID"))
50.            cmd.ExecuteNonQuery()
51.            sqldsRGRW.SelectCommand = "SELECT rw.*, rwd.UpFName FROM [RegWork] rw LEFT JOIN [RegWorkDetail] rwd ON rw.RWID=rwd.RWID WHERE GLID = (SELECT ShipToGLID FROM [ShipGroups] WHERE SGID=@SGID) AND rwd.SGID=@SGID"
52.            sqldsRGRW.SelectParameters.Clear()
53.            sqldsRGRW.SelectParameters.Add("SGID", CType(Session("sSGID"), String))
54.            sqldsRGRW.DataBind()
55.        End Using
56.         
57.    End Sub

01.Private Sub rgRegWork_SelectedIndexChanged(sender As Object, e As EventArgs) Handles rgRegWork.SelectedIndexChanged
02. 
03.        Dim dataItem As GridDataItem = CType(rgRegWork.SelectedItems(rgRegWork.SelectedItems.Count - 1), GridDataItem)
04.        Dim RWID As String = dataItem.GetDataKeyValue("RWID").ToString()
05. 
06.        'dataitem.Rows(rowIndex).RowState = DataControlRowState.Edit
07. 
08.        'For Each selectedItem As GridDataItem In rgRegWork.SelectedItems
09.        '    Dim index As Integer = selectedItem.ItemIndex
10.        'Next
11. 
12.        'For Each item In rgRegWork.MasterTableView.Items
13.        '    'rgRegWork.Rows(rowIndex).RowState = DataControlRowState.Edit
14.        '    Dim editableItem = TryCast(item, GridEditableItem)
15. 
16.        '    If editableItem Is Nothing Then
17.        '       editableItem.Edit = True
18.        '        rgRegWork.Rebind()
19.        '    End if
20.        'Next
21. 
22.        'rgRegWork.MasterTableView.EditMode = GridEditMode.EditForms
23. 
24.        'Dim rowIndex As Integer = rgRegWork.GridViewRow.RowIndex
25.        'rgRegWork.SelectedIndex = rowIndex
26.        'Me.EditIndex = rowIndex
27.        'Me.Rows(rowIndex).RowState = DataControlRowState.Edit
28. 
29. 
30.        'For Each item In rgRegWork.MasterTableView.Items
31.        '    Dim editableItem = TryCast(item, GridEditableItem)
32.        '    If editableItem Is Nothing Then Continue For
33.        '    editableItem.Edit = True
34.        '    rgRegWork.Rebind()
35.        'Next
36. 
37.    End Sub
38. 
39. 
40. Protected Sub rauFileUpload_FileUploaded(ByVal sender As Object, ByVal e As Telerik.Web.UI.FileUploadedEventArgs)
41. 
42.        Using conn As New SqlConnection(ConfigurationManager.ConnectionStrings("CassavaSeedTrackerConnectionString").ConnectionString)
43.            conn.Open()
44.            'Dim sql As String = "UPDATE [RegWorkDetail] SET UpFName=@FName WHERE SGID=@SGID AND RWID=@RWID"
45.            Dim sql As String = "UPDATE [RegWorkDetail] SET UpFName=@FName WHERE SGID=@SGID"
46.            Dim cmd As New SqlCommand(sql, conn)
47.            cmd.Parameters.AddWithValue("@FName", e.File.getName())
48.            cmd.Parameters.AddWithValue("@SGID", Session("sSGID"))
49.            'cmd.Parameters.AddWithValue("@RWID", Session("sSGID"))
50.            cmd.ExecuteNonQuery()
51.            sqldsRGRW.SelectCommand = "SELECT rw.*, rwd.UpFName FROM [RegWork] rw LEFT JOIN [RegWorkDetail] rwd ON rw.RWID=rwd.RWID WHERE GLID = (SELECT ShipToGLID FROM [ShipGroups] WHERE SGID=@SGID) AND rwd.SGID=@SGID"
52.            sqldsRGRW.SelectParameters.Clear()
53.            sqldsRGRW.SelectParameters.Add("SGID", CType(Session("sSGID"), String))
54.            sqldsRGRW.DataBind()
55.        End Using
56.         
57.    End Sub
Marin Bratanov
Telerik team
 answered on 28 May 2018
12 answers
282 views
I'm working with the RadPanelBar, and I am writing to ask if the Up Down Arrow indicator of a parent RadPanelItem can be wired up to a click event;

Clicking on a parent-level RadPanelItem (or child-level RadPanelItem) initiates a click event - however if the Up Down Arrow Indicator on the right part of the RadPanelItem is clicked, no event is registered in the C# code-behind;

Any insight is appreciated;
Waseem
Top achievements
Rank 1
 answered on 28 May 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?