Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
105 views
I wonder if there is any possibility to save the tabs and their windows are open, so that when a postback is done, re-open them??

thanks
Rui
Top achievements
Rank 1
 answered on 14 Oct 2010
1 answer
120 views
Hi,

Any telerik control is there to change dynamic Font size and Font Family in the browse(Similar to Adjust font size in lot of websites).


Thanks



Sebastian
Telerik team
 answered on 14 Oct 2010
1 answer
96 views
Hi!

I get this error: 'Microsoft JScript runtime error: Invalid set operation on read-only property'.

When I have this code wrapped in an <telerik:RadAjaxPanel>:
-----------------------------------------------------------------------------
<asp:Button ID="TestButton" runat="server" Text="ShowCalendar" OnClick="TestButton_Click" />
<asp:Panel ID="DatePanel" runat="server" Visible="false">
    <telerik:RadDatePicker ID="DatePicker" runat="server" ShowPopupOnFocus="true" DateInput-ReadOnly="true" />
</asp:Panel>

Button Code:
----------------
protected void TestButton_Click(object sender, EventArgs e)
{
    DatePanel.Visible = true;
}

All I'm trying to do is set the panel to visible = true. Doesn't seem to work, I can reproduce this behaviour everytime.

EDIT:
If I set the Panels Visible="true" before the page starts I can show and hide the panel as much as I like without any problems. But I want it to be hidden initially.

EDIT [SOLVED]:
I solved it by settings the panel style to style="display: none;" And then in code remove the style using DatePanel.Style.Remove("display"); when I want to show the panel, this is only needed once after that I can use visible as I would normally. Strange problem.

Regards, Jerry
Dimo
Telerik team
 answered on 14 Oct 2010
1 answer
48 views
When a user clicks on a node of my radtreeview, I need to know what that node's ID is so I can rebind my radgrid based on that node. I can't seem to figure out which property contains that information though.

Help!
Marshall Cassidy
Top achievements
Rank 1
 answered on 14 Oct 2010
4 answers
149 views
I studied the sample code and the zip file in the forum but I have not found one similar to what I am trying to do.  

Basically, I need to write a simple web page which will work to generate a document file like  a merged document.  Because this project will be used to add to an old web software project, so the new feature will be like a URL and it will get some needed information from a simple data source, i.e. a text file, and produce output to a PDF file.    

For example, the document must output a PDF file with my name and  my children's name, date of birth and gender.   The document must have a few paragraphs of text there.    

So, my question/purpose in concept is as follow:

1.  I would like to have this Telerik web page basically get the basic information from, say, a text file or XML file and merge into an some  text like some plain paragraph..   And there will be just one big button on the top "Print PDF".      If the button is pressed, the content will be output to PDF file via the browser.

2. Most the code example generates output of data grid such as the Sushi example but my content is not just a grid, i.e. some random text and my name and the names of the children, with some paragraph before and after the data (children name) grid. I don't necessarily use the SQL Server but the intention is to use this web page as a "PDF generator".  

Could anybody show me the way on this.  

Thanks.

Tony
Daniel
Telerik team
 answered on 14 Oct 2010
1 answer
101 views
Hi Experts,

Error: Multiple controls with the same ID 'ctl00' were found. Trace requires that controls have unique IDs.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Multiple controls with the same ID 'ctl00' were found. Trace requires that controls have unique IDs.

In .aspx file I am having one table 
  <asp:Table ID="mytable" runat="server" HorizontalAlign="Center" Width="100%" CellPadding="4"
                                        CellSpacing="0" BorderStyle="None">
                                    </asp:Table>

