Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
56 views
Add New Record Creates Text Boxes For All Columns in my Grid, I just want one.  It's a very simple page to populate a drop down list.
There are 2 columns, the table ID Attach_Type_ID (INT) and the DDL value Name.

 

 

 

<Columns>
  
<telerik:GridBoundColumn DataField="Attach_Type_ID" 
  
HeaderText="Attach_Type_ID" 
  
visible="False">
  
</telerik:GridBoundColumn>
  
<telerik:GridBoundColumn DataField="Name" MaxLength="50" 
  
FilterControlAltText="Filter Name column" HeaderText="Attachment Type" 
  
UniqueName="Name">
  
<HeaderStyle Width="72px"/> 
  
</telerik:GridBoundColumn>
  
<telerik:GridButtonColumn ConfirmText="Delete?" ConfirmDialogType="RadWindow" 
  
ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
  
</Columns>
For Add New Record, I just want to see Name.  I will do an insert and SQL will generate a new ID.
What I get is two textboxes, one for
"Attach_Type_ID" and one for "Name".
Hwo do I get rid tjhe one for "Attach_Type_ID" ?
Here's all the .ASPX:

 

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Login.Master" CodeBehind="AdminAttachmentType.aspx.vb" Inherits="ConEdison.PTAR.AdminAttachmentType" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
        <style type="text/css">
            .orderText
            {
                font: normal 12px Arial,Verdana;
                margin-top: 6px;
            }
        </style>
    </telerik:RadCodeBlock>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentHeader" runat="server">
<b>
Attachment Type Administration
</b>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script src="scripts/admin.js" type="text/javascript"></script>
        </telerik:RadCodeBlock>
          
    <telerik:RadAjaxManager ID="Attach_TypeAjaxManager" runat="server" OnAjaxRequest="Attach_TypeAjaxManager_AjaxRequest">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="Attach_TypeAjaxManager">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="Attach_TypeRadGrid" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="Attach_TypeRadGrid">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="Attach_TypeRadGrid" />
                         <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
                        <telerik:AjaxUpdatedControl ControlID="RadInputManager1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>             
          
<telerik:RadGrid OnItemCreated="Attach_TypeRadGrid_ItemCreated" ID="Attach_TypeRadGrid" runat="server"
        AllowPaging="False"  AllowAutomaticDeletes="True"
         CellSpacing="0"  ShowGroupPanel="False"  
        PageSize="50" Skin="Web20" >
          
        <FilterMenu EnableImageSprites="False"></FilterMenu>
  
        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="False"   
            ReorderColumnsOnClient="True">    
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="False" UseStaticHeaders="True" />
        </ClientSettings>
  
<MasterTableView AutoGenerateColumns="False" DataKeyNames="Name" ClientDataKeyNames="Name" Width="100%" CommandItemDisplay="Top">
<CommandItemSettings ExportToPdfText="Export to PDF"  ShowRefreshButton="True"></CommandItemSettings>
  
<RowIndicatorColumn Visible="True" SortedBackColor="lightblue" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
  
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
          <telerik:GridBoundColumn DataField="Attach_Type_ID"   
            HeaderText="Attach_Type_ID"  
             visible="False">
           </telerik:GridBoundColumn>
          <telerik:GridBoundColumn DataField="Name" MaxLength="50" 
            FilterControlAltText="Filter Name column" HeaderText="Attachment Type" 
            UniqueName="Name">
            <HeaderStyle Width="72px"/>    
        </telerik:GridBoundColumn>
        <telerik:GridButtonColumn ConfirmText="Delete?" ConfirmDialogType="RadWindow"   
                     ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
    </Columns>
</MasterTableView>
</telerik:RadGrid>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" />
  
  <telerik:RadInputManager runat="server" ID="RadInputManager1" Enabled="true">
        <telerik:TextBoxSetting BehaviorID="TextBoxSetting1">       </telerik:TextBoxSetting>
 </telerik:RadInputManager>
</asp:Content>
    <asp:Content ID="Content5" ContentPlaceHolderID="ContentScriptHolder" runat="server">
</asp:Content>

 

 


 

David
Top achievements
Rank 1
 answered on 05 Nov 2012
2 answers
72 views
Hi,

We are using this version: RadControls for ASP.NET AJAX 2012.1.411.

Character Count is working in IE9, IE10, Chrome and Firefox.

It is not working for IE8 and IE9.

Do you have any workarounds? The version we have is the latest we can get at this point.

Thanks!
Swati
Top achievements
Rank 1
 answered on 05 Nov 2012
2 answers
96 views
I'm not sure where to begin with this one.

I have a RadGrid with a bound text field that is 2000 char long in the DB.  The user can go into the popup and edit it with the RadEditor (and basically do anything he or she wants with color and size.)

