Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
262 views
I am creating a RadGrid as follows:
protected override void OnInit(EventArgs e)
      {
          this.Controls.Clear();
          this._RadLoadingPanel.ID = "_RadLoadingPanel";
          this._RadLoadingPanel.Transparency = 30;
          this._RadLoadingPanel.Skin = "WebBlue";
          this._RadLoadingPanel.BackgroundPosition = AjaxLoadingPanelBackgroundPosition.Center;
          this.Controls.Add(this._RadLoadingPanel);
 
          this._RadGrid1.Skin = "WebBlue";
          this._RadGrid1.Width = Unit.Percentage(98);
          this._RadGrid1.GridLines = GridLines.None;
 
          this._RadGrid1.AutoGenerateColumns = false;
          this._RadGrid1.AllowSorting = true;
          this._RadGrid1.GridLines = GridLines.None;
          this._RadGrid1.PageSize = 100;
          this._RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
          this._RadGrid1.ShowGroupPanel = true;
          this._RadGrid1.AllowPaging = true;
          this._RadGrid1.AllowSorting = true;         
          this._RadGrid1.EnableLinqExpressions = false;
          this._RadGrid1.MasterTableView.NoMasterRecordsText = string.Format("There are no documents associated with this order / quote / proposal.");
          this._RadGrid1.MasterTableView.Width = Unit.Percentage(100);                 
           
          this._RadGrid1.NeedDataSource += RadGrid1_NeedDataSource;
                      
         // Setup Columns          
          GridBoundColumn boundColumn = new GridBoundColumn();
          this._RadGrid1.MasterTableView.Columns.Add(boundColumn);
          boundColumn.DataField = this._DocList.DescriptionColumn.ColumnName;
          boundColumn.HeaderText = "Document Type";
          boundColumn.UniqueName = "DocumentType";
          boundColumn.AllowSorting = true;     
        
          this._UpdatePanel.Unload += new EventHandler(UpdatePanel_Unload);
          this._UpdatePanel.ID = "ajaxPanel";
          this._UpdatePanel.UpdateMode = UpdatePanelUpdateMode.Always;
          this._UpdatePanel.ContentTemplateContainer.Controls.Add(this._RadGrid1);
 
          this.Controls.Add(this._UpdatePanel);
                       
          base.OnInit(e);
        
      }
protected override void OnPreRender(EventArgs e)
      {
          _RadGrid1.MasterTableView.Rebind();
          base.OnPreRender(e);       
          var ajaxManager = RadAjaxManager.GetCurrent(Page);
 
          if (ajaxManager != null)
              ajaxManager.AjaxSettings.AddAjaxSetting(this._UpdatePanel, this._RadGrid1, this._RadLoadingPanel);         
      }

It gives the following error:
Cannot unregister UpdatePanel with ID 'ajaxPanel' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported.
Parameter name: updatePanel

After reading in forums I added the following:
void UpdatePanel_Unload(object sender, EventArgs e)
     {
         MethodInfo methodInfo = typeof(ScriptManager).GetMethods(BindingFlags.NonPublic | BindingFlags.Instance)
     .Where(i => i.Name.Equals("System.Web.UI.IScriptManagerInternal.RegisterUpdatePanel")).First();
         methodInfo.Invoke(ScriptManager.GetCurrent(Page),
             new object[] { sender as UpdatePanel });
     }      

This did not resolve it. I even added this.COntrols.clear, but did not work. When I comment out the  boundColumn.DataField = this._DocList.DescriptionColumn.ColumnName; statement, it displays a grid.
Please help me resolve this.
Eyup
Telerik team
 answered on 23 Apr 2014
3 answers
301 views
We are using telerik version 2011.2.915.40.

With Date Picker I am facing issue where I am getting auto populated 0nan/nan/0nan date in date picker and I have not used any Max/Min/Selected date for picker. I am getting this error only for chrome version 34.0.1847.116. It does work for other versions of Chrome and also for Safari/IE/Mozilla.

When I looked into chrome developer tools, I found error stating Invalid YEAR.

