Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
227 views
I have a RadTextBox on the screen and I am trying to customize the label as illustrated in .http://www.telerik.com/help/aspnet-ajax/input-adding-labels.html.  I'm not sure I understand what I'm seeing.

It looks to me like some but not all aspects of the css class are being implemented in the box label.  I can set colors but so far I have been unable to set the font size or boldness. 

Suggestions?
Boris
Top achievements
Rank 1
 answered on 27 Feb 2013
3 answers
198 views
Hi,

I am trying to add a custom HeaderContextMenu item and handle the ItemClick.

Here is my code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    GridCGSI_UpdateDefaults(RadGrid1)
 
    AddHandler RadGrid1.HeaderContextMenu.PreRender, AddressOf HeaderContextMenu_PreRender
    AddHandler RadGrid1.HeaderContextMenu.ItemClick, AddressOf HeaderContextMenu_ItemClick
End Sub
 
Protected Sub HeaderContextMenu_PreRender(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim menu As RadContextMenu = RadGrid1.HeaderContextMenu
    Dim separator As New RadMenuItem()
    Dim item As New RadMenuItem()
 
    separator.IsSeparator = True
    menu.Items.Add(separator)
 
    item.Text = "Save settings"
    item.Value = "SaveSettings"
    item.PostBack = True
    menu.Items.Add(item)
End Sub
 
Protected Sub HeaderContextMenu_ItemClick(ByVal sender As Object, ByVal e As RadMenuEventArgs)
 
End Sub
 
Public Sub GridCGSI_UpdateDefaults(ByVal tmpGrid As RadGrid)
 
    tmpGrid.CellSpacing = "0"
    tmpGrid.AutoGenerateColumns = False
    tmpGrid.AllowPaging = True
    tmpGrid.PageSize = 40
    tmpGrid.AllowSorting = True
 
    tmpGrid.GridLines = GridLines.None
 
    tmpGrid.AllowFilteringByColumn = True
    tmpGrid.EnableHeaderContextMenu = True
    tmpGrid.ShowStatusBar = True
 
    tmpGrid.HeaderContextMenu.Enabled = True
    tmpGrid.MasterTableView.SortExpressions.AllowNaturalSort = False
    tmpGrid.AllowMultiRowEdit = False
 
End Sub

My problem is when I click on my custom item "Save settings" it shows me an asp error of a NullReferenceException:

[NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.]
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +147
   System.Web.UI.Page.FindControl(String id) +38
   Telerik.Web.UI.RadGrid.headerContextMenu_ItemClick(Object sender, RadMenuEventArgs e) +242
   Telerik.Web.UI.RadMenuEventHandler.Invoke(Object sender, RadMenuEventArgs e) +0
   Telerik.Web.UI.RadMenu.RaiseMenuItemEvent(Object eventKey, RadMenuEventArgs e) +123
   Telerik.Web.UI.RadMenu.OnItemClick(RadMenuEventArgs e) +42
   Telerik.Web.UI.RadMenu.RaiseItemClick(ControlItem item) +102
   Telerik.Web.UI.RadMenu.RaisePostBackEvent(String nodeIndex) +73
   Telerik.Web.UI.RadMenu.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String nodeIndex) +39
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

Why this is happening?

Thanks.
Jocelyn
Top achievements
Rank 1
 answered on 27 Feb 2013
5 answers
333 views
Hi,

I am trying to deploy VS 2012 Pro and Telerik Dev UI using SCCM 2012.

Is there a commandline syntax for custom install dir. I want to install it to D: instead of normal c:\Program FilesXXXX.

Also will it work for other Dev UI Tools?

Regards

VJ
Vesko
Telerik team
 answered on 27 Feb 2013
3 answers
295 views
    I have a RadGrid with GridNumericColumn. The culture of page is "es-ES" and collate of SQL Server Database is "Modern_Spanish_CI_AI".

    In Spain decimal separator is "," and group separator is ".". RadGrid use culture "es-ES" in ViewMode, but in edit mode I belive that it use default culture.

    For example, in database i have stored the value "0,22" (this value is < 1 and >0, zero comma twenty two) (Sql server datatype => float, equivalent to double in .NET framework). Now:
  • In ViewMode: appear "0,22" (zero comma twenty two), but
  • In EditMode: appear "22" (twenty two)
