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

 I got a question, is there any way to recognize inside the page_load event, that the page is at the moment in rad window or not ?.

Regards,
Tomek
Marin Bratanov
Telerik team
 answered on 11 May 2011
3 answers
64 views
Hello,i want get ControlID (<asp:image />) but this controlID belong ItemTemplate tag of Radgrid
This's CODE
<Columns>       
        <telerik:GridClientSelectColumn UniqueName="column1">
        </telerik:GridClientSelectColumn>       
        <telerik:GridTemplateColumn UniqueName="TemplateColumn">
            <ItemTemplate>
                  <asp:Image ID="okimg" BorderWidth="0px"  ImageUrl="hinh/MailFlagRed.png"
                               Style="float: right; cursor: pointer;" runat="server">
                            </asp:Image>
            </ItemTemplate>
        </telerik:GridTemplateColumn>       
    </Columns>
I also have two topics need help
http://www.telerik.com/community/forums/aspnet-ajax/grid/help-expand-button-in-radgrid.aspx
http://www.telerik.com/community/forums/aspnet-ajax/grid/clientselectcolumn-in-radgrid.aspx
Please Help Me
THANKS
Tsvetina
Telerik team
 answered on 11 May 2011
1 answer
52 views
Hello,

I currently have a RadGrid that has multiple columns with Auto Generated filters. The last column in the grid is a select column which I do not want a filter at the top of. I tried to fix this by adding an empty <FilterTemplate>&nbsp;</FilterTemplate>. This worked and removed the filter from above the select column, but none of my filters work now. If there a reason why this is happening?

My code is posted below:
<telerik:radgrid runat="server" DataSourceID="dsFindNavCustomers" 
    GridLines="None" ID="grdCustomers" AutoGenerateColumns="False" 
    AllowPaging="True" AllowSorting="True" PageSize="15" 
    AllowFilteringByColumn="True" CellSpacing="0">
    <PagerStyle Mode="Slider" />
    <FilterItemStyle HorizontalAlign="Left" />
    <MasterTableView datasourceid="dsFindNavCustomers"
        nomasterrecordstext="There are no customers matching your filters.">
        <Columns>
            <telerik:GridTemplateColumn DataField="No." HeaderText="Customer No." UniqueName="CustomerNo">
                <ItemTemplate>
                    <asp:Label ID="lblCustomerNo" runat="server" Text='<%# Container.DataItem("No.") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" HorizontalAlign="Left" 
                    Font-Strikeout="False" Font-Underline="False" Width="100px" Wrap="True" />
                <ItemStyle HorizontalAlign="Left" />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn DataField="Name" HeaderText="Customer Name" FilterControlWidth="120px"
                UniqueName="Name">
                <ItemTemplate>
                    <asp:Label ID="lblCustomerName" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                    <asp:Label ID="lblCompanyName" runat="server" 
                        Text='<%# Eval("Company Name") %>' Visible="False"></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" HorizontalAlign="Left"
                    Font-Strikeout="False" Font-Underline="False" Width="200px" Wrap="True" />
                <ItemStyle HorizontalAlign="Left" />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn DataField="Contact" HeaderText="Contact Name" FilterControlWidth="120px"
                UniqueName="Contact">
                <ItemTemplate>
                    <asp:Label ID="lblContactPersonName" runat="server" 
                        Text='<%# Eval("Contact") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" HorizontalAlign="Left"
                    Font-Strikeout="False" Font-Underline="False" Wrap="True" />
                <ItemStyle HorizontalAlign="Left" />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn DataField="City" HeaderText="Bill-to City" FilterControlWidth="110px"
                UniqueName="City">
                <ItemTemplate>
                    <asp:Label ID="lblCustomerCity" runat="server" Text='<%# Eval("City") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" HorizontalAlign="Left"
                    Font-Strikeout="False" Font-Underline="False" Width="125px" Wrap="True" />
                <ItemStyle HorizontalAlign="Left" />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn DataField="State" HeaderText="Bill-to State" FilterControlWidth="50px"
                UniqueName="State">
                <ItemTemplate>
                    <asp:Label ID="lblCustomerState" runat="server" Text='<%# Eval("State") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" HorizontalAlign="Left"
                    Font-Strikeout="False" Font-Underline="False" Width="65px" Wrap="True" />
                <ItemStyle HorizontalAlign="Left" />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="select">
                <ItemTemplate>
                    <asp:LinkButton ID="btnSelectCustomer" runat="server" CausesValidation="false" 
                        CommandName="Select" Text="Select"></asp:LinkButton>
                </ItemTemplate>
                <HeaderStyle Width="40px" Font-Bold="True" Font-Italic="False" HorizontalAlign="Left"
                    Font-Overline="False" Font-Strikeout="False" Font-Underline="False" 
                    Wrap="True" />
                <FilterTemplate>
                       
                </FilterTemplate>
                <ItemStyle HorizontalAlign="Center" />
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
    <clientsettings>
        <selecting enabledragtoselectrows="False" />
    </clientsettings>
</telerik:radgrid>

Any help would be greatly appreciated.
Thanks,
Ryan Pope
Pavlina
Telerik team
 answered on 11 May 2011
3 answers
109 views
Hello,

How can I tell RadComboBox, which column to search in, when I type something in the textbox?

Also How can I do contains search rather then starts with search?

Thanks.
Jimmy.
Dimitar Terziev
Telerik team
 answered on 11 May 2011
3 answers
101 views

Hello,

Every created appointment, there is gape in Appointment Scheduler slot. It is not show the full color in that appointment slot and it remain some space. It created a lot of problem when we try to manipulate lunch and block time. It created appointment in remaining gape area. It should not occurred this type of gape.

Also, I attached the related file of this problem.

Please help me as soon as possible.

Thanks


Best Regards


Mutum Jiten Singh

Peter
Telerik team
 answered on 11 May 2011
3 answers
117 views
Hi

I am using form edit in RadGrid. And am using following code.

<asp:Button ID="Button1" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
</asp:Button>&nbsp;
<asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
</asp:Button>


But the problem is, it not at all firing the client side OnCommand event.

Please help me.


Thanks,
John.
Marin
Telerik team
 answered on 11 May 2011
1 answer
53 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
167 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
145 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
71 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?