Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
117 views
Hi,

I have a Grid with more than 100 columns. Is is possible to jump to a specific column in this Grid?

Thanks for your help
Thomas
Dimo
Telerik team
 answered on 14 Oct 2010
4 answers
127 views
Hi
I want to update axaxPanel in source code. i used below code, but it throw exeption. may anyone help me please.
Best Regards. Morteza

 

<script type="text/javascript" language="javascript">

 

function test()

{

 

var id = $get('ddl_AdsPanel').value;

PageMethods.test(id, OnSuccessTypeAds, OnFailureTypeAds);

$get(

 

'RadAjaxPanel1').DataBind();  // this line not work here.

}

 

</script>

 

 

Mira
Telerik team
 answered on 14 Oct 2010
6 answers
172 views
When I try to call GetApointmentsInRange() I get no results back even though my datasource contains appointments. When I call DataBind() explicitly in Page_Load on my RadScheduler, I get results back... Am I supposed to be calling DataBind() explicitly? I don't call it for RadGrid so I wasn't sure. Any idea why I'm getting no results back in my AppointmentInsert() event?

void RadScheduler1_AppointmentInsert(object sender, Telerik.Web.UI.SchedulerCancelEventArgs e)
{
     //Returns no records
     var aps = RadScheduler1.Appointments.GetAppointmentsInRange(e.Appointment.Start, e.Appointment.End);
}     


Michael Malone
Top achievements
Rank 1
 answered on 14 Oct 2010
3 answers
159 views
Hi All,

I have two radgrids on my page

in first radgrid i am using pagination,
and in second radgrid i am using inline editing.

No my problem is that, when i press enter key on the screen, my second grid goes into edit mode automatically.

How can i pevent it.. please help me...

For more details please see in attached screen shot.
Maria Ilieva
Telerik team
 answered on 14 Oct 2010
2 answers
128 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
147 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
128 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
70 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
177 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
114 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?