What I'd like to be able to do is perhaps display only the first 20-30 characters of the field in the grid in a fixed length column with no wrap and fixed font size (and no colors.)

Is it possible to do this in the properties or do I need to use CSS?

What I don't want is what I've put in the picture.

How do I do this?
Boris
Top achievements
Rank 1
 answered on 05 Nov 2012
2 answers
93 views
Good afternoon,

I'm working on increasing the speed of a dynamically generated data entry page.  The page contains between 1 and 7 RadGrids, each with 20 or so rows, each row containing at least one RadNumericTextbox for data entry.  So, maybe 140 RadNumericTextboxes, as well as a handful of other controls such as RadComboBoxes and a couple RadWindows.

I'm trying to reduce the page size which right now stands at about 3.5MB.  There is a VERY large block of Javascript at the bottom of the page containing the code to instantiate all the RadControls.  Hundreds of lines of Telerik code that all look something like this:
Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadNumericTextBox, {"_displayText":"","_focused":false,"_initialValueAsText":"","_postBackEventReferenceScript":"setTimeout(\"__doPostBack(\\\u0027entry20121022$rgSalesEntry$ctl00$ctl25$rwinNewSupplemental$C$rgSupplemental$ctl00$ctl36$txtSupplementalValue\\\u0027,\\\u0027\\\u0027)\", 0)","_skin":"Default","_validationText":"","clientStateFieldID":"entry20121022_rgSalesEntry_ctl00_ctl25_rwinNewSupplemental_C_rgSupplemental_ctl00_ctl36_txtSupplementalValue_ClientState","enabled":true,"incrementSettings":{InterceptArrowKeys:true,InterceptMouseWheel:true,Step:1},"numberFormat":{"DecimalDigits":2,"DecimalSeparator":".","CultureNativeDecimalSeparator":".","GroupSeparator":",","GroupSizes":3,"NegativePattern":"-n","NegativeSign":"-","PositivePattern":"n","AllowRounding":true,"KeepNotRoundedValue":false,"KeepTrailingZerosOnFocus":true,"NumericPlaceHolder":"n"},"styles":{HoveredStyle: ["width:70px;text-align:right;", "riTextBox riHover"],InvalidStyle: ["width:70px;text-align:right;", "riTextBox riError"],DisabledStyle: ["width:70px;text-align:right;", "riTextBox riDisabled"],FocusedStyle: ["width:70px;text-align:right;", "riTextBox riFocused"],EmptyMessageStyle: ["width:70px;text-align:right;", "riTextBox riEmpty"],ReadOnlyStyle: ["width:70px;text-align:right;", "riTextBox riRead"],EnabledStyle: ["width:70px;text-align:right;", "riTextBox riEnabled"],NegativeStyle: ["width:70px;text-align:right;", "riTextBox riNegative"]}}, {"valueChanged":txtValue_ValueChangedentry20121022}, null, $get("entry20121022_rgSalesEntry_ctl00_ctl25_rwinNewSupplemental_C_rgSupplemental_ctl00_ctl36_txtSupplementalValue"));
});

Is there any way to reduce or eliminate the size of this generated code at the bottom of the page?  I copied-and-pasted it out into a separate file and it's nearly half (1.6MB total) of my 3.5MB page size.

Aaron Gibbs
Top achievements
Rank 2
 answered on 05 Nov 2012
2 answers
94 views
I am using  version Telerik "v 2012.3.101645".

And have the following problem as the attachment. 

When I delete FormDecorator page, works normally.

Only Internet Explorer 8


<telerik:RadDatePicker ID="dtAgendamento" runat="server" ZIndex="30001"
                                            ShowPopupOnFocus="True" Skin="Vista"
                                            AutoPostBack="True"  Visible="False" Width="120px" TabIndex="2">
                                 
                         <Calendar Skin="Vista" UseColumnHeadersAsSelectors="False"
                                   UseRowHeadersAsSelectors="False" ViewSelectorText="x">
                         </Calendar>
                         <DateInput DateFormat="dd/MM/yyyy" DisplayDateFormat="dd/MM/yyyy" LabelWidth="" TabIndex="2"
                                    >
                         </DateInput>
                       
                     </telerik:RadDatePicker>



Robson
Top achievements
Rank 2
 answered on 05 Nov 2012
1 answer
116 views
Hi -

I'm using grouping by dragging them to the group region, which works fine.  However, the group headers in the  grid are displaying with dark grid lines going through them.  I have tried the following code to turn off displaying of them but to no effect:

<GroupPanel SkinID="Office2007">
    <PanelItemsStyle GridLines="None" />
    <PanelStyle GridLines="None"
</GroupPanel>

I also tried setting the style as follows, but couldn't effect the grid lines:

GroupHeaderItemStyle-BackColor="White"

I have included the code for my (growingly-complicated) grid and an image of what I'm seeing for good measure.  Please let me know if you have any suggestions.