Note: RadGrid use a SqlDataSource standard.

<telerik:GridNumericColumnEditor ID="GridNumericColumnEditor1" runat="server">   
            <NumericTextBox runat="server"> 
                <NumberFormat DecimalSeparator="," GroupSeparator="." />  
            </NumericTextBox>  
        </telerik:GridNumericColumnEditor>  
         
       <telerik:RadGrid ID="RadGrid1"  DataSourceID="SqlDataSource1" AllowMultiRowSelection="True" AllowMultiRowEdit="True" 
        Skin="Web20" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" 
        Width="99%" AllowAutomaticUpdates="True" AllowPaging="True" AutoGenerateColumns="False" GridLines="None" OnItemDataBound="RadGrid1_ItemDataBound" > 
            <PagerStyle Mode="Slider" /> 
               
                <ClientSettings> 
                    <Selecting AllowRowSelect="True" /> 
                    <ClientMessages PagerTooltipFormatString="P&#225;gina: &lt;b&gt;{0}&lt;/b&gt; de &lt;b&gt;{1}&lt;/b&gt;" /> 
                </ClientSettings> 
            <MasterTableView CommandItemDisplay="Top" DataKeyNames="ID_MATERIAL" DataSourceID="SqlDataSource1" EditMode="InPlace"> 
                <ExpandCollapseColumn Resizable="False" Visible="False"> 
                    <HeaderStyle Width="20px" /> 
                </ExpandCollapseColumn> 
                <RowIndicatorColumn Visible="False"> 
                    <HeaderStyle Width="20px" /> 
                </RowIndicatorColumn> 
                <Columns> 
                    .... 
 
                    <telerik:GridNumericColumn DataType="System.Double" ColumnEditorID="GridNumericColumnEditor1" NumericType="Number" DataField="NUM_CONDUCTIVIDAD" HeaderText="Conductividad" 
                        SortExpression="NUM_CONDUCTIVIDAD" UniqueName="NUM_CONDUCTIVIDAD" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="10%" > 
                    </telerik:GridNumericColumn> 
