Telerik Forums
UI for ASP.NET AJAX Forum
21 answers
154 views
There seems to be a bug with the PreventCollapse option of the RadPanelBar.

We use a RadMultiPage together with a RadTabStrip. The RadMultiPage is set to only Render the selected RadPageView. On a few of the RadPageViews, we use RadPanelBars, which we ALWAYS want to have expanded (as they serve mostly as visual aids boxing contents togehter). For the RadPanelBars we have set Expanded = true and PreventCollaps = true.

The first time you visit the RadPageView containing the RadPanelBars, this seem to work as the RadPanelBars are expanded. However, if you click back and forth on the RadTabStrip (changing RadPageViews), you will soon find that all RadPanelBars have collapsed, despite the fact that they should not be able to do so. If you expand them on the page, you can not collapse them again (other than repeating the above described method).

It seems like this must be due to a bug in the RadPanelBar, as the Expanded = true and PreventCollaps = true should prevent any collapse, right?

 
Kate
Telerik team
 answered on 10 Apr 2012
1 answer
79 views
Hello,

Can anyone explain how to achive drag drop facility on listview control of Kendo.I am relatively new to this so any information would be welcome !!

Thanks in advance
Pavlina
Telerik team
 answered on 10 Apr 2012
1 answer
61 views
I have a RadGrid with a GridTableView inside the DetailTables.  This GridTableView has a LinkButton in it's CommandItemTemplate.  When this button is clicked it fires off the RadGrid1_ItemCommand  I set e.item.OwnerTableView.IsItemInserted = false to Reset any rows in insert mode.  I then add three records into a table that populates the DetailTable.   I then issue e.Item.Edit = True to put the rows into edit mode.  What I get is all my records displayed including the three I just added but only some of the fields are in edit mode (screenshot attached with new records highlighted).  I know my problem has something to do with needing to rebind the DetailTable but when I try to rebind the expanded DetailTable gets unexpanded and thrown out of edit mode.  How do you rebind the datasource of the GridTableView / DetailTable without causing it to collapse on the screen?
Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
 
    sTableName = "" & e.Item.OwnerTableView.Name
 
    Select Case sTableName
        Case "Noms"
 
            Select Case e.CommandName
                Case "EditAll"
 
                    ' Edit All button pressed. Reset any rows in Insert mode
                    e.Item.OwnerTableView.IsItemInserted = False
 
                       'Code to add records to Database is here.
 
 
                    ' Put all rows in Edit mode
                    e.Item.Edit = True
 
            End Select
      End Select
End Sub


Andrey
Telerik team
 answered on 10 Apr 2012
2 answers
69 views
Hi, I'm trying your Product and I have a Question about the TimeLine Scheduler.

I have the SlotDuration to "12:00:00" and the number of slot to 12.
I need to have the list of rooms to the left and the Morning and Afternoon from Monday to Saturday.
That's work fine.
I need only add up the Day of the combinated Columns.
Is that possible ?


                         Monday  |   Tuesday      | Wednesday
                  00:00 | 12:00 | 00:00 | 12:00 | 00:00 | 12:00
Room 1
Room 2

In Bold my Problem.
is it possible to replace time by text?

Thanks for your help
Fabrice
Top achievements
Rank 1
 answered on 10 Apr 2012
5 answers
221 views

Hello

I am trying to get RadScriptManager to work on a page in conjunction with controls from the Ajax Control Toolkit. The website runs under .NET 3.5, and I have a version of the ACT DLL that is built on a .NET 3.5 reference. 

Specifically, I have Telerik.Web.UI v2011.3.1115.35, with an AnimationExtender from ACT v3.5.40412.2.  I have all the DLLs correctly referenced, and no errors are reported, but the AnimationExtender does not appear to be working - it is not responsive to any mouse events. As I understand the issue, I need the RadScriptManager from Telerik.Web.UI to substitute for the ToolkitScriptManager from ACT. On that basis, I found the forum posting shown here:  

http://www.telerik.com/community/forums/aspnet-ajax/scriptmanager-and-stylesheetmanager/fix-radscriptmanager-compatibility-issues-with-ajax-control-toolkit.aspx