for the above table I am dynamically adding the RadGrid with properties in the class file.Refer the code below

 public class Home : MyHtmlControls
    {
     private RadGrid HVRGrid111 = new RadGrid();

private void GetClassicRadgrid(ref HtmlTableCell MyCell)
        {
        

            DataSet myobjdr = new DataSet();
            DataSet myds = new DataSet();
            string _DelviewUrl;
            string _EditUrl;
            string delJavaScriptStr;
            string _hprlnkUrl;


            GridBoundColumn mybound = new GridBoundColumn();
            GridTemplateColumn myTemplate;
            GridHyperLinkColumn myHyperLink = new GridHyperLinkColumn();

            try
            {
                delJavaScriptStr = "<script language=\"javascript\">\n";
                delJavaScriptStr += "<!--\n";
                delJavaScriptStr += "function Delete_" + _TableName + "(option,option1,option2,option3,option4,option5,option6,option7,option8)\n";
                delJavaScriptStr += "{\n";

                delJavaScriptStr += "var del = window.confirm('Are You Sure you want to delete ?');\n";
                delJavaScriptStr += "if (del)\n";
                delJavaScriptStr += "{\n";
                delJavaScriptStr += "openwin1('Delete.aspx?dbmode=del&tblid=' + option + '&Mode=' + option1 + '&UrlPath=' + option2 + '&uMode=' + option4 + '&uColid='+ option5 + '&uid='+ option6 + '&id=' + option3 + '&uTabid=' + option7+'&rMode='+option8,'400','200','no');\n";
                delJavaScriptStr += "}\n";

                delJavaScriptStr += "}\n";
                delJavaScriptStr += "//-->\n";
                delJavaScriptStr += "</script>";
                Form.Page.RegisterStartupScript("Delete_" + _TableName, delJavaScriptStr);


           
                GridHyperLinkColumn Delhyper = new GridHyperLinkColumn();
                GridHyperLinkColumn hyper = new GridHyperLinkColumn();
                GridHyperLinkColumn eDIT = new GridHyperLinkColumn();

                if (Isallowed("D", Session["userid"].ToString(), _ColId, "V"))
                {
                    _DelviewUrl = "javascript:Delete_" + _TableName + "('" + _addEditTable + "','Del','" + IncomingURL + "','{0}','hm','" + _ColId + "','0','" + _Tabid + "','hm');";
                    //_DelviewUrl=IncomingURL +"?mode=hm&dbmode=del&TabId="+_ForTabId+"&ColID="+_ColId+"&pkval={0}&userid="+_userid+"&username="+_username;
                    Delhyper.DataNavigateUrlFormatString = _DelviewUrl;
                    Delhyper.DataNavigateUrlFields = _PrimaryColumn.Split('/');
                    Delhyper.HeaderText = "Delete";
                    Delhyper.HeaderStyle.CssClass = ReadXML(_ThemeConfigName, "cssfor", "GridHead", "cssname", "name");
                    Delhyper.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
                    Delhyper.Text = "<img src=\"" + _ThemeImagesPath + ReadXML(_ThemeImagesName, "imgfor", "DeleteImage", "imgName", "name") + "\" border=0 alt='Delete'>";
                    Delhyper.NavigateUrl = _DelviewUrl;
                    HVRGrid111.Columns.Add(Delhyper);
                }

                if (Isallowed("V", Session["userid"].ToString(), _ExtendedViewId, "V"))
                {
                    if (_ExtendedViewId.Trim() == "0")
                    {
                        _ExtendedViewUrl = "javascript:alert('View Form Is Not Available For This tab!')";
                    }
                    else
                    {
                        _ExtendedViewUrl = _ExtendedViewUrl + "&id={0}";
                    }
                    hyper.DataNavigateUrlFormatString = _ExtendedViewUrl;
                    hyper.DataNavigateUrlFields = _PrimaryColumn.Split('/');
                    hyper.HeaderText = "View";
                    hyper.HeaderStyle.CssClass = ReadXML(_ThemeConfigName, "cssfor", "GridHead", "cssname", "name");
                    hyper.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
                    hyper.Text = "<img src=\"" + _ThemeImagesPath + ReadXML(_ThemeImagesName, "imgfor", "ExtView", "imgName", "name") + "\" border=0 alt='View'>";
                    hyper.NavigateUrl = _ExtendedViewUrl;
                    HVRGrid111.Columns.Add(hyper);
                }
                if (Isallowed("E", Session["userid"].ToString(), _ColId, "V"))
                {
                    if (_addEditTable.Trim() == "0")
                    {
                        _EditUrl = "javascript:alert('Add Edit Form Is Not Available For This tab!')";
                    }
                    else
                    {
                        _EditUrl = "javascript:Open_addedit_new_" + _TableName + "('" + _addEditTable + "','rd','" + IncomingURL + "','{0}','hm','" + _ColId + "','0','" + _Tabid + "','hm');";
                    }

                    eDIT.DataNavigateUrlFields = _PrimaryColumn.Split('/');
                    eDIT.DataNavigateUrlFormatString = _EditUrl;
                    //eDIT.DataNavigateUrlFields = _PrimaryColumn;
                    eDIT.HeaderText = "Edit";
                    eDIT.HeaderStyle.CssClass = ReadXML(_ThemeConfigName, "cssfor", "GridHead", "cssname", "name");
                    eDIT.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
                    eDIT.Text = "<img src=\"" + _ThemeImagesPath + ReadXML(_ThemeImagesName, "imgfor", "Edit", "imgName", "name") + "\" border=0 alt='Edit'>";
                    eDIT.NavigateUrl = _ExtendedViewUrl;
                    //HomeViewGrid.Columns.Add(eDIT);
                    HVRGrid111.Columns.Add(eDIT);
                }


                myds = GetDataSet(genview());

            
                myobjdr = GetDataSet("select * from tableinfo where  COLINFODETAILSID='" + _ForTableId + "' and visibility <> 'hdd'  order by ORDERFLD ");

                HVRGrid111.AutoGenerateColumns = false;
                HVRGrid111.AllowPaging = true;
                HVRGrid111.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
                HVRGrid111.Width = Unit.Percentage(98);
                HVRGrid111.PageSize = 5;
                HVRGrid111.AllowFilteringByColumn = true;
                HVRGrid111.AllowSorting = true;
                HVRGrid111.ShowFooter = true;
                HVRGrid111.HeaderStyle.Width = Unit.Pixel(150);
                HVRGrid111.ClientSettings.ReorderColumnsOnClient = true;
                HVRGrid111.ClientSettings.AllowDragToGroup = true;
                HVRGrid111.ClientSettings.AllowColumnsReorder = true;
                HVRGrid111.ClientSettings.Scrolling.AllowScroll = true;
                HVRGrid111.ClientSettings.Scrolling.UseStaticHeaders = true;
                HVRGrid111.ClientSettings.Selecting.AllowRowSelect = true;

               
                HVRGrid111.DataSource = myds.Tables["cnpl"];
                HVRGrid111.DataBind();



                ViewState["DS"] = myds;
                for (int intcount = 0; intcount < HomeViewGrid.PageCount; intcount++)
                {
                    LI = new ListItem();
                    LI.Value = Convert.ToString(intcount);
                    LI.Text = Convert.ToString(intcount + 1) + " Of " + HomeViewGrid.PageCount.ToString();
                    MyViewPagination_DRP.Items.Add(LI);
                    //EnableLinks();
                }
              
                MyCell.Controls.Add(HVRGrid111 );
                if (myds.Tables[0].Rows.Count == 0)
                {
                    HtmlTable L1Table;
                    HtmlTableRow L1Row;
                    HtmlTableCell L1Cell;
                    L1Table = new HtmlTable();
                    L1Table.Attributes["class"] = ReadXML(_ThemeConfigName, "cssfor", "QcTable", "cssname", "name");
                    L1Table.Width = Unit.Percentage(100).ToString();
                    L1Table.Align = HorizontalAlign.Center.ToString();
                    L1Table.CellPadding = 2;
                    L1Table.CellSpacing = 0;
                    L1Table.Border = 0;
                    L1Table.BorderColor = ReadXML(_ThemeConfigName, "cssfor", "BorderCol", "cssname", "name");
                    L1Row = new HtmlTableRow();
                    L1Row.Align = HorizontalAlign.Center.ToString();
                    L1Row.VAlign = VerticalAlign.Middle.ToString();
                    L1Row.Attributes["class"] = ReadXML(_ThemeConfigName, "cssfor", "GridItem", "cssname", "name");
                    L1Cell = new HtmlTableCell();
                    L1Cell.Align = HorizontalAlign.Center.ToString();
                    L1Cell.InnerHtml = "<span class=\"" + ReadXML(_ThemeConfigName, "cssfor", "Error", "cssname", "name") + "\"> No Records Found !!!</span>";
                    L1Row.Cells.Add(L1Cell);
                    L1Table.Rows.Add(L1Row);
                    MyCell.Controls.Add(L1Table);

                }
               
            }
            catch (Exception ex)
            {
                PutErrorPage(ref MyCell, "Error While Creating View !!!!<br>" + ex.ToString());
            }
           
}

If I execute the above code I am getting the error mentioned above. This error is the blocking stone for my project .Please help me to resolve this error. 


Thanks in advance!
Ravi
Maria Ilieva
Telerik team
 answered on 14 Oct 2010
1 answer
44 views
Hi,

This week I test ASP.NET free trial Q2 2010, i used Black embedded skin who works perfectly in FireFox(last version) but not in Ie8.

First, display is not the same (color in textBox, radioButton look)between them.

Second, in Ie8 when my page is loading the textbox are first white and then goes black after a second wich is not very professionnal.

All componants are asp, excepts radEditor and radUpload.

Thanks
Bozhidar
Telerik team
 answered on 14 Oct 2010
3 answers
213 views
Hello,

I have a RadScheduler in a modal popup. On the first occasion of the popup being displayed the RadScheduler doesn't appear, but if I close (hide) the popup then bring it up again, the RadScheduler displays. It should also be noted that the width of the RadScheduler increases after each subsequent closure and re-opening of the popup that it is contained within, until it is 100% of the screen width.

I'm assuming that the RadScheduler isn't being instantiated properly, or binded to a data source properly.

Please can you offer any advice?

Regards
Peter
Telerik team
 answered on 14 Oct 2010
6 answers
310 views
I have just studied  RadControl for 1 week. So I have a lot of thing that I don't know. Sorry If my questions don't fit.

This is my problem:
How could you rebind a radgrid on a User Control from another User Control ?

I have an Content ASPX page( create from Master Page)  with two user controls pages. The first User Control Page is "Register Page", and the second UserControl Page is "Information Page". When I click Register Button on "Register Page" and Successfull , " Information Page" will rebind  RadGrid .

OK, I had Succeeded If Register and  RadGrid Information were on a ASPX page . But with this situation, I don't know how to do it . Thanks a lot !!!
Maria Ilieva
Telerik team
 answered on 14 Oct 2010
3 answers
70 views
I am attempting to create a RadGrid with a pager at the bottom. I'm having a hard time getting the pager to appear the way I want. If you look at the screen shot, you'll see the pager on the left side of the grid with 4 blank buttons, the pages 1 & 2 are right next to each other and the pager wraps onto multiple lines. I want to align the pager with the right side of the grid, get rid of the blank buttons (which I think are first page, prev page, next page and last page), separate the page numbers and display the pager on 1 line only. Please help me! Here is my aspx:

<%@ Page Title="Home Page" Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
    Inherits="WebApplication1.Default" %>
  
<%@ Register TagPrefix="rad" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title>Review Consumers Registered</title>
    <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR" />
    <meta content="C#" name="CODE_LANGUAGE" />
    <meta content="JavaScript" name="vs_defaultClientScript" />
    <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema" />
    <link href="Styles/RadStyles.css" type="text/css" rel="stylesheet" />
    <style type="text/css">
        div.RadGrid .rgPager .rgAdvPart
        {
            display: none;
        }
    </style>
</head>
<body>
    <form id="Form1" method="post" runat="server">
    <rad:RadScriptManager ID="RadScriptManager1" runat="server" />
    <rad:RadGrid ID="grdConsumers" runat="server" EnableEmbeddedSkins="False" AutoGenerateColumns="False"
        Width="100%" OnNeedDataSource="grdConsumers_NeedDataSource" OnItemDataBound="grdConsumers_ItemDataBound"
        CellPadding="0" GridLines="None">
        <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" Height="20px" />
        <PagerStyle CssClass="RadGridPager" Mode="NextPrevAndNumeric" NextPageText="Next >"
            PrevPageText="< Prev" PagerTextFormat="{4} | Page {0} of {1}" HorizontalAlign="Right" />
        <MasterTableView TableLayout="Fixed" AllowPaging="true" AllowCustomPaging="true"
            PageSize="10" GridLines="None" DataKeyNames="Id">
            <ItemStyle VerticalAlign="Middle" />
            <AlternatingItemStyle BackColor="#e6e6e6" VerticalAlign="Middle" />
            <Columns>
                <rad:GridBoundColumn UniqueName="Id" DataField="Id" Visible="False" />
                <rad:GridTemplateColumn HeaderStyle-Width="200" UniqueName="ConsumerName" HeaderText="Consumer Name">
                    <ItemTemplate>
                        <asp:HyperLink ID="lnkConsumerName" runat="server" /><br />
                        <asp:Label ID="lblAddress" runat="server" /><br />
                        <asp:Label ID="lblCityStateZip" runat="server" />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
                <rad:GridTemplateColumn HeaderStyle-Width="200" UniqueName="Employer" HeaderText="Employer">
                    <ItemTemplate>
                        <asp:Label ID="lblEmployer" runat="server" />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
                <rad:GridBoundColumn HeaderStyle-Width="150" UniqueName="CreatedDate" DataField="CreatedDate"
                    HeaderText="Date Created" DataFormatString="{0:d} {0:t}">
                </rad:GridBoundColumn>
                <rad:GridTemplateColumn HeaderStyle-Width="250" UniqueName="Enrollment" HeaderText="Enrollment">
                    <ItemTemplate>
                        <asp:Label ID="lblEnrollment" runat="server" />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
                <rad:GridTemplateColumn UniqueName="Actions" HeaderText="Actions">
                    <ItemTemplate>
                        <asp:Button ID="btnDelete" runat="server" Text="Delete" />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </rad:RadGrid>
    </form>
</body>
</html>
Pavlina
Telerik team
 answered on 14 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?