Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
175 views
How do I hide an autogenerated column in a detail table in code.

Thanks,

Bobby
Princy
Top achievements
Rank 2
 answered on 10 Jun 2008
2 answers
97 views
Hello!

I have a RadGrid with a GridDropDownListColumn. The datasource for this column is an ObjectDataSource that gets the values out of a class that converts an enum to a list.

Everything works fine so far, but now I need to localize the entries of the GridDropDownList.
I tried to follow this approach: http://www.telerik.com/help/aspnet-ajax/grdcustomizeconfiguregriddropdowncolumn.html , but unfortunately
at this time (after ItemDatabound) the DropDownList has no Items.
Do you guys have any ideas how I can loclize the entries in the dropdownlist?
thx in advance & kind regards
Markus
Top achievements
Rank 2
 answered on 10 Jun 2008
1 answer
130 views
Hi
The paste as plain text dialog seems to remember the previously pasted text is it possible to have it so the text on the dialog is cleared each time. Here's how i'm using it.

    <telerik:RadSpell ID="spell1" runat="server" ButtonType="None" />
    <telerik:RadEditor ID="radEditor1" runat="server" StripFormattingOptions="AllExceptNewLines"
        ToolsFile="~/Includes/RadEditorJobAdd.xml" Skin="WebBlue" EditModes="Design"
        Width="505" Height="265" OnClientLoad="OnRadEditorClientLoad">
        <ContextMenus>
            <telerik:EditorContextMenu>
                <telerik:EditorTool Name="Cut" />
                <telerik:EditorTool Name="Copy" />
                <telerik:EditorTool Name="Paste" />
            </telerik:EditorContextMenu>
        </ContextMenus>
        <Content>&nbsp;</Content>
        <SpellCheckSettings SpellCheckProvider="PhoneticProvider" WordIgnoreOptions="RepeatedWords" />
    </telerik:RadEditor>

    <script type="text/javascript"> 
        Telerik.Web.UI.Editor.CommandList.SpellCheck = function(commandName, editor) 
        { 
            var spell = GetRadSpell('<%= spell1.ClientID %>'); 
            spell.spellCheck(new PrometheusTextSource(editor)); 
            return false; 
        }
        var PrometheusTextSource = function(editor) 
        { 
            this._editor = editor; 
        
            this.get_text = function() { return this._editor.get_html(); }; 
            this.set_text = function(value) { this._editor.set_html(value); }; 
        }
        var oldFunction = Telerik.Web.UI.Editor.CommandList["Paste"]; //save the original Paste function
        Telerik.Web.UI.Editor.CommandList["Paste"] = function(commandName, editor, args)
        {
            if (!document.all) {
                editor.fire("PastePlainText");
            }
            else {
                oldFunction(commandName, editor, args);
            }
        };
    </script>
George
Telerik team
 answered on 10 Jun 2008
1 answer
197 views
Hi,

I downloaded the latest service pack 2008.1.515.  While I am using the RadComboBox and using OnClientKeyPressing method.  I have the following code and it gives me "Invalid argument" javascript error on the line "sender.hideDropDown();".
<script language="javascript" type="text/javascript"> 
 function HandkeKeyPress(sender, eventArgs) 
 { 
   if (eventArgs.get_domEvent().keyCode == 9) 
   { 
      sender.hideDropDown(); 
   } 
 } 
</script> 

Just wondering if it happens to anyone?  I am using IE7.0 in Window XP Professional.
Rosi
Telerik team
 answered on 10 Jun 2008
4 answers
248 views
I have a multipage associate with a toolstrip that contains a crystal report viewer.  Unfortunately the report is on top of the page as opposed to inside of the multipage area (see image)  If anyone has any ideas it would be greatly appreciated.

Thanks
Paul
Telerik team
 answered on 10 Jun 2008
1 answer
120 views
I am trying to do what is shown in this example:

http://www.telerik.com/help/aspnet-ajax/expand-root-item-on-click-only.html


However, when I run it, I get the following JavaScript error

Object doesn't support this property or method

Any ideas?


