Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
68 views
Hello,

I have been using this piece of code for a long time and it works fine, but after upgrading to Q1 2011 it fails because the if condition became false:

If e.Column.ColumnType = "GridBoundColumn" Then
      Select Case e.Column.DataType.Name
        Case "Int32"
           .....

I have read in section "What is fixed" in Q1 2001 the following: "Fixed: RadGrid does not create GridNumericColumn for int data type when AutoGenerateColumns=true "

On the other hand, this is what it's said in RadGrid Column types documentation:
"Automatically-generated columns are always of type GridBoundColumn."

And this is a fragment of a forum thread message:
"Well if the column's are AutoGenerated I don't see how any of them would be one of those specific types, since they should all be GridBoundColumn."

¿Could you please tell me which column type is the correct one for an auto generated column with integer data bound?.

Thanks in advance

Tsvetina
Telerik team
 answered on 11 May 2011
1 answer
195 views
Version: 2010.2.929.40
VS 2010, C# 4.0

I'm adding a CustomValidator to a RadAsyncUpload control.  I found the post that states that the ControlToValidate must NOT be set to validate this type of control, so I am not setting it.

The validation works, and the error shows up, but Microsoft's built-in function ValidatorSetFocus(val, event) { is being overridden by the method in Telerik.Web.UI.Input.TextBox.RadInputScript.js, and that method is dependent upon the ControlToValidate and is throwing a JavaScript error when trying to set the style of the rad upload control.

This is what is being executed in lieu of Microsoft's code.  g is always null because d.controltovalidate is undefined so getting/setting g.style causes the "there is no 'style' property in 'null'" exception.