This post looks as if it might go some way to addressing my objective. However, I need to carry out the script reference customization programmatically. Hence, I managed to come up with the following code to run on Page_Load, where radsm is the declared RadScriptManager control ...

radsm.EnableScriptCombine = False
radsm.Scripts.Add(New ScriptReference( _
   "MicrosoftAjax.js", _
   "System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"))
radsm.Scripts.Add(New ScriptReference( _
   "MicrosoftAjaxWebForms.js", _
   "System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"))

The problem is this code does not seem to solve my issue. Where could I be going wrong? Is this combination of libraries and controls even possible? Can the RadScriptManager be manipulated in this way programmatically?

If you could provide me with some pointers of the right direction to work in, that would be really useful.

Thanks very much

 

Genady Sergeev
Telerik team
 answered on 10 Apr 2012
1 answer
123 views
I have looked at the examples I could find but do not find one with a masterpage and updatepanel involved.  How can I export to excel within a masterpage and updatepanel.  If I have the updatepanel out of the following code it works but when put back in it does nto work, but produces no errors either.  Originally I tried to use one update panel but switched to 2 to see if I could get it to work this way. still no deal.

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="BodyContent" Runat="Server">
    <asp:UpdatePanel ID="udp1" runat="server">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="lnkDisplay" />
        </Triggers>
        <ContentTemplate>
             <asp:Panel ID="pnlPick" Runat="server">
                <table width="100%">
                    <tr>
                        <td align="center" width="100%">Pick Deployment: 
                            <asp:DropDownList id="ddlDeployment" Runat="server" Width="160" AutoPostBack="True"></asp:DropDownList>     
                            Pick BN: <asp:DropDownList id="ddlBn" Runat="server" Width="120" AutoPostBack="True"></asp:DropDownList>
                                 Pick Uic: <asp:DropDownList id="ddlUic" Runat="server" Width="120" AutoPostBack="true"></asp:DropDownList>
                            <asp:Button ID="btnPanel" runat="server" style="display:none" />
                        </td>
                    </tr>
                    <tr>
                        <td align="center"><asp:LinkButton ID="lnkDisplay" Runat="server" CausesValidation="True">Display DMD</asp:LinkButton></td>
                    </tr>
                    <tr>
                        <td style="height:10px"></td>
                    </tr>
                </table>
            </asp:Panel>
       </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="udp2" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlgrid" runat="server" Visible="false">
                <table width="100%">
                    <tr>
                        <td align="center">
                             <telerik:RadGrid ID="myRadGrid" runat="server" Width="98%" BorderWidth="1px" CellPadding="6" GridLines="None" BorderColor="#404040" Skin="Web20">
                                <ExportSettings ExportOnlyData="true" FileName="DonorSlots" IgnorePaging="true" OpenInNewWindow="true"></ExportSettings>
                                <MasterTableView AutoGenerateColumns="false" Name="MasterGrid" BorderColor="#404040" Font-Size="9" Font-Names="Veranda,arial,sans-serif" 
                                HeaderStyle-HorizontalAlign="Center" GridLines="Both" BorderWidth="1px" CommandItemDisplay="Top" EditMode="EditForms">
                                <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" ShowExportToExcelButton="false" /><AlternatingItemStyle BackColor="#B0C4DE"  HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Center" /><HeaderStyle ForeColor="White" Font-Bold="true" BorderColor="#404040" BorderWidth="1px" />
                                    <CommandItemTemplate>
                                        <table width="100%">
                                            <tr>
                                                <td align="right"><asp:Button ID="btnExport" runat="server" CommandName="ExportToExcel" Text="Export Excel" /></td>
                                            </tr>
                                        </table>
                                    </CommandItemTemplate>
                                   <Columns>
                                    <telerik:GridBoundColumn DataField="Unit" HeaderText="Unit" />
                                    <telerik:GridBoundColumn DataField="Para\Line\Pos" HeaderText="Para\Line\Pos" />
                                    <telerik:GridBoundColumn DataField="Posn_title" HeaderText="Posn_Title" />
                                    <telerik:GridBoundColumn DataField="Name" HeaderText="Name" />
                                    <telerik:GridBoundColumn DataField="Rank" HeaderText="Rank" />
                                    <telerik:GridBoundColumn DataField="SSN" HeaderText="SSN" />
                                    <telerik:GridBoundColumn DataField="Grade" HeaderText="Grade" />
                                    <telerik:GridBoundColumn DataField="DMOS" HeaderText="Duty_Posn" />
                                    <telerik:GridBoundColumn DataField="REQCLR" HeaderText="Req Clr" />
                                    <telerik:GridBoundColumn DataField="PassPortDT" HeaderText="Pass_Port_DT" />
                                    <telerik:GridBoundColumn DataField="MobDay" HeaderText="Mob Days Cottad" />
                                    <telerik:GridBoundColumn DataField="SCTYDT" HeaderText="Scty_Dt" />
                                    <telerik:GridBoundColumn DataField="PHY_EXAM_DT" HeaderText="Phy_Exam_DT" />
                                    <telerik:GridBoundColumn DataField="MRD\ETS" HeaderText="Ets\Mrd" />
                                    <telerik:GridBoundColumn DataField="SRP_DT" HeaderText="Srp_DT" />
                                    <telerik:GridBoundColumn DataField="CLS" HeaderText="Cls Trained" />
                                    <telerik:GridBoundColumn DataField="Profile" HeaderText="P3\P4 Profile" />
                                    <telerik:GridBoundColumn DataField="Cleared" HeaderText="Mmrp|Peb|Meb Cleared" />
                                    <telerik:GridBoundColumn DataField="Remarks" HeaderText="Remarks" />
                                </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>


