Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
130 views
Hi,

If I run the jscript function [Disable] on a button click, it works perfect, but, when this function is called by the window.onload, I get a error. The error ocorre because $find doesn't return a valid object, instead, it return a null. Why this happen? There is a way to work around it?

window.onload = function() 
{
   Disable();
}
  
function Disable()
{
  var txt = $find("RadTextBox1");
  txt.disable();
}
Dimo
Telerik team
 answered on 26 Aug 2010
1 answer
153 views
Hi,
I have a hierarchical grid that I am binding to a dataset.  One table is summary data and the second table is the detail data.  I have definied a relation using a field called ExpenditureType.  I am building all of my columns dynamically.  All works well, but my details table displays twice when I expand.  The code is pretty simple, so I can't figure out what is causing it.  I have attached a screenshot as well.  Do you see what I am doing wrong? 

Thanks!  Tami
private void BindGrid()
       { 
           RadGrid1.DataSource = _dsBudgetVerification.Tables["BVSummary"];
           RadGrid1.Width = Unit.Percentage(98);
           RadGrid1.AutoGenerateColumns = false;
           RadGrid1.GridLines = GridLines.Both;  //TODO:  This doesn't seem to work
           RadGrid1.CssClass="gridborder";
           RadGrid1.MasterTableView.DataKeyNames = new string[] { "ExpenditureType" };
           RadGrid1.MasterTableView.Name = "tvSummary";
           RadGrid1.MasterTableView.HierarchyLoadMode = GridChildLoadMode.ServerBind;
           //RadGrid1.MasterTableView.HierarchyLoadMode = GridChildLoadMode.Client;
           //RadGrid1.ClientSettings.AllowExpandCollapse = true;
            
           //Add Summary table
           RadGrid1.MasterTableView.Width = Unit.Percentage(100);
           GridBoundColumn boundColumn;
           GridDropDownColumn ddlColumn;
           foreach (DataColumn dataColumn in _dsBudgetVerification.Tables["BVSummary"].Columns)
           {
               //these apply to every column in Summary
               boundColumn = new GridBoundColumn();
               RadGrid1.MasterTableView.Columns.Add(boundColumn);
               boundColumn.HeaderText = dataColumn.Caption;
               boundColumn.HeaderStyle.CssClass = "gridheader";
               //we know the column names of the text fields, so let's set their formatting
               switch (dataColumn.Caption)
               {
                   case "EscalatorID":
                   case "EscalatorName":
                       { 
                           //TODO:  figure out how to add combobox here
                           boundColumn.DataField = dataColumn.Caption;
                           break;
                       }
                   case "ExpenditureType":
                   case "ExpenditureTypeExists":
                       {
                           boundColumn.DataField = dataColumn.Caption;
                           if (dataColumn.Caption == "ExpenditureTypeExists") boundColumn.Visible = false;
                           break;
                       }
                     
                   default:
                       //anything else will be an amount
                       {
                           boundColumn.DataField = dataColumn.Caption;
                           boundColumn.HeaderStyle.Width = 50;
   
                           //also build our list of months for use in the Total column
                           lstMonths += '"' + dataColumn.ColumnName + '"' + ',';
                           break;
                       }
               }
           }
          
           //now trim the last comma off the list
           lstMonths = lstMonths.Substring(1, lstMonths.Length - 3);
           //now add a calculated Total column at the end of the summary
           CreateCalcColumn(RadGrid1.MasterTableView, lstMonths);
                                    
           //Add Details table
           GridTableView tableViewDetails = new GridTableView(RadGrid1);
           RadGrid1.MasterTableView.DetailTables.Add(tableViewDetails);
           tableViewDetails.Width = Unit.Percentage(100);
           tableViewDetails.DataSource = _dsBudgetVerification.Tables["BVDetails"];
           tableViewDetails.DataMember = "BVDetails";
           tableViewDetails.DataKeyNames = new string[] { "ExpenditureType" };
           tableViewDetails.Name = "tvDetails";
           GridRelationFields relationFields = new GridRelationFields();
           relationFields.MasterKeyField = "ExpenditureType";
           relationFields.DetailKeyField = "ExpenditureType";
           tableViewDetails.ParentTableRelation.Add(relationFields);
           RadGrid1.MasterTableView.DetailTables.Add(tableViewDetails);
           foreach (DataColumn dataColumn in _dsBudgetVerification.Tables["BVDetails"].Columns)
           {
               switch (dataColumn.Caption)
               {
                   case "EscalatorID":
                   case "EscalatorName":
                       { 
                           //ddlColumn = new GridDropDownColumn();
                           //tableViewDetails.Columns.Add(ddlColumn);
                           //ddlColumn.UniqueName = "Escalator";
                           //ddlColumn.ListTextField = "Escalator";
                           //ddlColumn.ListValueField = "EscalatorID";
                           //ddlColumn.ListDataMember = "Escalator";
                           //ddlColumn.DataSourceID = "dsrcEscalators";
                           //ddlColumn.DataField = dataColumn.Caption;
                           //ddlColumn.HeaderText = dataColumn.Caption;
                           //ddlColumn.HeaderStyle.CssClass = "gridheader";
                           //ddlColumn.EditItemTemplate = new ddlTemplate();
                           break;
             
                       }
                   default:
                       {
                           boundColumn = new GridBoundColumn();
                           tableViewDetails.Columns.Add(boundColumn);
                           boundColumn.DataField = dataColumn.Caption;
                           boundColumn.HeaderText = dataColumn.Caption;
                           boundColumn.HeaderStyle.CssClass = "gridheader";
                           break;
                       }
               }
           }
           //now add a calculated Total column at the end of the details
           CreateCalcColumn(tableViewDetails, lstMonths);
       }
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
       <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="RadGrid1">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
               </UpdatedControls>
           </telerik:AjaxSetting>
       </AjaxSettings>
   </telerik:RadAjaxManager>
   <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
   </telerik:RadAjaxLoadingPanel>
   <telerik:RadGrid ID="RadGrid1" runat="server" OnItemDataBound="RadGrid1_ItemDataBound" />