Here's my sample code that is failing for me...

    <form id="form1" runat="server">  
    <asp:ScriptManager ID="ScriptManager1" runat="server">  
    </asp:ScriptManager> 
    <div> 
        <telerik:RadMenu ID="RadMenu1" 
           runat="server" 
           ClickToOpen="True" 
           OnClientMouseOver="OnClientMouseOverHandler">   
            <CollapseAnimation Duration="200" Type="OutQuint" /> 
            <Items> 
                <telerik:RadMenuItem runat="server" Text="Root RadMenuItem1">  
                    <Items> 
                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1">  
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 2">  
                        </telerik:RadMenuItem> 
                    </Items> 
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem runat="server" Text="Root RadMenuItem2">  
                    <Items> 
                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1">  
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 2">  
                        </telerik:RadMenuItem> 
                    </Items> 
                </telerik:RadMenuItem> 
            </Items> 
        </telerik:RadMenu> 
    </div> 
    </form> 
    <script type="text/javascript">  
    function OnClientMouseOverHandler(sender, eventArgs)  
    {  
       if (eventArgs.get_item().get_parent() == sender)  
       {  
           sender.set_clicked(false);  
       }  
    }  
    </script>  
Charles Forsyth
Top achievements
Rank 2
 answered on 10 Jun 2008
1 answer
147 views

i can cast the dropdown in the grid to a dropdown it only casts to literal with the old value not the update one.

<

telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticInserts="True" AllowPaging="True" DataSourceID="linqDatasource1" GridLines="None" PageSize="30" Skin="Mac">
<MasterTableView AutoGenerateColumns="False" DataSourceID="LinqDataSource1">

<CommandItemTemplate>
<asp:LinkButton ID="btnUpdate" runat="server">Update</asp:LinkButton>
</CommandItemTemplate>
<RowIndicatorColumn Visible="False">
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn Resizable="False" Visible="False">
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton"></telerik:GridEditCommandColumn>

<telerik:GridBoundColumn DataField="ticketID" EditFormColumnIndex="1" HeaderText=" " ReadOnly="true" SortExpression="ticketID" UniqueName="ticketID"></telerik:GridBoundColumn>

<telerik:GridDropDownColumn DataField="phonenumber" DataSourceID="ldphones" HeaderText=" " ItemStyle-HorizontalAlign="Right" ListTextField="phonenumber" ListValueField="phonenumber" ReadOnly="false" SortExpression="phonenumber" UniqueName="phonenumber" Visible="true">
<ItemStyle HorizontalAlign="Right" /></telerik:GridDropDownColumn>

<telerik:GridDropDownColumn DataField="EmployeeID" DataSourceID="ldemployees" HeaderText="" ItemStyle-HorizontalAlign="Right" ListTextField="EmployeefName" ListValueField="EmployeeID" ReadOnly="false" SortExpression="EmployeeID" UniqueName="EmployeeID" Visible="false">
<ItemStyle HorizontalAlign="Right" /></telerik:GridDropDownColumn>

<telerik:GridDropDownColumn DataField="deviceserial" DataSourceID="ldSerials" HeaderText=" " ItemStyle-HorizontalAlign="Right" ListTextField="deviceserial" ListValueField="deviceserial" ReadOnly="false" SortExpression="deviceserial" UniqueName="deviceserial" Visible="true"><ItemStyle HorizontalAlign="Right" /></telerik:GridDropDownColumn>

<telerik:GridBoundColumn DataField="ProblemDescription" EditFormColumnIndex="1" HeaderText="" ReadOnly="false" SortExpression="ProblemDescription" UniqueName="ProblemDescription">
</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="ProblemSolution" EditFormColumnIndex="1" HeaderText=" " ReadOnly="false" SortExpression="ProblemSolution" UniqueName="ProblemSolution" Visible="false"></telerik:GridBoundColumn>

'--------- this it the one that returns the error

<telerik:GridDropDownColumn DataField="TicketStatus" DataSourceID="ldphonestatus" HeaderText=" " ItemStyle-HorizontalAlign="Right" ListTextField="Phonestatus" ListValueField="Phonestatusid" ReadOnly="false" SortExpression="TicketStatus" UniqueName="TicketStatus" Visible="false">
<ItemStyle HorizontalAlign="Right" />