Could you please assist on this as we are end up with solutions and clients are insisting on using Chrome only.

Regards,
Dhaval Shukla
Shinu
Top achievements
Rank 2
 answered on 23 Apr 2014
1 answer
109 views
Telerik ASP.Net AJAX

Version – 2012.1.215.40


Following is the issue that we are facing while using “telerik
radgrid” control. Using scrollbars feature for the radgrid we can see the white
space highlighted in RED (image "GridViewScroll issue 1")

However we would want this white space should be equivalent to
the other column headers background. Is there any solutions with the above mentioned version of teleriks.

While going through the demo on telerik website, I have
found that this issue is not there in current version(ref below figure), can
you please ensure that this issue is resolved in latest version of telerik.
(image "GridViewScroll issue 2")
 



 





 

Venelin
Telerik team
 answered on 23 Apr 2014
11 answers
822 views
I've got a grid with 3 columns set to display=false and after updating my radcontrols to the non-trial version they appear on pageLoad even when Display="False" is set. Any ideas as to what could be the problem there?
Princy
Top achievements
Rank 2
 answered on 23 Apr 2014
1 answer
139 views
i have a radgrid with this column :

<telerik:GridBoundColumn Display="false" DataField="FEATURE_ID" UniqueName="FeatureID"></telerik:GridBoundColumn>

and it contains a detailtable.

what i want is to check every row, if Feature ID = 3 , the row should be expanded.


Princy
Top achievements
Rank 2
 answered on 23 Apr 2014
1 answer
209 views
I have a multi-column combobox that the user wants an ID to show in the box but be able to search on a name using the MarkFirstMatch. What I have noticed is the MarkFirstMatch works on the item.text when the databound event fires. If I set the ID to the text property then you can't search by name. If I set the name to the text property you can search by name but it will not display the ID. Is there anyway to get around this. I have tried the OnItemsRequested but the users don't like the list to get shortned, they just want the hi-light to go to the rows as they type.

telerik:RadComboBox ID="radCBTaxonomy" runat="server" AllowCustomText="true" HighlightTemplatedItems="true"
    DropDownWidth="350px" Width="125px" MaxHeight="200px" OnClientKeyPressing="ChangeToUpperCase" MarkFirstMatch="true"
    OnClientLoad="ChangeToUpperCase" AutoPostBack="true">
    <HeaderTemplate>
        <table style="width: 300px; text-align: left; font-size: 8pt">
            <tr>
                <td style="width: 100px;">
                    Taxonomy Code
                </td>
                <td style="width: 200px;">
                    Name
                </td>
            </tr>
        </table>
    </HeaderTemplate>
    <ItemTemplate>
        <table style="width: 300px; text-align: left; font-size: 8pt">
            <tr>
                <td style="width: 100px; text-transform: uppercase;">
                    <%#DataBinder.Eval(Container.DataItem, "Taxonomy")%>
                </td>
                <td style="width: 200px; text-transform: uppercase;">
                    <%# DataBinder.Eval(Container.DataItem, "ProvName")%>
                </td>
            </tr>
        </table>
    </ItemTemplate>
</telerik:RadComboBox>

ItemDatabound event
e.Item.Text = (DirectCast(e.Item.DataItem, DataRowView))("ProvName").ToString.ToUpper()
e.Item.Value = (DirectCast(e.Item.DataItem, DataRowView))("Taxonomy").ToString.ToUpper()

Shinu
Top achievements
Rank 2
 answered on 23 Apr 2014
5 answers
414 views
Hello.

I have this issue i have grid that i modify data with the event ItemDataBound how can i get the sum and put in the footer of the grid of thes columns, since i dont populate this columns with NeedDataSource

Thanks in advence
Hector Hernandez
Top achievements
Rank 2
 answered on 22 Apr 2014
2 answers
138 views
I have a boolean ShowDelete. If it is true, Delete button in the grid columns should be visible. Not otherwise. How can I achieve this?
RB
Top achievements
Rank 1
 answered on 22 Apr 2014
