Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
262 views
Hi all:

I have a ASP.NET page that has a Tabbed interface, 4 data grids, some images, text., etc. I'd like to get all of this content into the RadEditor at Run time...is this possible? I have been able to get string content into the Editor, but is it possible to build a table from a RadGrid and then add that table to the Editor? Is it possible to add and format headers, images, etc?

Thanks for any and all input.

John.
Rumen
Telerik team
 answered on 18 Jan 2010
1 answer
46 views
Hello,
We are using Telerik version 2009.We have used radGrid in our application.When we run the application on windows XP ,we get the radGrid in blue color.however when we are using Vista Machine,we are getting dark gray color for the grid.We are using"Web Blue" skin for the radGrid. We want  to appear the grid a with the same color on both Vista and Windows XP machine.Is there any property to set for grid and buttons to resolve the problem?

Please Provide the solution.

Regards,
Rahul.
Dimo
Telerik team
 answered on 18 Jan 2010
1 answer
223 views
Is it possible to select a row in a radgrid based on a cell value e.g. column ID, and we want to select row with cell of ID = 12?
Shinu
Top achievements
Rank 2
 answered on 18 Jan 2010
2 answers
250 views
I recently upgraded from 2008 Q1 to 2009 Q3 Controls, and my custom styles are no longer working.

The older controls I was able to do this and achieve what I wanted:

.GridRowOver_Sunset 
    background:#fdd0b7 url('images/sprite.gif') 0 -200px repeat-x !important; 
    cursor:pointer
 
.SelectedRow_Sunset 
    background:#fdd0b7 url('images/sprite.gif') 0 -200px repeat-x !important; 
 
.SelectedRow_Sunset td 
    border-top:1px solid #d07052
    border-bottom:1px solid #d07052

But this does not work with the new controls.  What do I need to change?
Dimo
Telerik team
 answered on 18 Jan 2010
1 answer
149 views
Hi,

How can i use a dropdownlist ( ddlCategory) to display the value in each row in non editmode?
How can i populate the ddlCategory with dsddl as dataset? (cant use sqldatasource here!)

reg.