...... 
 
 
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" EditText="Editar" InsertText="Insertar" UpdateText="Actualizar"> 
                        <HeaderStyle Width="25px" /> 
                    </telerik:GridEditCommandColumn> 
                    <telerik:GridClientDeleteColumn ConfirmText="&#191;Est&#225; seguro?" ButtonType="ImageButton" ImageUrl="~/img/Grid/Delete.gif" Text="Delete" UniqueName="column"> 
                        <HeaderStyle Width="25px" /> 
                    </telerik:GridClientDeleteColumn> 
                </Columns> 
             
                <EditFormSettings ColumnNumber="2" CaptionDataField="DSC_MATERIAL" CaptionFormatString="Editando &lt;strong&gt;{0}&lt;/strong&gt;"> 
                    <FormTableItemStyle Wrap="False"></FormTableItemStyle> 
                    <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle> 
                    <FormMainTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="3" BackColor="White" Width="100%" /> 
                    <FormTableStyle CellSpacing="0" CellPadding="2" CssClass="module" BackColor="White" /> 
                    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle> 
                    <EditColumn ButtonType="ImageButton" 
                        UpdateImageUrl="~\Img\Grid\Update.gif" EditImageUrl="~\Img\Grid\Edit.gif" 
                        InsertImageUrl="~\Img\Grid\Insert.gif" CancelImageUrl="~\Img\Grid\Cancel.gif" 
                        InsertText="Insertar" UpdateText="Actualizar" UniqueName="EditCommandColumn1" CancelText="Cancelar"> 
                    </EditColumn> 
                    <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle> 
                    <PopUpSettings ScrollBars="None" /> 
                </EditFormSettings> 
             
            </MasterTableView> 
           <FilterItemStyle BackColor="Gainsboro" /> 
                         
        </telerik:RadGrid> 
 
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:LabLATConnectionString %>" 
        DeleteCommand="DELETE FROM [MATERIAL] WHERE [ID_MATERIAL] = @original_ID_MATERIAL" 
        InsertCommand="INSERT INTO [MATERIAL] ([DSC_MATERIAL], [NUM_CONDUCTIVIDAD], [BOL_ACTIVO], [DSC_USR_UPD], [DAT_UPD]) VALUES (@DSC_MATERIAL, @NUM_CONDUCTIVIDAD, @BOL_ACTIVO, @DSC_USR_UPD, @DAT_UPD)" 
        OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT [ID_MATERIAL], [DSC_MATERIAL], [NUM_CONDUCTIVIDAD], [BOL_ACTIVO], [DSC_USR_UPD], [DAT_UPD] FROM [MATERIAL]" 
        UpdateCommand="UPDATE [MATERIAL] SET [DSC_MATERIAL] = @DSC_MATERIAL, [NUM_CONDUCTIVIDAD] = @NUM_CONDUCTIVIDAD, [BOL_ACTIVO] = @BOL_ACTIVO, [DSC_USR_UPD] = @DSC_USR_UPD, [DAT_UPD] = @DAT_UPD WHERE [ID_MATERIAL] = @original_ID_MATERIAL"> 
        <DeleteParameters> 
            <asp:Parameter Name="original_ID_MATERIAL" Type="Int32" /> 
        </DeleteParameters> 
        <UpdateParameters> 
            <asp:Parameter Name="DSC_MATERIAL"      Type="String" /> 
            <asp:Parameter Name="NUM_CONDUCTIVIDAD" Type="Double"/> 
            <asp:Parameter Name="BOL_ACTIVO"        Type="Boolean" /> 
            <asp:Parameter Name="DSC_USR_UPD"       Type="String"  /> 
            <asp:Parameter Name="DAT_UPD"           Type="DateTime" /> 
            <asp:Parameter Name="original_ID_MATERIAL" Type="Int32"  /> 
        </UpdateParameters> 
        <InsertParameters> 
            <asp:Parameter Name="DSC_MATERIAL" Type="String" DefaultValue="" /> 
            <asp:Parameter Name="NUM_CONDUCTIVIDAD" Type="Double" /> 
            <asp:Parameter Name="BOL_ACTIVO" Type="Boolean" /> 
            <asp:Parameter Name="DSC_USR_UPD" Type="String"  /> 
            <asp:Parameter Name="DAT_UPD" Type="DateTime"  /> 
        </InsertParameters> 
    </asp:SqlDataSource> 
Eyup
Telerik team
 answered on 27 Feb 2013
3 answers
75 views
the option of filter equal to, contains etc has desapear fro my grid any idea to solve it?
Eyup
Telerik team
 answered on 27 Feb 2013
9 answers
374 views
How can I display/hide ribbon bar group with javascript ?
Ivan Zhekov
Telerik team
 answered on 27 Feb 2013
1 answer
156 views
Hello,

I have run into a scenario where underlining cannot be removed using the editor. The HTML of the content can be seen below and this is reproducible on the demo site.
 
It seems like if there is more than one item in the style tag, it will not allow you to remove the underline. For example, if I remove "FONT-SIZE:14;" I can successfully remove the underline. Is this a bug? If not, is there a content filter that should take care of this? Thanks.

<P><STRONG><FONT style="FONT-SIZE: 14pt; TEXT-DECORATION: underline">Test Line1</FONT></STRONG> </P>
<P><STRONG><FONT style="FONT-SIZE: 14pt; TEXT-DECORATION: underline">Test Line2</FONT></STRONG></P>
<P><STRONG><FONT style="FONT-SIZE: 14pt; TEXT-DECORATION: underline">Test Line3 </FONT></STRONG></P>
<P><B><STRONG><FONT style="FONT-SIZE: 14pt; TEXT-DECORATION: underline">Test Line4</FONT></STRONG></B> </P>
Rumen
Telerik team
 answered on 27 Feb 2013