5 answers
219 views
Can anyone please post some examples how to implement cascading functionality using AutocompleteBox.


I have a scenario where there are two Autocomplete dropdown listing Country and State values.

When the user selects a particular country, the state AutocompleteBox should automatically refresh and list the State values based on the country selected.

Thanks for the help.

Kannan
KANNAN
Top achievements
Rank 1
 answered on 22 Apr 2014
2 answers
255 views
I am implementing cascading dropdownlist . The dropdown are in the radgrid Inline Edit Mode.
protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
      {
 
          if (e.Item is GridEditableItem && e.Item.IsInEditMode)
          {
              GridEditableItem item = e.Item as GridEditableItem;
              GridEditManager manager = item.EditManager;
 
              HyperLink hyperLink = (HyperLink)item["OrderTask"].Controls[0];
              hyperLink.Visible = false;
 
              DropDownList droplist = new DropDownList();
 
              droplist.ID = "DropDownListOrderTask";
              droplist.AutoPostBack = true;         
              item["OrderTask"].Controls.Add(droplist);
              CascadingDropDown ccdOrderTask = new CascadingDropDown();
              ccdOrderTask.ID = "ccdOrderTask";
              ccdOrderTask.Category = "OrderTask";
              ccdOrderTask.TargetControlID = "DropDownListOrderTask";
              ccdOrderTask.PromptText = "Select Order Task";
              ccdOrderTask.LoadingText = "Loading OrderTask";
              ccdOrderTask.ServiceMethod = "BindOrderTask";
              ccdOrderTask.ServicePath = "ajaxservice.asmx";                            
                 
              TextBox txt = (TextBox)item["TaskOwner"].Controls[0];
              txt.Visible = false;
              droplist = new DropDownList();
              droplist.ID = "DropDownListTaskOwner";
              item["TaskOwner"].Controls.Add(droplist);
              CascadingDropDown ccdTaskOwner = new CascadingDropDown();
              ccdTaskOwner.ID = "ccdTaskOwner";
              ccdTaskOwner.Category = "TaskOwner";
              ccdTaskOwner.ParentControlID = "DropDownListOrderTask";
              ccdTaskOwner.TargetControlID = "DropDownListTaskOwner";
              ccdTaskOwner.PromptText = "Select Task Owner";
              ccdTaskOwner.LoadingText = "Loading Task Owner";
              ccdTaskOwner.ServiceMethod = "BindTaskOwner";
              ccdTaskOwner.ServicePath = "ajaxservice.asmx"; 
          }
      }

OnPrerender I have the following:
protected override void OnPreRender(EventArgs e)
       {
           base.OnPreRender(e);
            
           var ajaxManager = RadAjaxManager.GetCurrent(Page);
 
           if(ajaxManager != null)
               ajaxManager.AjaxSettings.AddAjaxSetting(this._UpdatePanel, this._RadGrid1, this._RadLoadingPanel);         
       }


In the ajaxservice.asmx I have the following:

[WebMethod]
      public CascadingDropDownNameValue[] BindOrderTask(string knownCategoryValues, string category)
      {
          OrderRequestTaskTypeTable _orderRequestTaskTypeTable = new OrderRequestTaskType_List().ExecuteTypedDataTable();
          List<CascadingDropDownNameValue> orderTaskDetails = new List<CascadingDropDownNameValue>();
          foreach(DataRow dtRow in _orderRequestTaskTypeTable.Rows)
          {
                 String orderTaskId = dtRow["OrderRequestTaskTypeId"].ToString();
                 String orderTaskName = dtRow["DescriptionTaskType"].ToString();
                  //orderTaskDetails.Add(new CascadingDropDownNameValue(orderTaskId, orderTaskName));
                 orderTaskDetails.Add(new CascadingDropDownNameValue("orderTaskId", "orderTaskName"));
           }
            return orderTaskDetails.ToArray();
      }            
          

The 1st dropdown which calls BindOrderTask is empty! Am I missing something?
Marin
Telerik team
 answered on 22 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?