D
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="InPlace.aspx.vb" Inherits="InPlace" %> 
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head id="Head1" runat="server"
</head> 
<body class="BODY"
    <form id="mainForm" runat="server"
    <asp:ScriptManager ID="ScriptManager1" runat="server"
    </asp:ScriptManager> 
    <!-- content start --> 
 
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
 
        <script type="text/javascript"
            function RowDblClick(sender, eventArgs) { 
                sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical()); 
            } 
        </script> 
 
    </telerik:RadCodeBlock> 
   
    <telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="True" 
        AllowAutomaticInserts="True" PageSize="10" OnItemCommand="onitemcommand_radgrid1" 
        AllowAutomaticUpdates="True" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="sqldatasource2"
        <PagerStyle Mode="NextPrevAndNumeric" /> 
        <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataKeyNames="ProductID" 
            DataSourceID="Sqldatasource2" HorizontalAlign="NotSet" AutoGenerateColumns="False"
            <Columns> 
                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
                    <ItemStyle CssClass="MyImageButton" /> 
                </telerik:GridEditCommandColumn> 
                <telerik:GridBoundColumn DataField="ProductName" HeaderText="ProductName" SortExpression="ProductName" 
                    UniqueName="ProductName" ColumnEditorID="GridTextBoxColumnEditor1"
                </telerik:GridBoundColumn> 
                <telerik:GridTemplateColumn HeaderText="CategoryName"
                    <ItemTemplate> 
                        <asp:DropDownList ID="ddlCategory" runat="server" DataTextField="CategoryName" DataValueField="CategoryID"
                        </asp:DropDownList> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
                <telerik:GridNumericColumn DataField="UnitsInStock" HeaderText="Units In Stock" SortExpression="UnitsInStock" 
                    UniqueName="UnitsInStock" ColumnEditorID="GridNumericColumnEditor1"
                </telerik:GridNumericColumn> 
                <telerik:GridBoundColumn DataField="QuantityPerUnit" HeaderText="Quantity Per Unit" 
                    SortExpression="QuantityPerUnit" UniqueName="QuantityPerUnit" Visible="false" 
                    EditFormColumnIndex="1" ColumnEditorID="GridTextBoxColumnEditor2"
                </telerik:GridBoundColumn> 
                <telerik:GridCheckBoxColumn DataField="Discontinued" HeaderText="Discontinued" SortExpression="Discontinued" 
                    UniqueName="Discontinued" EditFormColumnIndex="1"
                </telerik:GridCheckBoxColumn> 
                <telerik:GridTemplateColumn HeaderText="UnitPrice" SortExpression="UnitPrice" UniqueName="TemplateColumn" 
                    EditFormColumnIndex="1"
                    <ItemTemplate> 
                        <asp:Label runat="server" ID="lblUnitPrice" Text='<%# Eval("UnitPrice", "{0:C}") %>'></asp:Label> 
                    </ItemTemplate> 
                    <EditItemTemplate> 
                        <span> 
                            <telerik:RadNumericTextBox runat="server" ID="tbUnitPrice" Width="40px" DbValue='<%# Bind("UnitPrice") %>'
                            </telerik:RadNumericTextBox><span style="color: Red"><asp:RequiredFieldValidator 
                                ID="RequiredFieldValidator1" ControlToValidate="tbUnitPrice" ErrorMessage="*" 
                                runat="server"
                            </asp:RequiredFieldValidator></span
                    </EditItemTemplate> 
                </telerik:GridTemplateColumn> 
                <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow" 
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" 
                    UniqueName="DeleteColumn"
                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> 
                </telerik:GridButtonColumn> 
            </Columns> 
            <EditFormSettings ColumnNumber="2" CaptionDataField="ProductName" CaptionFormatString="Edit properties of Product {0}"
                <FormTableItemStyle Wrap="False"></FormTableItemStyle> 
                <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle> 
                <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White" 
                    Width="100%" /> 
                <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" /> 
                <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle> 
                <EditColumn ButtonType="ImageButton" InsertText="Insert Order" UpdateText="Update record" 
                    UniqueName="EditCommandColumn1" CancelText="Cancel edit"
                </EditColumn> 
                <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle> 
            </EditFormSettings> 
        </MasterTableView> 
        <ClientSettings> 
            <ClientEvents OnRowDblClick="RowDblClick" /> 
        </ClientSettings> 
    </telerik:RadGrid> 
    <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="200px" /> 
    <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor2" runat="server" TextBoxStyle-Width="150px" /> 
    <telerik:GridDropDownListColumnEditor ID="GridDropDownColumnEditor1" runat="server" 
        DropDownStyle-Width="110px" /> 
    <telerik:GridNumericColumnEditor ID="GridNumericColumnEditor1" runat="server" NumericTextBox-Width="40px" /> 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"
    </telerik:RadWindowManager> 
    <br /> 
    <asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" 
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT ProductID, ProductName, CategoryID, QuantityPerUnit, UnitPrice, UnitsInStock, Discontinued FROM [Products]" 
        runat="server"></asp:SqlDataSource> 
    </form> 
</body> 
</html> 
 

Imports Telerik.Web.UI 
Imports System 
Imports System.Data 
Imports System.Data.SqlClient 
Imports System.Web.UI.WebControls 
Imports System.Configuration 
 
Imports System.Drawing 
 