</telerik:GridDropDownColumn>
'------------------------------------------------

<telerik:GridCheckBoxColumn DataField="Onemployee" HeaderText=" " Visible="false" UniqueName="OnEmployee">
</telerik:GridCheckBoxColumn>

<
telerik:GridBoundColumn ReadOnly="false" Visible="false" DataField="TicketDate" UniqueName="ticketDate" SortExpression="ticketDate" HeaderText=""></telerik:GridBoundColumn>

<
telerik:GridBoundColumn DataField="returnDate" HeaderText=" " ReadOnly="false" SortExpression="returnDate" UniqueName="returnDate" EditFormColumnIndex="1" Visible="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FixCost" EditFormColumnIndex="1" HeaderText=" " ReadOnly="false" SortExpression="FixCost" UniqueName="FixCost" Visible="false"></telerik:GridBoundColumn></Columns>

<EditFormSettings CaptionFormatString=" " ColumnNumber="2"><PopUpSettings ScrollBars="None" /><EditColumn ButtonType="ImageButton" CancelText="" UpdateText=""></EditColumn></EditFormSettings></MasterTableView><PagerStyle Mode="NumericPages" /></telerik:RadGrid>



this is my code behind

Protected

Sub RadGrid1_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.UpdateCommand

Dim item As GridEditableItem = DirectCast(e.Item, GridEditableItem)

Dim TickeID = DirectCast(item("ticketID").Controls(0), TextBox)

Dim TicketDate = DirectCast(item("ticketDate").Controls(0), TextBox)

Dim ProblemDescription = DirectCast(item("ProblemDescription").Controls(0), TextBox)

Dim Problemsolution = DirectCast(item("ProblemSolution").Controls(0), TextBox)

Dim fixcost = DirectCast(item("FixCost").Controls(0), TextBox)

Dim returnDate = DirectCast(item("returnDate").Controls(0), TextBox)

Dim onEmployee = DirectCast(item("OnEmployee").Controls(0), CheckBox)

Dim employeeID = DirectCast(item("EmployeeID").Controls(0), RadComboBox)

Dim phonenumber = DirectCast(item("phonenumber").Controls(0), RadComboBox)

Dim DeviceSerial = DirectCast(item("deviceserial").Controls(0), RadComboBox)

'--- doesnot work returns typecast error
Dim
ticketstatus = DirectCast(item("ticketStatus").Controls(0), RadComboBox)

' ---works but return old values
Dim ticketstatus = DirectCast(item("ticketStatus").Controls(0), literal)



Dim
ds As New mobilesdcDataContext

ds.updateMentainance(TickeID.Text, ticketstatus.Text, Problemsolution.Text, fixcost.Text, onEmployee.Checked,

Date.Now)

ds.SubmitChanges()

End Sub

Yavor
Telerik team
 answered on 10 Jun 2008
2 answers
131 views
Hi,
I have several grids with RadNumeric textbox in 1 and RadDateTimePicker's in the others.

The problem comes with binding. The RadNumeric textbox requires a number and on the initial insert there is no number. If I don't bind to the grid then I can't get any values out.

I have tried the OnItemDataBound of the grid but again have problems with adding a new dataitem as the initial value will be null.

I have heard of the dbSelectedDate for the radDateTimePicker but have yet to try it.

Any suggestions on the RadNumericTextBox?

Regards
Roger
Top achievements
Rank 1
 answered on 10 Jun 2008
2 answers
174 views
I have noticed that IsSeparator only works with the default skin, if you try any of the other skins there is no separator.

Any ideas on how to fix this for the other skins.
vbl vbl
Top achievements
Rank 1
 answered on 10 Jun 2008
1 answer
135 views
Is there a special trick to ensure that the radWindow appears above the radMenu?

When I open a radWindow and drag it near the radMenu, the radWindow is overlapped by the radMenu.
Charles Forsyth
Top achievements
Rank 2
 answered on 09 Jun 2008
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?