Thank you

<telerik:RadGrid ID="DetailsGrid" runat="server" CellSpacing="0" Skin="Office2007" GridLines="Vertical" AllowSorting="true" ShowGroupPanel="true" AllowPaging="false" OnNeedDataSource="DetailsGrid_NeedDataSource" OnUpdateCommand="DetailsGrid_UpdateCommand" OnItemDataBound="DetailsGrid_ItemDataBound"
OnItemCreated="DetailsGrid_ItemCreated" OnDataBound="DetailsGrid_DataBound" OnDataBinding="DetailsGrid_DataBinding" GroupHeaderItemStyle-BackColor="White">
    <SelectedItemStyle CssClass="selectedRow" />
    <ClientSettings ReorderColumnsOnClient="true" EnablePostBackOnRowClick="false" AllowDragToGroup="true">
        <Resizing AllowColumnResize="true" EnableRealTimeResize="true" ShowRowIndicatorColumn="true" AllowResizeToFit="true" />
        <ClientEvents OnGridCreated="GridCreated" OnKeyPress="KeyPress" OnRowDblClick="RowDblClick" OnCommand="GridCommand" />                               
        <Selecting AllowRowSelect="true" CellSelectionMode="SingleCell" />
        <Scrolling UseStaticHeaders="true" AllowScroll="true" />
    </ClientSettings>
    <MasterTableView TableLayout="Fixed" EditMode="InPlace" AutoGenerateColumns="false" DataKeyNames="opportunityProductId" ShowFooter="true">
        <HeaderStyle HorizontalAlign="Center" Width="135px" Font-Bold="true" />
        <Columns>
        ...
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
Pavlina
Telerik team
 answered on 05 Nov 2012
1 answer
97 views
I got a problem with a PopUp (radwindow)
there a radgrid in the parent (main), in the radgrid there a imagebutton than open de popup.
in the popup. in the popup I modifi the data that it's displayed in the radgrid.
So I tried to do to refresh only de radgrid, but it refresh all page and de radgrid show no records
this happend when I close de popup, I'm using this in the button in popup


ScriptManager.RegisterStartupScript(this, typeof(Page), "CloseAndRebind", "", true);

I want to do this, but using Datasource , without SqlDataSource

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window


greetings !
Angel Petrov
Telerik team
 answered on 05 Nov 2012
4 answers
98 views
Version: AJAX 2012 Q2 912
Browser: FF 15.0.1

Using the DBContentProvider to store the files on a MSSQL server.
When I'm downloading the file it cuts the name up to the first white space.

For example:

Jenny Baxter PDP #4.pdf  -->  Jenny.pdf
Ricardo
Top achievements
Rank 2
 answered on 05 Nov 2012
3 answers
84 views
I use cookie to save TheEditor's content, but when I load the cookie,visual studio will break at Request.Cookie and show the error message "Detected a potentially dangerous Request.Cookies value from the client, please reference http://go.microsoft.com/fwlink/?LinkID=212874"
Does someone know how to solve this problem?
Protected Sub ButtonSave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonSave.Click
    Response.Cookies("myText").Value = theEditor.Content
End Sub
  
Protected Sub ButtonLoad_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonLoad.Click
    theEditor.Content = Request.Cookies("myText").Value
End Sub

Dobromir
Telerik team
 answered on 05 Nov 2012
2 answers
179 views
I have a Combox with a list of cities, if a client's city is missing I want them to be able to update the list on the fly.  Everything is working except one aspect.  In AddNewCityTextbox_TextChanged I simply find the textbox and add the Text to the CommandArgument of the radButton which is used to submit.

This all works, Except that the TextChanged only does a Postback when the Client clicks elsewhere.  In my case they wil logically click on Submit, therefore the JavaScript fires before (or seems to) the script is updated.

Is there another wau I can logically get around this?
Public Sub AddNewCityTextbox_TextChanged(sender As Object, e As System.EventArgs)
 
        Dim TextBox = CType(sender, RadTextBox)
        Dim item = CType(TextBox.NamingContainer, RadListViewEditableItem)
 
        Dim AddNewCityTextbox As RadTextBox = DirectCast(item.FindControl("AddNewCityTextbox"), RadTextBox)
 
        Dim SubmitLink As RadButton = DirectCast(item.FindControl("SubmitNewCity"), RadButton)
        SubmitLink.CommandArgument = "Please confirm you wish to add " & AddNewCityTextbox.Text & "?"
 
 
    End Sub
 
<telerik:RadButton ID="SubmitNewCity" runat="server" Text="Submit" style="margin-right:10px;" ValidationGroup="AddCityGroup"
                OnClientClicking="function(button,args){args.set_cancel(!window.confirm(button.get_commandArgument()));}"  >
</telerik:RadButton>
Tim
Top achievements
Rank 1
 answered on 05 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?