Maria Ilieva
Telerik team
 answered on 10 Apr 2012
1 answer
61 views
Hey guys,

I'm trying to use the Telerik Chart Control after purchasing the ASP.NET Ajax control yesterday from yourselves, but i can't seem to get the bar chart to be stacked...

Here is my code: (ASP.NET)

<telerik:RadChart ID="RadChart1" runat="server" DefaultType="StackedBar">
            <PlotArea>
                <YAxis MaxValue="300" Step="10" AutoScale="True"  AxisMode="Extended">
                </YAxis>
             
            </PlotArea>
            <Series>
                 
            </Series>
        </telerik:RadChart>

and my c#:

string sql = string.Format("...");
DataTable openLeads = db.FillTable(sql);
 
 
if (openLeads.Rows.Count > 0)
{
    RadChart1.DataSource = openLeads;
 
    foreach (DataRow row in openLeads.Rows)
    {
        ChartSeries chrtSeries = new ChartSeries {Name = row["Description"].ToString()};
        chrtSeries.Type = ChartSeriesType.StackedBar;
        RadChart1.SeriesOrientation = ChartSeriesOrientation.Vertical;
        RadChart1.Series.Add(chrtSeries);
 
    }
    RadChart1.PlotArea.XAxis.DataLabelsColumn = "UserName";
    RadChart1.DataBind();
}

my sql query produces these results:


Description                                                    Count              Username
Passed back to sales - query log                 1                      TAtest
Rejected                                                       2                     TAtest
Telesales Assigned TA                                 1                     TAtest

I want the y-axis to be 10-300 in steps of 10.. min of 10
I want the x-axis to be the username
and the count of each Description to be each bar stacked per username..

Please see attachment of what i'm currently getting..

Thanks for any help,

Regards,

Michael

Petar Marchev
Telerik team
 answered on 10 Apr 2012
1 answer
165 views
Ive added a file download fucntion to my grid, its works perfectly well on my local development machine, but when i upload it to a hosted server, it wont work !  nothing seems to happen.  In development I get the file dialoge box open in the browser, yet on the live server I dont get that, just the spinning ajax icon

heres the column in my grid

<telerik:GridAttachmentColumn
                       MaxFileSize="1048576"
                       EditFormHeaderTextFormat="Download File:"
                       HeaderText="Download"
                       
                       AttachmentKeyFields="AudioID"
                       FileNameTextField="AudioPath"
                       DataTextField="SongTitle"
                       UniqueName="AttachmentColumn">
                   </telerik:GridAttachmentColumn>

