Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
56 views
I have a simple web page that gives the option of selecting one of two radio buttons.  Depending on which one they select, I want of the bottom portion of the form to become visible after they select the 2nd radio button, but otherwise I want it to remain hidden.  Seems like I used to do this with a plain Ajax panel, but I don't see one listed now.
dean.carrefour
Top achievements
Rank 1
 answered on 22 Apr 2011
13 answers
314 views
Hello,

In IE8 and FF3 i run into a strange problem.

I know all about the 100% solution, and use this standard on every page.
e.q. 
    <style type="text/css">  
        html, body, form  
        {  
            width: 100%;  
            height: 100%;  
            overflow: hidden;  
        }  
    </style> 

 

If i use a simple radgrid with Scrolling-UseStaticHeaders="true" on a page, without any container or other control, the grid is 100% heigth, and this is working perfect.
But as soon as i put a RadAjaxmanager on the page, the RadGrid is going from 300px to 10 px in a split second when the page load, and stays 10px.
e.q. 

 

    <telerik:RadAjaxManager ID="RAM" runat="server" > 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="myRadrid (or any other control)">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="myRadGrid" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

 

For testing i put the Radgrid inside the form container, so the heigth for the container is set.
I can write a workaround in js to follow the window height, but that is not real smooth solution.
The Grid is then loading from 300px, to 10px, and then the right height...

I'am sure the RadAjaxmanager is the reason for this, but is there a solution?
p.s. i use the latest 2009.1 402 build.

 

Michael
Top achievements
Rank 1
 answered on 22 Apr 2011
6 answers
270 views
Hi,
I am putting together a line chart to display data from a MSSQL database but cannot stop the numerical score labels from displaying. I have gone through all of the examples but need a little assistance. Please take a look at what I have and add what I need to stop the scores from rendering on the lines. I have attached images of existing render and table.
I appreciate your time.

<asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:IPdataConnectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="SELECT top 7 Date = CONVERT(char(10), Date, 101), score, IPaddress, Partner FROM IPhistory WHERE Partner = 'NEAstates' ORDER BY Date ASC;" runat="server">
</asp:SqlDataSource>
            <telerik:radchart id="RadChart4" runat="server" width="800px" datasourceid="SqlDataSource1"
                defaulttype="Line" autolayout="true" charttitle-visible="false">
                <Appearance TextQuality="AntiAlias">
                </Appearance>
                <PlotArea>
                <Appearance Dimensions-Margins="18%, 24%, 12%, 16%"></Appearance>
                    <YAxis Step="10" AxisMode="Extended">
                        <Appearance MajorGridLines-Visible="true" MinorGridLines-Visible="false">
                        </Appearance>
                    </YAxis>
                    <XAxis DataLabelsColumn="Date" LayoutMode="Between">
                        <Appearance ValueFormat="ShortDate" MajorGridLines-Visible="true">
                            <LabelAppearance RotationAngle="10" Position-AlignedPosition="Top">
                            </LabelAppearance>
                        </Appearance>
                    </XAxis>
                </PlotArea>
            </telerik:radchart>

protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        // Manually setting the series groups and Y values columns
        RadChart4.DataGroupColumn = "IPaddress";
        RadChart4.DataManager.ValuesYColumns = new string[1] { "score" };
        RadChart4.Skin = "LightBlue";
        ChartSeries chartSeries = new ChartSeries();
        chartSeries.Type = ChartSeriesType.Line;
        chartSeries.Appearance.LabelAppearance.Visible = false;
    }
}


JT
Top achievements
Rank 1
 answered on 22 Apr 2011
1 answer
62 views
Hi All
I can get the value of a control inside a radgrid cell with javascript with:

        function RowSelected(sender, eventArgs) {
            var grid = sender;
            var MasterTable = grid.get_masterTableView();
            var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
            var txtbox = row.findElement("Numeric1");
            var txtboxValue = txtbox.value;
            alert(txtboxValue);
        }
which works great, however when i want to set the value, i cant set it.

Any idea?

İf i use a standart textbox i can set the value by
 row.findElement("TextBox1").value = '15';

 however i am using RadNumericTextbox and it cant set the value as i do with standart textbox