1 answer
153 views
I am using the Q3 2012 release of ASP.NET AJAX. The ForeColor property doesn't look like it is applying to my text. When I inspected the tooltip in chrome, it doesn't look like that color is being overridden by any of my styles. Is this property broken in the ToolTip control?

Edit: I just tested CssClass and that isn't being applied to my text either.
Marin Bratanov
Telerik team
 answered on 27 Feb 2013
1 answer
200 views
hi...

this is my web page where i use a radlistview:
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="ImageButtonRicerca">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="Panel1"
LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadFormDecorator ID="QsfFromDecorator" runat="server"
DecoratedControls="Textbox" Skin="Sunset" />
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
Skin="Simple" BorderColor="#D5842B" BorderStyle="Double" BorderWidth="1px">
</telerik:RadAjaxLoadingPanel>
<div align="center" class="backgroundup">
<div align="center" class="banner">
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="85px" width="1024px">
<div style="padding-left:200px;">
<div class="profilesearch">
<asp:Panel ID="Panel1" runat="server" DefaultButton="ImageButtonRicerca" Height="55px">
<table style="width:620px; padding-top:6px">
<tr>
<td style="width: 360px; margin: 0px; border: 0px; padding: 0px; text-align: right;">
<telerik:RadTextBox ID="Txt_ricerca1" Runat="server"
EmptyMessage="Nominativo o azienda o categoria" Width="350px" Height="23px" Skin="" Font-Italic="True"
Font-Names="Verdana">
<EmptyMessageStyle ForeColor="Gray" Font-Italic="True" Font-Names="Verdana" />
<HoveredStyle Font-Italic="True" Font-Names="Verdana" ForeColor="#993300" />
</telerik:RadTextBox>
</td>
<td style="width: 260px; margin: 0px; border: 0px; padding: 0px; text-align: left;">
<telerik:RadTextBox ID="txt_ricerca2" Runat="server"
EmptyMessage="Città di residenza" Width="250px" Height="23px" Skin="" Font-Italic="True"
Font-Names="Verdana">
<EmptyMessageStyle ForeColor="Gray" Font-Italic="True" Font-Names="Verdana" />
<HoveredStyle Font-Italic="True" Font-Names="Verdana" ForeColor="#993300" />
</telerik:RadTextBox>
</td>
<td style="width: 80px; margin: 0px; border: 0px; padding: 0px;">
<asp:ImageButton ID="ImageButtonRicerca" runat="server"
ImageUrl="~/Image/cerca.png" />
</td>
</tr>
</table>
</asp:Panel>
</div>
</div>
</telerik:RadAjaxPanel>
</div>
<telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" Width="700px"
HorizontalAlign="NotSet" LoadingPanelID="RadAjaxLoadingPanel1">
<div class="divresultmenu">
<telerik:RadMenu ID="RadMenu1" runat="server" Skin="Office2010Silver"
OnItemClick="RadMenu1_ItemClick">
<Items>
<telerik:RadMenuItem runat="server" Font-Names="Verdana" Font-Size="Small"
Text="Home page" Owner="RadMenu1">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" IsSeparator="True" Text="Root RadMenuItem2">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Font-Names="Verdana" Font-Size="Small"
Text="Registrati in Trycontact">
</telerik:RadMenuItem>
</Items>
</telerik:RadMenu>
</div>
<div class="resultseparator">
</div>
<div style="font-family:Verdana" id="div_radlistview">
<telerik:RadListView ID="RadListView1" runat="server" DataKeyNames="idutente"
ItemPlaceholderID="Contenitore" AllowPaging="True" Skin="Office2010Silver"
Width="655px">
<LayoutTemplate>
<fieldset id="FieldSet1">
<legend>Risultati della ricerca:</legend>
<asp:PlaceHolder ID="Contenitore" runat="server"></asp:PlaceHolder>
<div>
<div style="float: left; margin-left: 30%;">
<telerik:RadButton ID="btnFirst" runat="server" Text="Prima" CommandName="Page" CommandArgument="First"
Enabled="<%#Container.CurrentPageIndex > 0 %>" Skin="Office2010Silver">
</telerik:RadButton>
<telerik:RadButton ID="btnPrev" runat="server" Text="Precedente" CommandName="Page" CommandArgument="Prev"
Enabled="<%#Container.CurrentPageIndex > 0 %>" Skin="Office2010Silver">
</telerik:RadButton>
<span style="vertical-align: top; position: relative; top: 4px">Pagina
<%#Container.CurrentPageIndex + 1 %>
di
<%#Container.PageCount%></span>
<telerik:RadButton ID="btnNext" runat="server" Text="Successiva" CommandName="Page" CommandArgument="Next"
Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>" Skin="Office2010Silver">
</telerik:RadButton>
<telerik:RadButton ID="btnLast" runat="server" Text="Ultima" CommandName="Page" CommandArgument="Last"
Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>" Skin="Office2010Silver">
</telerik:RadButton>
</div>
</div>
</fieldset>
</LayoutTemplate>
<ItemTemplate>
<div class="item">
<div class="image">
<asp:Image ID="Image1" runat="server" ImageUrl='<%# CType(Container.DataItem, PropertyUtente).imageprofile%>' Height="120px" Width="110px"/>
</div>
<div class="content">
<div class="user">
<b><%# CType(Container.DataItem, PropertyUtente).utente%></b>
</div>
<div class="description_category">
Categoria: <%# CType(Container.DataItem, PropertyUtente).Desccategoria%>
</div>
<div class="description_city">
Città: <%# CType(Container.DataItem, PropertyUtente).Desccomune%></div>
<div class="description_phone">
Telefono: <%# CType(Container.DataItem, PropertyUtente).Telefono%></div>
<div class="description_email">
Email: <%# CType(Container.DataItem, PropertyUtente).Email%>
</div>
<div class="item_button">
<telerik:RadButton ID="RadButton1" runat="server" Text="Visualizza biglietto completo" Width="170px" Skin="Office2010Silver"
OnClick="RadButton1_Click">
</telerik:RadButton>
</div>
</div>
</div>
</ItemTemplate>
</telerik:RadListView>
</div>
</telerik:RadAjaxPanel>
<div align="center" style="background-image: url('Image/backgroundTeca2.jpg'); background-repeat: repeat-x; height: 33px;" id="under">
</div>
</div>
</form>