Pavlina
Telerik team
 answered on 26 Aug 2010
5 answers
327 views
HI,

I need to enable jquery to run in the radeditor in design mode, so i can enable drag and drop of entire panels not only Html elements.
I already set the allowscript property to true, but still with no success neither in design mode or preview mode.

Any help Please.
Thanks.
Dobromir
Telerik team
 answered on 26 Aug 2010
3 answers
160 views
Hi,

I have implemented grouping feature for my rad grid. I set by default ExpandGroup as false so the all grouped cols are collapsed after grid loaded.
After that i did expanded some group columns and fortunately a button is clicked in then page and postback occurs. after post back again those grouped columns are collapsed. but i need those expanded items to be maintained.

Please give the solution to solve this issue. hope my explanation reaches the problem i am facing,

thanks
Maria Ilieva
Telerik team
 answered on 26 Aug 2010
2 answers
116 views
Hi,

I am using RadTimePicker.
i want to set specific time value when my page is load [Code Behind].

Plz suggest me ASAP.

Regards,
Parthesh
Gourangi
Top achievements
Rank 1
 answered on 26 Aug 2010
3 answers
78 views
The problem is that when I am using the down arrows to scroll through results, when the virtual scroll kicks in a loads more items, the focus gets changed to the input box and hence my scrolling starts again from the top element.

To reproduce:

Go to this page:
1. http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx
2.  click in the box for the web service example.
3.  click the down arrow on your keyboard 11 times.
4.  Notice that the selected item is the 1st item in the list when it should be the 11th.
Simon
Telerik team
 answered on 26 Aug 2010
16 answers
465 views

Hello

I have a grid just like in this demo:

http://demos.telerik.com/aspnet-ajax/grid/examples/client/resizing/defaultcs.aspx

with Column Resize = true and Resize grid on column resizing = false

at first my grid was fine and it resizes perfectly.

Then I add a property Scrolling.......

we set Scrolling = true, Static Header = true

My problem now is that when i resize the column to the right, the columns do not fit in the grid like in the demo above instead it overflow and it add a horizontal scrollbar.

I really dont want the horizontal scrollbar.

also if you adjust the column to the left, a white space is seen on the right.

Is there a way to stop the columns from overflowing or making white spaces.(letting the columns adjust like in the link above when you resize a column)

Thanks

Dimo
Telerik team
 answered on 26 Aug 2010
1 answer
107 views
Hi,

      Would there be any possiblity of Removing Apply CSS Drop down from RAD Editor ?. if so, what are the steps to achieve it.

    Thanks in advance.
Stanimir
Telerik team
 answered on 26 Aug 2010
4 answers
213 views
Is there a way to exclude certain columns from being clickable in a grid, so that they cannot be sorted.
Just because I have 10 columns listed, doesn't mean I want all of them to be sortable.

Please let me know.

Thanks.
Erik
Top achievements
Rank 1
 answered on 26 Aug 2010
0 answers
90 views
Hi, How can i use a RadUpload in to RadAjaxpanel and uploaded files without the page is refreshed?

In the following code, when i click on the Submit button, the page is not refreshed but the file is not uploaded. Who can i do it to upload file without the page is refreshed?

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="152px"

 

 

Width="300px" HorizontalAlign="NotSet">

 

 

 

<telerik:RadUpload ID="RadUpload1" runat="server"

 

 

AllowedFileExtensions=".jpg,.jpeg,.bmp,.gif"

 

 

ControlObjectsVisibility="ClearButtons" MaxFileInputsCount="1" MaxFileSize="1000000"

 

 

Skin="Vista" TargetFolder="~/Files" />

 

 

 

<hr />

 

 

 

<asp:Button ID="Button1" runat="server" Text="Submit" onclick="Button1_Click" />

 

 

 

</telerik:RadAjaxPanel>

 

 

 

 

mojy
Top achievements
Rank 1
 asked on 26 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?