if(typeof(ValidatorSetFocus)=="function"){ValidatorSetFocus=function(d,a){var g;
if(typeof(d.controlhookup)=="string"){var f;
if((typeof(a)!="undefined")&&(a!=null)){if((typeof(a.srcElement)!="undefined")&&(a.srcElement!=null)){f=a.srcElement;
}else{f=a.target;
}}if((typeof(f)!="undefined")&&(f!=null)&&(typeof(f.id)=="string")&&(f.id==d.controlhookup)){g=f;
}}if((typeof(g)=="undefined")||(g==null)){g=document.getElementById(d.controltovalidate);
}var c=false;
if((g.style)&&(typeof(g.style.visibility)!="undefined")&&(g.style.visibility=="hidden")&&(typeof(g.style.width)!="undefined")&&(document.getElementById(g.id+"_text")||document.getElementById(g.id+"_dateInput_text"))&&(g.tagName.toLowerCase()=="input"||g.tagName.toLowerCase()=="textarea")){c=true;
}if((typeof(g)!="undefined")&&(g!=null)&&(g.tagName.toLowerCase()!="table"||(typeof(a)=="undefined")||(a==null))&&((g.tagName.toLowerCase()!="input")||(g.type.toLowerCase()!="hidden"))&&(typeof(g.disabled)=="undefined"||g.disabled==null||g.disabled==false)&&(typeof(g.visible)=="undefined"||g.visible==null||g.visible!=false)&&(IsInVisibleContainer(g)||c)){if(g.tagName.toLowerCase()=="table"&&(typeof(__nonMSDOMBrowser)=="undefined"||__nonMSDOMBrowser)){var e=g.getElementsByTagName("input");
var b=e[e.length-1];
if(b!=null){g=b;
}}if(typeof(g.focus)!="undefined"&&g.focus!=null){if(c&&document.getElementById(g.id+"_text")){document.getElementById(g.id+"_text").focus();
}else{if(c&&document.getElementById(g.id+"_dateInput_text")){document.getElementById(g.id+"_dateInput_text").focus();
}else{g.focus();
}}Page_InvalidControlToBeFocused=g;
}}};

Here is my client side validator for the RadAsyncUpload control.  Nothing different than what is in the forum posts except for that in my case rau does not have a GetUploadedFiles() method so I go directly to the internal property _uploadedFiles.  Not sure why that is the case.
function radAsyncUpload_OnClientValidate(source, arguments) {
    var rau = $find("<%= rauUpload.ClientID %>");
    arguments.IsValid = rau._uploadedFiles.length > 0;
}

Anyone have any thoughts??  I can't see why the RadInputControl.ValidatorSetFocus would be overriding the validation on an upload control...

Thanks!
Thad
Genady Sergeev
Telerik team
 answered on 11 May 2011
6 answers
154 views
Hi,
I'm trying to implement selection list for lookup tables in the Radgrid popup edit/insert form.
I'd like to use Radcomboboxes with Radgrid as Item Template as described here: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridincombobox/defaultvb.aspx?product=grid
My scenario is a little bit different, because the RadComboBox i want to populate with the selection is in the edit form, and I don't know how to access this control. FindControl("RadComboboxName") returns "Nothing".
Thanks in advance.
D
daniele
Top achievements
Rank 1
 answered on 11 May 2011
1 answer
88 views

I can not figure out how to make my series text be aligned in the center and not the bottom - see image.  My code to create the line chart is below - I am using the Forest skin.

RadChart1.Chart.Series.Clear()
  RadChart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Font = New Font("Arial", 10)
  RadChart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = Color.Black
  RadChart1.PlotArea.XAxis.AutoScale = False
  RadChart1.PlotArea.XAxis.AddItem("Jan")
  RadChart1.PlotArea.XAxis.AddItem("Feb")
  RadChart1.PlotArea.XAxis.AddItem("Mar")
  RadChart1.PlotArea.XAxis.AddItem("Apr")
  RadChart1.PlotArea.XAxis.AddItem("May")
  RadChart1.PlotArea.XAxis.AddItem("Jun")
  RadChart1.PlotArea.XAxis.AddItem("Jul")
  RadChart1.PlotArea.XAxis.AddItem("Aug")
  RadChart1.PlotArea.XAxis.AddItem("Sep")
  RadChart1.PlotArea.XAxis.AddItem("Oct")
  RadChart1.PlotArea.XAxis.AddItem("Nov")
  RadChart1.PlotArea.XAxis.AddItem("Dec")
  RadChart1.PlotArea.XAxis.LayoutMode = ChartAxisLayoutMode.Between
  Dim currentSeries As ChartSeries = New ChartSeries("Current", ChartSeriesType.Line)
  RadChart1.AddChartSeries(currentSeries)
  currentSeries.Appearance.Border.Color = Color.Black
  currentSeries.Appearance.ShowLabels = False
  Dim priorSeries As ChartSeries = New ChartSeries("Previous", ChartSeriesType.Line)
  RadChart1.AddChartSeries(priorSeries)
  priorSeries.Appearance.FillStyle.FillType = FillType.Solid
  priorSeries.Appearance.TextAppearance.TextProperties.Font = New Font("Verdana", 6)
  priorSeries.Appearance.TextAppearance.TextProperties.Color = Color.Black
  priorSeries.Appearance.LabelAppearance.Border.Color = Color.Black
  priorSeries.Appearance.LabelAppearance.FillStyle.MainColor = Color.IndianRed
  priorSeries.Appearance.LabelAppearance.FillStyle.FillType = FillType.Solid
Evgenia
Telerik team
 answered on 11 May 2011
2 answers
96 views
I'm trying to use radajaxpanel in my page, but got the below exception.

"The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)."

Below is the code how am trying to use this in my page.

 <div id="pnlAddView">
            <telerik:radajaxpanel id="upSave" loadingpanelid="RadAjaxLoadingPanel1" runat="server">
                  <asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox>
                  <br />
                  <asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" />
                </telerik:radajaxpanel>
        </div>
        <div id="pnlMessageView" style="display: none;">
            Some static contents here.
        </div>


Thanks.

Umar
Top achievements
Rank 1
 answered on 11 May 2011
4 answers
588 views
I have two RadComboBoxes on my page that I can not reset.  Below is their definition and the code behind I am using to reset them.  I have two other RadComboboxes on that same page that I CAN reset.  The main difference is that the two I can not reset are "LoadOnDemand".  I've searched the forums and found a few people with the same problems, but I don't see an answer that works yet.

See attached image for example...

Help?

Thanks

Mark

HTML:
<telerik:RadComboBox ID="cboAgencies" runat="server" EmptyMessage="Type to 
Search..."<BR>                                                            
EnableAutomaticLoadOnDemand="true" EnableVirtualScrolling="true" 
ItemsPerRequest="100"<BR>                                                            
AutoPostBack="true" MarkFirstMatch="True" Skin="WebBlue" Width="205px" 
OnSelectedIndexChanged="cboAgencies_SelectedIndexChanged"><BR>                                                            
<WebServiceSettings Method="GetAgencies" Path="Talent.aspx" 
/><BR>                                                        
</telerik:RadComboBox><BR><BR> <telerik:RadComboBox ID="cboAgents" 
runat="server" EmptyMessage="Type to 
Search..."<BR>                                                            
EnableAutomaticLoadOnDemand="true" EnableVirtualScrolling="true" 
ItemsPerRequest="100"<BR>                                                            
MarkFirstMatch="True" Skin="WebBlue" Width="205px" AutoPostBack="true" 
OnSelectedIndexChanged="cboAgents_SelectedIndexChanged"><BR>                                                            
<WebServiceSettings Method="GetAgents" Path="Talent.aspx" 
/><BR>                                                        
</telerik:RadComboBox><BR>

Code Behind(on a Button Click):

 

<P>cboAgencies.Text = null;    //Also tried 
""<BR>cboAgencies.SelectedValue = null;<BR>cboAgencies.ClearSelection();</P>
<P><BR>cboAgents.Text = null;<BR>cboAgents.SelectedValue = 
null;<BR>cboAgents.ClearSelection();</P>
Kalina
Telerik team
 answered on 11 May 2011
1 answer
53 views
Hi,
I've been developing project using the RadDock control and have just noticed, when a user drags a dock, it can be dragged infinitely to the right or to the bottom of the page. I tried it on your demo page and saw the same thing - try it. Go here: http://demos.telerik.com/aspnet-ajax/dock/examples/default/defaultcs.aspx
Pick up one of the docks and drag your mouse out to the right...it just keeps going. Is there a way to stop this, so that it won't allow dragging outside the width or height of the main dock area? 

Thanks
Pero
Telerik team
 answered on 11 May 2011
3 answers
157 views
I was just wondering if there was a way to limit floating RadDocks to within the screen bounds? 
Pero
Telerik team
 answered on 11 May 2011
5 answers
308 views
Hello,

I have a dynamically created raddcok and  in which user control is loaded.

I want to update the user control contents on one of the command item click event. Well how is it possible to refresh the contents (may be page load event of the user control need to be called) ?

Protected Sub RadDock_Command(ByVal sender As Object, ByVal e As DockCommandEventArgs)
      if  e.Command.Name = "doRefresh" Then
            Dim doc2Refresh As String = DirectCast(sender, RadDock).UniqueName
            ' expect to refresh user control loaded within raddock.
           End If
    End Sub


Thanks.
Pero
Telerik team
 answered on 11 May 2011
1 answer
82 views
Why are the hot fixes not done as .msp files - due to local administrative rights policies in place at our organization we're finding it difficult to simply copy/paste the hot fix files over the originall installed files.  If we had a simple .msp file our lives would be made so much simpler.
Erjan Gavalji
Telerik team
 answered on 11 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?