this is my code behind with i load racord in the radlistview:


Imports System
Imports System.Data
Imports System.Web
Imports System.Data.SqlClient
Imports Telerik.Web.UI
Imports System.IO
Imports System.Web.UI.HtmlControls
     
Private Loadsearch As New GestoreUtente
#Region "routine"
    Private Sub Carica_risultati(ByVal _str1 As String, ByVal _str2 As String)
        Dim lista As List(Of PropertyUtente) = Loadsearch.Search(_str1, _str2)
        RadListView1.DataSource = lista
        RadListView1.DataBind()
    End Sub
#End Region
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            Dim _str1, _str2 As String
            _str1 = Request.QueryString("_str1")
            _str2 = Request.QueryString("_str2")
            Carica_risultati(_str1, _str2)
        End If
    End Sub
 
    Protected Sub ImageButtonRicerca_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImageButtonRicerca.Click
        Carica_risultati(Txt_ricerca1.Text, Txt_ricerca2.Text)
    End Sub

When i load this page of another page and start the event page_load, the record in the radlistview see all perfect.
But if i start the search in this page and i click on button search, the query sql function perfect and load the new record but dont see in the radlsitview. i always see the same records...why?

Marin
Telerik team
 answered on 27 Feb 2013
1 answer
113 views
in hirarichal radgrid inside footertemplate have panel here set visible false then click button event panel visible true
Princy
Top achievements
Rank 2
 answered on 27 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?