Partial Class InPlace 
    Inherits System.Web.UI.Page 
 
    Dim ConnString As String = ConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString 
 
    Public Function dsddl() As DataSet 
        Dim conn As SqlConnection = New SqlConnection(ConnString) 
        Dim adapter As SqlDataAdapter = New SqlDataAdapter 
        Dim myDataSet As DataSet = New DataSet 
 
        conn.Open() 
        Try 
 
            adapter.SelectCommand = New SqlCommand("SELECT * from Categories", conn) 
            adapter.Fill(myDataSet, "cats"
        Finally 
            conn.Close() 
        End Try 
        Return myDataSet 
 
    End Function 
 
 
 
    Protected Sub onitemcommand_radgrid1(ByVal source As ObjectByVal e As GridCommandEventArgs) 
        Dim item As GridItem 
        Dim ddl As DropDownList 
 
        item = e.Item 
        If e.CommandName = RadGrid.EditCommandName Then 
            RadGrid1.MasterTableView.EditMode = GridEditMode.InPlace 
            'initialize dropdownlist 
            If item.ItemType = GridItemType.Item Then 
                ddl = CType(item.FindControl("ddlCategory"), DropDownList) 
                ddl.DataSource = dsddl() 
                ddl.DataTextField = "CategoryName" 
                ddl.DataValueField = "CategoryID" 
                ddl.DataBind() 
 
            End If 
 
        End If 
        If e.CommandName = RadGrid.InitInsertCommandName Then 
            RadGrid1.MasterTableView.EditMode = GridEditMode.EditForms 
        End If 
    End Sub 
 
  
End Class 
 

Shinu
Top achievements
Rank 2
 answered on 18 Jan 2010
2 answers
168 views
Hi there!
I've got a RadGrid with a GridHyperlinkColumn and a dynamic RadToolTip on it. My question: Is it possible to disable the HTML-title-Tag of this hyperlinks, so I have only the RadToolTip? It would be awesome... ;)

Thanks.
Ti
Top achievements
Rank 1
 answered on 18 Jan 2010
2 answers
164 views
hi stuck on something with radgrid and ajax panel
I have a radgrid with 20 columns(15 hidden), one datasource, one textbox, two buttons(search and continue), one table with lierals for the 15 hidden columns outside the grid.
Scenario: Radgrid and table are wrapped in an ajaxpanel. User enters search criteria in textbox 1, radgrid populates based on criteria. User uses COmmandName 'Select' to select row. SelectedIndexChanged grabs values of selected row and populates literals. Very nice. User presses continue and goes to next page. if user uses back button, all data is then missing! This is definitely due to my use of the ajaxpanel. is there a way to keep the page in its selected state and use the ajax?
My designer data is simplified significantly but the idea is there.
thanks
mac
 
    Protected Sub RadGrid1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.SelectedIndexChanged  
 
        For Each item As GridDataItem In RadGrid1.MasterTableView.GetItems(New GridItemType() {GridItemType.Item, GridItemType.AlternatingItem})  
            Dim dataitem As GridDataItem = DirectCast(item, GridDataItem)  
 
            If dataitem.Selected Then  
                'Access the data in the row using the ColumnUniqueName      
                EMP_IDlit.Text = dataitem("EMP_ID").Text  
                EMPFirstNamelit.Text = dataitem("EMPFirstName").Text  
                EMPLastNamelit.Text = dataitem("EMPLastName").Text  
                EMPPoslit.Text = dataitem("EMPPos").Text  
                PosDescriptionlit.Text = dataitem("PosDescription").Text  
                PosTypelit.Text = dataitem("PosType").Text  
                HomePoslit.Text = dataitem("HomePos").Text  
                Emp_Statuslit.Text = dataitem("Emp_Status").Text  
                Classnlit.Text = dataitem("Classn").Text  
                CostCentrelit.Text = dataitem("CostCentre").Text  
                site_prelit.Text = dataitem("site_pre").Text  
                sitelit.Text = dataitem("site").Text  
                Affiliationlit.Text = dataitem("Affiliation").Text  
                std_hourslit.Text = dataitem("std_hours").Text  
                Documentlit.Text = dataitem("Document").Text  
                Departmentlit.Text = dataitem("Department").Text  
                homesitelit.text = dataitem("homesite").Text  
                infopanel.visible = True 
 
            End If  
        Next  
 
 
        EmpPos = RadGrid1.SelectedValues("EmpPos")  
        Empid = RadGrid1.SelectedValues("Emp_ID")  
        SelectedID.Text = EmpPos & "|" & Empid & "|" & JDC  
 
    End Sub 

Design is along these lines

    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><asp:Button ID="Button1" 
        runat="server" Text="Name or Pos#" /> 
    <telerik:RadAjaxPanel ID="pnl" runat="server">  
    <telerik:RadGrid ID="RadGrid1"     runat="server" AutoGenerateColumns="False">  
</telerik:RadGrid> 
<datasource> 
<asp:panel id="infoPanel" runat="server">  
table of literal ctrls  
<asp:button id="Continue" runat=server /> 
</asp:panel> 
</telerik:ajaxPanel> 
 
 
 
Sai Krishna
Top achievements
Rank 1
 answered on 18 Jan 2010
2 answers
131 views
Hi

I have a gridview where my orders are listed. I need to have a list where my orderlines are displayed

like this

id    ordername        date                invoicelines
1    Order of plates  21-01-2010    line one bla bla bla
                                                      line two bla bla bla
                                                      line three bla bla bla

2    Order of Milke    25-01-2010    line one bla bla
                                                      line two bla bla


how can that be accomplished?
lkj lkj
Top achievements
Rank 1
 answered on 18 Jan 2010
1 answer
136 views
When I select a file, the input area shows the entire file path and file name, but when I run the demos, it will show just the file name.
I can't find any settings in the demo code that allows this to occur.  What do I have to do to show only the selected file and NOT the full file path in the input area?

Thanks,
Jim
Genady Sergeev
Telerik team
 answered on 18 Jan 2010
3 answers
563 views
Is it possible, when using the "Paste Plain Text" button, to have paragraphs wrapped in <p> tags rather than separated by <br><br>? I have NewLineBr set to "true" but I don't think that applies for pasting. Let me know if this is unclear or more information is needed. Thank you.
Dobromir
Telerik team
 answered on 18 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?