I have this in client settings

<ClientSettings>
                        <ClientEvents OnCommand="gridCommand" />
                    </ClientSettings>
  and this javascript on the page


function gridCommand(sender, args) {
               if (args.get_commandName() == "DownloadAttachment") {
                   var manager = $find('<%= RadAjaxManager.GetCurrent(Page).ClientID %>');
                   manager.set_enableAJAX(false);
 
                   setTimeout(function () {
                       manager.set_enableAJAX(true);
                   }, 0);
               }
           }
  and finally, this is the server side code

protected void RadGridAudio_ItemCommand(object source, GridCommandEventArgs e)
        {
                         
            if (e.CommandName == RadGrid.DownloadAttachmentCommandName)
            {
                e.Canceled = true;
 
                GridDownloadAttachmentCommandEventArgs args = e as GridDownloadAttachmentCommandEventArgs;
                string fileName = args.FileName;
                long attachmentId = (int)args.AttachmentKeyValues["AudioID"];
                 
                BusinessLayer.RegistrationAudio audio = new RegistrationAudio();
                audio = registrationManager.GetRegistrationAudio(attachmentId);
                string filePath = audio.AudioPath.Substring(0, audio.AudioPath.LastIndexOf(@"\"));
                string _DownloadableProductFileName = audio.FileName;
 
                if (audio.AudioPath != null && audio.FileName != null)
                {
                    System.IO.FileInfo FileName = new System.IO.FileInfo(filePath + "\\" + _DownloadableProductFileName);
                    FileStream myFile = new FileStream(filePath + "\\" + _DownloadableProductFileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
 
                    try
                    {
                        if (FileName.Exists)
                        {
                            HttpContext.Current.Response.Clear();
                            HttpContext.Current.Response.AddHeader("Content-Disposition", "inline;attachment; filename=\"" + FileName.Name + "\"");
                            HttpContext.Current.Response.AddHeader("Content-Length", FileName.Length.ToString());
                            HttpContext.Current.Response.ContentType = "application/octet-stream";
                            HttpContext.Current.Response.TransmitFile(FileName.FullName);
                            HttpContext.Current.Response.Flush();
                        }
                        else
                        {
                            throw new Exception("File not found");
                        }
                    }
                    catch (Exception ex)
                    {
                        HttpContext.Current.Response.ContentType = "text/plain";
                        HttpContext.Current.Response.Write(ex.Message);
                    }
                    finally
                    {
                        HttpContext.Current.ApplicationInstance.CompleteRequest();
                    }
                }
 
            }
        }
  can anyone see where im going wrong ?
Andrey
Telerik team
 answered on 10 Apr 2012
1 answer
105 views
Hi!

I have developed asp.net with telerik components for about 1,5 years now.

I have found out that if I create radgrid on aspx that meets the following requirements, the clientSelectColumn starts to misbehave:
 * allow paging = false
 * allow scrolling on grids clientSettings
 * add some columns, including telerik:GridClientSelectColumn
 * on client side: window.onresize = resize();  <- resize the grid to fit the page on "onload" and "onresize".
f.ex:
function resize() {
    if (grid) {
        var w = document.documentElement.clientWidth;
        var h = document.documentElement.clientHeight -100;
        grid.get_element().style.height = h + "px";
        grid.repaint();
     }
}


 * on "OnNeedDataSource" event, load so much data that you have to scroll the page to reach bottom.

 * scroll down and select a line by clicking on clientselectcolumn checkbox.
 -> with every click the pages contains are moving upwards and off from the web browsers window.

I got the same results with IE 9 and Firefox 11 (not so much offset, but it jumped a few times though).
If i set the grids height to be a static value this problem doesn't show up.
Andrey
Telerik team
 answered on 10 Apr 2012
7 answers
193 views
Hi,

I'd like to create a simple grid with one column not from a database.
And, I'd like to add rows to this grid each time a button is clicked, with the value of a combobox.
I can't do that, it doesnt works.
I'm a beginner, could you please tell me how to make that?

Thanks
Caro
Top achievements
Rank 1
 answered on 10 Apr 2012
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?