Vasil
Telerik team
 answered on 22 Apr 2011
1 answer
116 views
Hello,

I am having this issue with MakeUrlsAbsolute on the rad Editor in IE8.  Steps to reproduce:

- create a page with a RadEditor and ContentFilters containing MakeUrlsAbsolute
- visit your website under a secure domain: ie: https://telerik.com/MyPage.aspx using IE8http://www.google.ca/images/logos/ps_logo2.png
- click on HTML view in the editor
- paste testing <img src="http://www.google.ca/images/logos/ps_logo2.png"> testing
- switch back to design view
- when prompted with the IE8 "Do you want to view only the webpage content that was delivered securely?"   - select YES
- it does not go back to design view
- clicking on Design does nothing, clicking on HTML again will prompt the error: "Message from webpage    Error while executing filter MakeUrlsAbsolute - [object Error]

thanks
Rumen
Telerik team
 answered on 22 Apr 2011
4 answers
260 views

I am populating RadPanelBar from the database. The following is my code.  I have a db column that specifies enable true or false. I would like to set the RadPanelItem enable property using this. How can I do this?

 


Dim
dt As New DataTable

dt =GetPanelItems(Id) – proc to call oracle

Dim links As New DataSet()

 

        links.Tables.Add(dt)

        RadPanelBar1.DataTextField = "panel_name"

        RadPanelBar1.DataNavigateUrlField = ""

        RadPanelBar1.DataFieldID = "panel_id"

        RadPanelBar1.DataFieldParentID = "Parent_panel_Id"

        RadPanelBar1.DataValueField = "panel_value"

        RadPanelBar1.DataSource = links

        RadPanelBar1.DataBind()
Thanks

Nikolay Tsenkov
Telerik team
 answered on 22 Apr 2011
1 answer
78 views
It seems to be impossible to add text after a table, when the table is at the bottom of the document. If I use the arrow or try to click below the table it just selects the table. I want the text to be outside the table underneath it. How can I do that?

thank you
Rumen
Telerik team
 answered on 22 Apr 2011
2 answers
177 views
Hello,

Problem in RadScheduler(Width) auto adjustment in any screen(Big And Small) and in IE/FireBox/Grome/Shafari.

We used 

script type="text/javascript">
    function resizeScheduler()   
                  {
                      var scheduler = $find('<%=RadScheduler1.ClientID %>');
                      scheduler.get_element().style.width = "100%";
                      scheduler.repaint();
                  }
</script> 
And also set width=100% in RadScheduler control

In C# code
RadScheduler1.Width = Unit.Percentage(100);
but it is not work.

please help me as soon as possible.


Thanks

Best Regards
Mutum Jiten Singh
Akhil Systems
Jiten
Top achievements
Rank 1
 answered on 22 Apr 2011
1 answer
97 views
I have a couple of grids on tabs for each row of a grid in a nested view. The code-behind opens the first record to view the first item. At this point, I can click on the link to download my attachment, but it only works the first time. After that, it hangs and I can't figure out why.

If you can figure out what I need to correct, it would be a tremendous help!

I've created a mini-project that demonstrates the problem. I've substituted 2 XML files for data sources, but, for this demo, the attachment is hard-coded. (It's using a PDF.)

<%@ Page Language="C#" %>
<%@ Register assembly="Telerik.Web.UI" namespace="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">
 
<script runat="server">
 
    protected void DownloadForShot_ImageButton_Click(object sender, System.Web.UI.ImageClickEventArgs e)
    {
        ImageButton btnDownload = (ImageButton)sender;
        GridDataItem dataItem = (GridDataItem)btnDownload.NamingContainer;
        RadGrid Attachments_RadGrid = (RadGrid)dataItem.NamingContainer.NamingContainer;
        Label lblShotID =(Label)Attachments_RadGrid.NamingContainer.FindControl("ShotID_Label");
        try
        {
//NOTE THE HARD CODED VALUE HERE
        System.IO.FileInfo file = new System.IO.FileInfo("C:\\inetpub\\wwwroot\\TestSite\\Images\\TestPDF.pdf");
 
        if (file.Exists)
        {
            Response.ClearContent();
            Response.AddHeader("Content-Disposition", string.Format("attachment; filename={0}", file.Name));
            Response.AddHeader("Content-Length", file.Length.ToString());
            Response.ContentType = "application/pdf";            // "image/jpeg"
            Response.TransmitFile(file.FullName);
            HttpContext.Current.ApplicationInstance.CompleteRequest();
        }
        else
        {
            throw new Exception("There is no attachment for this path or the path is not valid.");
        }
        }
        catch (Exception ex)
        {
            Response.Write("<span style='color:red;'>" + ex.Message + "</span>");
        }
    }
 
    protected void ShotDetail_RadGrid_PreRender(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (ShotDetail_RadGrid.MasterTableView.Items.Count > 0)
            {
                ShotDetail_RadGrid.MasterTableView.Items[0].Expanded = true;
                ShotDetail_RadGrid.MasterTableView.Items[0].ChildItem.FindControl("InnerContainer").Visible = true;
            }
        }
    }
</script>
 
<head runat="server">
    <title>Title</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div id="div_Shots_ShotDetail" style="width:99%; height:1500px; position:absolute;">
            <telerik:RadGrid ID="ShotDetail_RadGrid" runat="server" DataSourceID="XmlDataSource1"
                    AllowPaging="True" Skin="Hay" GridLines="None" ShowStatusBar="True" Width="921px"
                onprerender="ShotDetail_RadGrid_PreRender" >
                <HierarchySettings ExpandTooltip="Show related merch" CollapseTooltip="Collapse merch"></HierarchySettings>
                <ExportSettings IgnorePaging="True">
                    <Pdf PageBottomMargin="0.5in" PageHeight="8.5in" PageLeftMargin="0.35in"
                            PageRightMargin="0.35in" PageTopMargin="0.5in" PageWidth="11in" />
                </ExportSettings>
                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                    <Selecting AllowRowSelect="True"></Selecting>
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                </ClientSettings>
                <MasterTableView DataSourceID="XmlDataSource1" AutoGenerateColumns="False"
                    AllowCustomPaging="True">
                    <NestedViewTemplate>
                        <asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap" Visible="false">
                            <telerik:RadTabStrip runat="server" ID="TabStip1" MultiPageID="Multipage1" SelectedIndex="0" Width="884px">
                                <Tabs>
                                    <telerik:RadTab runat="server" Text="Attachments" PageViewID="PageView2" Selected="True">
                                    </telerik:RadTab>
                                </Tabs>
                            </telerik:RadTabStrip>
                            <telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" RenderSelectedPageOnly="false" >
                                <telerik:RadPageView runat="server" ID="PageView1">
                                    <asp:Label ID="ShotID_Label" runat="server" Text='<%# Eval("ShotID") %>' Visible="false" />
                                    <asp:Label ID="Error_Label" runat="server"></asp:Label>
                                    <telerik:RadGrid ID="Attachments_RadGrid" runat="server" DataSourceID="XmlDataSource2" GridLines="None">
                                        <MasterTableView AutoGenerateColumns="False" DataSourceID="XmlDataSource2">
                                            <CommandItemSettings ExportToPdfText="Export to PDF" />
                                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                                                <HeaderStyle Width="20px" />
                                            </RowIndicatorColumn>
                                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                                                <HeaderStyle Width="20px" />
                                            </ExpandCollapseColumn>
                                            <Columns>
                                                <telerik:GridTemplateColumn UniqueName="ColumnDownload">
                                                    <ItemTemplate>
                                                        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
                                                            <asp:ImageButton ID="DownloadForShot_ImageButton" runat="server" ImageUrl="~/Images/view.gif"
                                                                OnClick="DownloadForShot_ImageButton_Click" />
                                                        </telerik:RadAjaxPanel>
                                                    </ItemTemplate>
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridBoundColumn DataField="AttachmentTitle" HeaderText="Attachments" UniqueName="ColumnAttachment">
                                                </telerik:GridBoundColumn>
                                            </Columns>
                                            <EditFormSettings>
                                                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                                </EditColumn>
                                            </EditFormSettings>
                                        </MasterTableView>
                                        <FilterMenu EnableImageSprites="False">
                                        </FilterMenu>
                                        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                                        </HeaderContextMenu>
                                    </telerik:RadGrid>
 
                                    <asp:XmlDataSource ID="XmlDataSource2" runat="server" DataFile="~/XMLFile2.xml"></asp:XmlDataSource>
                                </telerik:RadPageView>
                                <telerik:RadPageView Runat="server" Width="100%" ID="PageView2">
                                </telerik:RadPageView>
                            </telerik:RadMultiPage>
                        </asp:Panel>
                    </NestedViewTemplate>
                    <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
                    <ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="ShotID" HeaderText="ShotID" UniqueName="ShotID"
                            FilterControlAltText="Filter ShotID column" SortExpression="ShotID">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="JobNumber" HeaderText="JobNumber" UniqueName="JobNumber"
                            FilterControlAltText="Filter JobNumber column" SortExpression="JobNumber">
                        </telerik:GridBoundColumn>
                    </Columns>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                </EditFormSettings>
                    <PagerStyle AlwaysVisible="True" />
                </MasterTableView>
                <PagerStyle AlwaysVisible="True" />
                <FilterMenu EnableImageSprites="False"></FilterMenu>
                <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
            </telerik:RadGrid>
 
            <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/XMLFile.xml"></asp:XmlDataSource>
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        </div>
    </div>
    </form>
</body>
</html>

XML File 1:
<?xml version="1.0" encoding="utf-8" ?>
<tables>
    <tShots ShotID="15736" JobNumber="254960"/>
    <tShots ShotID="15737" JobNumber="254960"/>
    <tShots ShotID="15738" JobNumber="254960"/>
    <tShots ShotID="15739" JobNumber="254960"/>
    <tShots ShotID="15740" JobNumber="254960"/>
    <tShots ShotID="15741" JobNumber="254960"/>
</tables>

XML File 2:
<?xml version="1.0" encoding="utf-8" ?>
<tables>
    <tAttachments ShotID="14394" AttachmentExtension=".jpg" AttachmentPath="~/images/Image1/file1.jpg" AttachmentTitle="File Name 1"/>
    <tAttachments ShotID="15737" AttachmentExtension=".jpg" AttachmentPath="~/images/Image1/file2.jpg" AttachmentTitle="File Name 2"/>
    <tAttachments ShotID="15738" AttachmentExtension=".jpg" AttachmentPath="~/images/Image1/file3.jpg" AttachmentTitle="File Name 3"/>
    <tAttachments ShotID="15739" AttachmentExtension=".jpg" AttachmentPath="~/images/Image1/file4.jpg" AttachmentTitle="File Name 4"/>
    <tAttachments ShotID="15740" AttachmentExtension=".jpg" AttachmentPath="~/images/Image1/file5.jpg" AttachmentTitle="File Name 5"/>
</tables>
Mira
Telerik team
 answered on 22 Apr 2011
1 answer
75 views
I have a WCF Data Service in a ASP.NET MVC 3 App on IIS 7.  I have configured the web.config to have the following...

<system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true" >
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
    </modules>
    <handlers>
      <remove name="asset" />
      <add name="asset" preCondition="integratedMode" verb="GET,HEAD" path="asset.axd" type="Telerik.Web.Mvc.WebAssetHttpHandler, Telerik.Web.Mvc" />
      <add name="Ajax" verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax" />
    </handlers>
  </system.webServer>
and
<httpModules>
        <!-- Add this line exactly as is - the name value is important -->
        <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
      </httpModules>

I also have a Silverlight app that queryies the webservice.  I expect my data to be compressed in some way, but after looking at fiddler, I don't see any compression at all. 

What am I doing wrong?

Thanks,
Joe

[UPDATE]
I forgot to mention that I'm using the absolute latest Telerik ASP.NET AJAX control, and the latest, minus the controls they released on April 19 for silverlight
Joseph Roberts
Top achievements
Rank 1
 answered on 22 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?