Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
97 views
I have tried the on-line skin converter at http://converter.telerik.com/skinconverter/WebBased.aspx as suggested in Tervel Peykov's blog, but the output was exactly the same as my input.  I simply pasted the contents of my .css files into the window and pressed the Run button: was there more to it than that?  (I didn't see any other instructions.)

I am keen to upgrade to 2009 Q1 but obviously cannot do so if it will break my existing skins!  In case anyone can help, the CSS code I was trying to convert is given below.

All advice greatly appreciated,

Ed Graham

P.S.  The ASPX code defining the RadPanelBar in question is:

      <telerik:RadPanelBar ID="rpbLHNav" runat="server" EnableEmbeddedSkins="false" Skin="PSA" ExpandMode="SingleExpandedItem" Width="236px"></telerik:RadPanelBar>

**************************************

CSS code:

/* RadPanelBar PSA skin */

.RadPanelBar_PSA
{
    background: #ffffff;
    white-space: normal;
}

.RadPanelBar_PSA .rpImage
{
    margin: 4px 0px;
}

.RadPanelBar_PSA .rpGroup .rpSelected,
.RadPanelBar_PSA .rpGroup .rpSelected:hover
{
    background: none;
    border-bottom: 0;
}

/* Added by Ed */
.RadPanelBar_PSA .rpGroup .rpSelected .rpText
{
    border: 0;
    border-bottom: solid 1px #accb2d;
    background: #d1e2f1;
    color: #333;
}

.RadPanelBar_PSA .rpGroup .rpExpanded .rpText
{
    color: #000;
    background: #d1e2f1;
}

.RadPanelBar_PSA .rpSelected .rpText
{
    background: #8eadc1 url("/assets/gfx/pageBlocks/blockHomePageDarkBlue_arrow.gif") no-repeat 98% center;
}
/* End of Ed */

.RadPanelBar_PSA .rpExpanded .rpText
{
    background: url('/assets/gfx/Telerik/ExpandedBg.gif') no-repeat 98% center;
    font-weight: bold;
}
/* Added by Ed */
.RadPanelBar_PSA .rpText
{
    padding-left: 14px;
    font-size: 12px;
  font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
    line-height: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
    border-top: solid 1px #ffffff;
    border-bottom: solid 1px #ffffff;
}

.RadPanelBar_PSA .rpLevel1 .rpText
{
    line-height: 18px;
    padding-top: 6px;
    padding-bottom: 6px;
    border-bottom-color: #ffffff;
}

.RadPanelBar_PSA .rpLevel2 .rpText
{
    padding-left: 26px;
    line-height: 18px;
    padding-top: 1px;
    padding-bottom: 1px;
    border-bottom-color: #ffffff;
}
/* End of Ed */

.RadPanelBar_PSA .rpLevel3 .rpText { padding-left: 48px; }
.RadPanelBar_PSA .rpLevel4 .rpText { padding-left: 60px; }

.RadPanelBar_PSA .rpGroup .rpLink,
.RadPanelBar_PSA .rpGroup .rpLast .rpItem .rpLink,
.RadPanelBar_PSA .rpGroup .rpLink .rpText,
.RadPanelBar_PSA .rpGroup .rpLast .rpItem .rpLink .rpText
{
    border-bottom-width: 1px;
}

.RadPanelBar_PSA .rpGroup .rpLast .rpLink,
.RadPanelBar_PSA .rpGroup .rpLast .rpLast .rpLink,
.RadPanelBar_PSA .rpGroup .rpLast .rpLink .rpText,
.RadPanelBar_PSA .rpGroup .rpLast .rpLast .rpLink .rpText
{
    border-bottom-width: 0;
}

.RadPanelBar_PSA .rpGroup .rpTemplate
{
    font-size: 11px;
    color: #666;
}

.RadPanelBar_PSA .rpGroup .rpText
{
    border: 0;
    background: none;
    color: #333;
    font-weight: normal;
    font-size: 12px;
}

.RadPanelBar_PSA .rpGroup .rpLink
{
    background: none;
    border-bottom: solid 1px #f0f2f3;
}

.RadPanelBar_PSA .rpGroup .rpLink:hover
{
    background: #e7f1ff;
    border-bottom-color: #d8dde0;
}

.RadPanelBar_PSA .rpRootGroup
{
    border: solid 1px;
}

.RadPanelBar_PSA .rpRootGroup .rpDisabled:hover,
.RadPanelBar_PSA .rpRootGroup .rpDisabled .rpText
{
    background: #8eadc1;
    color: #ccc;
    cursor: default;
}

.RadPanelBar_PSA .rpGroup .rpDisabled:hover,
.RadPanelBar_PSA .rpGroup .rpDisabled .rpText
{
    text-decoration: none;
    border-bottom: solid 1px #f0f2f3;
    background: none;
    color: #ccc;
    cursor: default;
}

.RadPanelBar_PSA .rpGroup
{
    overflow-x: hidden;
    overflow-y: auto;
}

.RadPanelBar_PSA .rpRootGroup
{
    border-color: #30678a;
}

.RadPanelBar_PSA .rpText
{
    color: #30678a;
    background: url('/assets/gfx/pageBlocks/blockDarkBlue_Arrow.gif') no-repeat 98% center;
    border-bottom-color: #30678a;
}

.RadPanelBar_PSA .rpLink
{
    background: #b5cbd9;
}

Ed
Top achievements
Rank 1
 answered on 01 Jun 2009
4 answers
170 views
Hi everyone,

I am trying to implement the feature of editing a row in radgrid on doubleclick event.
Everything works fine if i use gridboundcolumns and automatic update.

My problem is when there is a templatecolumn like this
<telerik:RadGrid ID="GridComment" runat="server" DataSourceID = "SqlDataSource1"   
            AutoGenerateColumns="False" AllowAutomaticUpdates ="true" OnItemUpdated="GridComment_ItemUpdated" 
            OnDataBound="GridComment_DataBound" ShowStatusBar="True" ShowFooter ="true">  
        <MasterTableView EditMode ="InPlace" >  
            <Columns>  
                <telerik:GridBoundColumn HeaderText = "Client Sample ID" DataField = "description" ReadOnly="true"/>  
                <telerik:GridBoundColumn HeaderText = "ID" DataField = "sampleid" ReadOnly ="true" ForceExtractValue ="InEditMode"  />  
                <telerik:GridBoundColumn Visible ="false" DataField= "error_id" UniqueName="error_id" ReadOnly ="true" ForceExtractValue ="InEditMode"/>   
                <telerik:GridBoundColumn HeaderText = "SIR" DataField = "error_type" ReadOnly="true"/>  
                <telerik:GridTemplateColumn HeaderText = "Comment" UniqueName="comments">  
                    <EditItemTemplate>  
                        <telerik:RadTextBox ID="EditTxtComment" runat="server" Text='<%# Bind("comments")%>' TextMode="MultiLine">  
                        </telerik:RadTextBox>  
                    </EditItemTemplate>  
                    <ItemTemplate>  
                        <telerik:RadTextBox ID="TxtComment" runat="server" Text='<%# Eval("comments")%>' TextMode="MultiLine" ReadOnly="true" >  
                        </telerik:RadTextBox>     
                    </ItemTemplate>  
                </telerik:GridTemplateColumn>  
                  
            </Columns>  
        </MasterTableView>  
        <ClientSettings>  
                <ClientEvents OnRowClick="RowClick" OnRowDblClick="RowDblClick" 
                    OnGridCreated="GridCreated" OnCommand="GridCommand" />  
            </ClientSettings>  
 
        </telerik:RadGrid> 


when i double click on the "comment row" the edit form is correctly used but I can't save my change.

When i debug the code i notice that on the click event:
function RowClick(sender, eventArgs) {  
 
                if (editedRow && hasChanges) {  
 
                    hasChanges = false;  
                    if (confirm("Update changes?")) {  
 
                        $find("<%= GridComment.MasterTableView.ClientID %>").updateItem(editedRow);  
                    }  
                }  
            } 
the variable hasChanges is false even if modification where made.
Debuging again i found that during this event:
function GridCreated(sender, eventArgs) {  
                var gridElement = sender.get_element();  
                var elementsToUse = [];  
                  
                inputs = gridElement.getElementsByTagName("input");  
                for (var i = 0; i < inputs.length; i++) {  
                    var lowerType = inputs[i].type.toLowerCase();  
                    if (lowerType == "hidden" || lowerType == "button") {  
                        continue;  
                    }  
 
                    Array.add(elementsToUse, inputs[i]);  
                    inputs[i].onchange = TrackChanges;  
                }  
 
                dropdowns = gridElement.getElementsByTagName("select");  
                for (var i = 0; i < dropdowns.length; i++) {  
                      
                    dropdowns[i].onchange = TrackChanges;  
                      
                }  
 
                setTimeout(function() { if (elementsToUse[0]) elementsToUse[0].focus(); }, 100);  
            } 
my edittemplateitem was not added to "inputs" and thus don't receive the "onchange=TrackChanges".

I think inputs = gridElement.getElementsByTagName("input"); "
doesn't collect my edittemplateitem because it's hidden but i am not sure at all.

Any advice?

thank you
regis
Top achievements
Rank 1
 answered on 01 Jun 2009
1 answer
114 views

How do I format CommandItemTemplate to align image buttons? 

Shinu
Top achievements
Rank 2
 answered on 01 Jun 2009
2 answers
251 views
I am trying to reload a grid view based on a drop down list selection.  Below is my code.  Can someone point me in the right direction?

.VB code:

Imports

 

System

 

Imports

 

System.Configuration

 

Imports

 

System.Data

 

Imports

 

System.Data.SqlClient

 

Imports

 

Telerik.Web.UI

 

Imports

 

System.Configuration.ConfigurationManager

 

Partial

 

Class Mistras_Admin_NDEEquipmentList

 

 

Inherits System.Web.UI.Page

 

 

Dim myConnection As New SqlConnection(AppSettings("Conn"))

 

 

Public Function GetDataTable(ByVal query As String) As DataTable

 

 

Dim ConnString As String = ConfigurationManager.ConnectionStrings("ConnMR").ConnectionString

 

 

Dim conn As SqlConnection = New SqlConnection(ConnString)

 

 

Dim adapter As SqlDataAdapter = New SqlDataAdapter

 

adapter.SelectCommand =

New SqlCommand(query, conn)

 

 

Dim table1 As New DataTable

 

conn.Open()

 

Try

 

adapter.Fill(table1)

 

Finally

 

conn.Close()

 

End Try

 

 

Return table1

 

 

End Function

 

 

Public ReadOnly Property NDEE() As DataTable

 

 

Get

 

 

Dim obj As Object = Me.Session("NDEE")

 

 

If (Not obj Is Nothing) Then

 

 

Return CType(obj, DataTable)

 

 

End If

 

 

Dim myDataTable As DataTable = New DataTable

 

myDataTable = GetDataTable(

"SELECT Equipment.EquipmentID, EquipmentType.EquipmentType, Equipment.Manufacturer, Equipment.Model, Equipment.SerialNo, Equipment.Megahertz, Equipment.ProbeDiameter, Equipment.TypeOrForm, Equipment.Inactive FROM Equipment with (nolock) inner join EquipmentType with (nolock) on Equipment.EquipmentTypeID = EquipmentType.EquipmentTypeID WHERE Equipment.EquipmentID IN (SELECT EquipmentID FROM Equipment_Location_Link WHERE LocationID = " & ddlLocations.SelectedValue & ")")

 

 

Me.Session("NDEE") = myDataTable

 

 

Return myDataTable

 

 

End Get

 

 

End Property

 

 

Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource

 

 

Me.RadGrid1.DataSource = Me.NDEE

 

 

Me.NDEE.PrimaryKey = New DataColumn() {Me.NDEE.Columns("EquipmentID")}

 

 

End Sub

 

 

Protected Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.PreRender

 

 

If Not IsPostBack Then

 

 

'Me.RadGrid1.MasterTableView.Items(1).Edit = True

 

 

Me.RadGrid1.MasterTableView.Rebind()

 

 

End If

 

 

End Sub

 

 

 

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

 

 

Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)

 

 

Dim MyUserControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl)

 

 

'Locate the changed row in the DataSource

 

 

Dim changedRows As DataRow() = Me.NDEE.Select("EquipmentID = " & editedItem.OwnerTableView.DataKeyValues(editedItem.ItemIndex)("EquipmentID"))

 

 

 

If (Not changedRows.Length = 1) Then

 

e.Canceled =

True

 

 

Return

 

 

End If

 

 

'Update new values

 

 

Using updateCommand As New SqlCommand("Update_Equipment", myConnection)

 

updateCommand.CommandType = CommandType.StoredProcedure

updateCommand.Parameters.AddWithValue(

"@EID", editedItem.OwnerTableView.DataKeyValues(editedItem.ItemIndex)("EquipmentID"))

 

updateCommand.Parameters.AddWithValue(

"@ETID", CType(MyUserControl.FindControl("ddlET"), DropDownList).SelectedValue)

 

updateCommand.Parameters.AddWithValue(

"@Man", CType(MyUserControl.FindControl("txtMan"), TextBox).Text)

 

updateCommand.Parameters.AddWithValue(

"@Mod", CType(MyUserControl.FindControl("txtModel"), TextBox).Text)

 

updateCommand.Parameters.AddWithValue(

"@SNo", CType(MyUserControl.FindControl("txtSBN"), TextBox).Text)

 

updateCommand.Parameters.AddWithValue(

"@MHz", CType(MyUserControl.FindControl("txtMHz"), TextBox).Text)

 

updateCommand.Parameters.AddWithValue(

"@PD", CType(MyUserControl.FindControl("txtPD"), TextBox).Text)

 

updateCommand.Parameters.AddWithValue(

"@ToF", CType(MyUserControl.FindControl("txtMPFT"), TextBox).Text)

 

updateCommand.Parameters.AddWithValue(

"@Ina", CType(MyUserControl.FindControl("cbInactive"), CheckBox).Checked)

 

myConnection.Open()

updateCommand.ExecuteNonQuery()

myConnection.Close()

 

End Using

 

 

Dim newValues As Hashtable = New Hashtable

 

newValues(

"Manufacturer") = CType(MyUserControl.FindControl("txtMan"), TextBox).Text

 

newValues(

"Model") = CType(MyUserControl.FindControl("txtModel"), TextBox).Text

 

newValues(

"SerialNo") = CType(MyUserControl.FindControl("txtSBN"), TextBox).Text

 

newValues(

"TypeOrForm") = CType(MyUserControl.FindControl("txtMPFT"), TextBox).Text

 

newValues(

"Megahertz") = CType(MyUserControl.FindControl("txtMHz"), TextBox).Text

 

newValues(

"ProbeDiameter") = CType(MyUserControl.FindControl("txtPD"), TextBox).Text

 

newValues(

"EquipmentType") = CType(MyUserControl.FindControl("ddlET"), DropDownList).SelectedItem.Text

 

newValues(

"Inactive") = CType(MyUserControl.FindControl("cbInactive"), CheckBox).Checked

 

changedRows(0).BeginEdit()

 

Try

 

 

Dim entry As DictionaryEntry

 

 

For Each entry In newValues

 

changedRows(0)(

CType(entry.Key, String)) = entry.Value

 

 

Next

 

changedRows(0).EndEdit()

 

Me.NDEE.AcceptChanges()

 

 

Catch ex As Exception

 

changedRows(0).CancelEdit()

 

Dim lblError As Label = New Label()

 

lblError.Text =

"Unable to update Equipment. Reason: " + ex.Message

 

lblError.ForeColor = System.Drawing.Color.Red

RadGrid1.Controls.Add(lblError)

e.Canceled =

True

 

 

End Try

 

 

End Sub

 

 

Protected Sub RadGrid1_InsertCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) Handles RadGrid1.InsertCommand

 

 

If Session("Insert") = False Then

 

Session(

"Insert") = True

 

 

Exit Sub

 

 

Else

 

Session(

"Insert") = False

 

 

End If

 

 

Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)

 

 

Dim userControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl)

 

 

'Prepare new row to add it in the DataSource

 

 

Dim newRow As DataRow = Me.NDEE.NewRow

 

 

'Insert new values

 

 

Dim newValues As Hashtable = New Hashtable

 

 

Using insertCommand As New SqlCommand("Insert_Equipment", myConnection)

 

insertCommand.CommandType = CommandType.StoredProcedure

insertCommand.Parameters.AddWithValue(

"@ETID", CType(userControl.FindControl("ddlET"), DropDownList).SelectedValue)

 

insertCommand.Parameters.AddWithValue(

"@Man", CType(userControl.FindControl("txtMan"), TextBox).Text)

 

insertCommand.Parameters.AddWithValue(

"@Mod", CType(userControl.FindControl("txtModel"), TextBox).Text)

 

insertCommand.Parameters.AddWithValue(

"@SNo", CType(userControl.FindControl("txtSBN"), TextBox).Text)

 

insertCommand.Parameters.AddWithValue(

"@MHz", CType(userControl.FindControl("txtMHz"), TextBox).Text)

 

insertCommand.Parameters.AddWithValue(

"@PD", CType(userControl.FindControl("txtPD"), TextBox).Text)

 

insertCommand.Parameters.AddWithValue(

"@ToF", CType(userControl.FindControl("txtMPFT"), TextBox).Text)

 

insertCommand.Parameters.AddWithValue(

"@Ina", CType(userControl.FindControl("cbInactive"), CheckBox).Checked)

 

myConnection.Open()

insertCommand.ExecuteNonQuery()

myConnection.Close()

 

End Using

 

newValues(

"Manufacturer") = CType(userControl.FindControl("txtMan"), TextBox).Text

 

newValues(

"Model") = CType(userControl.FindControl("txtModel"), TextBox).Text

 

newValues(

"SerialNo") = CType(userControl.FindControl("txtSBN"), TextBox).Text

 

newValues(

"TypeOrForm") = CType(userControl.FindControl("txtMPFT"), TextBox).Text

 

newValues(

"Megahertz") = CType(userControl.FindControl("txtMHz"), TextBox).Text

 

newValues(

"ProbeDiameter") = CType(userControl.FindControl("txtPD"), TextBox).Text

 

newValues(

"EquipmentType") = CType(userControl.FindControl("ddlET"), DropDownList).SelectedItem.Text

 

newValues(

"Inactive") = CType(userControl.FindControl("cbInactive"), CheckBox).Checked

 

 

'make sure that unique primary key value is generated for the inserted row

 

newValues(

"EquipmentID") = (CType(Me.NDEE.Rows((Me.NDEE.Rows.Count - 1))("EquipmentID"), Integer) + 1)

 

 

Try

 

 

For Each entry As DictionaryEntry In newValues

 

newRow(

CType(entry.Key, String)) = entry.Value

 

 

Next

 

 

Me.NDEE.Rows.Add(newRow)

 

 

Me.NDEE.AcceptChanges()

 

 

Catch ex As Exception

 

 

Dim lblError As Label = New Label()

 

lblError.Text =

"Unable to insert Equipment. Reason: " + ex.Message

 

lblError.ForeColor = System.Drawing.Color.Red

RadGrid1.Controls.Add(lblError)

e.Canceled =

True

 

 

End Try

 

 

End Sub

 

 

Protected Sub RadGrid1_DeleteCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) Handles RadGrid1.DeleteCommand

 

 

Dim ID As String = (CType(e.Item, GridDataItem)).OwnerTableView.DataKeyValues(e.Item.ItemIndex)("EquipmentID").ToString

 

 

Using deleteCommand As New SqlCommand("Delete_Equipment", myConnection)

 

deleteCommand.CommandType = CommandType.StoredProcedure

deleteCommand.Parameters.AddWithValue(

"@EID", ID)

 

myConnection.Open()

deleteCommand.ExecuteNonQuery()

myConnection.Close()

 

End Using

 

 

Dim NDEETable As DataTable = Me.NDEE

 

 

If Not (NDEETable.Rows.Find(ID) Is Nothing) Then

 

NDEETable.Rows.Find(ID).Delete()

NDEETable.AcceptChanges()

 

End If

 

 

End Sub

 

 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

 

 

If IsPostBack = False Then

 

Session(

"Insert") = True

 

 

'Load Locations dropdownlist

 

ddlLocations.Items.Add(

New ListItem(" ", "0"))

 

 

Using selectCommand As New SqlCommand("select_Locations", myConnection)

 

selectCommand.CommandType = CommandType.StoredProcedure

myConnection.Open()

 

Using reader As SqlDataReader = selectCommand.ExecuteReader

 

 

While reader.Read

 

ddlLocations.Items.Add(

New ListItem(reader("WebName"), reader("LocationID")))

 

 

End While

 

 

End Using

 

myConnection.Close()

 

End Using

 

 

End If

 

 

End Sub

 

 

Protected Sub ddlLocations_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlLocations.SelectedIndexChanged

 

 

Me.RadGrid1.DataSource = Me.NDEE

 

 

Me.NDEE.PrimaryKey = New DataColumn() {Me.NDEE.Columns("EquipmentID")}

 

 

Me.RadGrid1.MasterTableView.Rebind()

 

 

End Sub

 

End

 

Class

 


.aspx code:

<

 

asp:Content ID="Content1" ContentPlaceHolderID="PageContent" Runat="Server">

 

 

<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:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="RadGrid1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

 

<asp:DropDownList ID="ddlLocations" runat="server" AutoPostBack="true" /><br /><br />

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AllowPaging="True"

 

 

AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="true" OnPreRender="RadGrid1_PreRender"

 

 

OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand"

 

 

OnInsertCommand="RadGrid1_InsertCommand" OnDeleteCommand="RadGrid1_DeleteCommand">

 

 

<MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="EquipmentID">

 

 

<Columns>

 

 

<telerik:GridEditCommandColumn UniqueName="EditCommandColumn">

 

 

</telerik:GridEditCommandColumn>

 

 

<telerik:GridBoundColumn UniqueName="Manufacturer" HeaderText="Manufacturer" DataField="Manufacturer">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn UniqueName="Model" HeaderText="Model" DataField="Model">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn UniqueName="SerialNo" HeaderText="Serial/Batch No." DataField="SerialNo">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn UniqueName="TypeOrForm" HeaderText="MT or PT<br/>Form/Type" DataField="TypeOrForm">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn UniqueName="Megahertz" HeaderText="MHz" DataField="Megahertz">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn UniqueName="ProbeDiameter" HeaderText="Probe<br/>Diameter" DataField="ProbeDiameter">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn UniqueName="EquipmentType" HeaderText="Equipment<br/>Type" DataField="EquipmentType">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn UniqueName="Inactive" HeaderText="Inactive" DataField="Inactive">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Delete" CommandName="Delete" />

 

 

</Columns>

 

 

<EditFormSettings UserControlName="NDEEUpdateForm.ascx" EditFormType="WebUserControl" >

 

 

<EditColumn UniqueName="EditCommandColumn1">

 

 

</EditColumn>

 

 

</EditFormSettings>

 

 

</MasterTableView>

 

 

<ClientSettings>

 

 

<ClientEvents OnRowDblClick="RowDblClick" />

 

 

</ClientSettings>

 

 

</telerik:RadGrid><br />

 

 

<asp:Label ID="test" runat="server" />

 

</

 

asp:Content>

 



John
Top achievements
Rank 1
 answered on 01 Jun 2009
1 answer
102 views
Hello all,

I have a web page with a RadGrid containing on each row a DropDownList. This page contains also at the top a RadDock.

When I drag the RadDock on the DropDownLists, this one is drawn under theses DropDownLists. There is a possibility to hide the DropDownLists when the RadDock is on their top, to show only the RadDock?

Or any other possibilities?

Note: Of course, this issue is the same for ListBox.

Best regards.
Obi-Wan Kenobi
Top achievements
Rank 1
 answered on 01 Jun 2009
1 answer
191 views
I'm building a UI that relies on the RRULE engine and stores Appointments in the same Appointments database table, but does NOT use a RadScheduler instance.

The reason for doing so is so I can emulate recurring Bills (i.e. not Appointments, exactly), and I'll want to generate a forecast of upcoming bills in order to create a budget. The point is, using the RRULE functionality will make it much easier for me to display bills that will occur in the future.

However, there may be times when I'll need to edit a single future occurrence. For instance, say I have a monthly bill to my cable company, but for my birthday my parents are going to pick up the tab. Therefore, for that one instance, I'll want to create an exception so that that bill doesn't get forecasted in my budget.

I understand that exceptions get appended to the RRULE string in the Master event's RRULE field. The question is, how do I generate create such an exception programmatically?

Thanks very much,

Michael
T. Tsonev
Telerik team
 answered on 01 Jun 2009
3 answers
195 views
I'm using the latest version of the controls and the RadDock seems to wokr fine in IE7 but in IE6 no scroll bars appear when the content of the raddock is bigger than the raddock.  I've not set teh width/height of the raddock.  Is this necessary to get the scroll to work in IE6?
Obi-Wan Kenobi
Top achievements
Rank 1
 answered on 01 Jun 2009
1 answer
158 views

Hi,
 I used below style sheet for RadGrid ASP.Net for Ajax working fine,but Pager images(Firstpage,Previouspage,nextpage,lastpage) are displaying like buttons and sort columns image also displaying like button and heirarchy image also displaying like button , what was the problem?can u plz give the solution,

Thanks,

 

 

<Telerik:RadGrid ID="DynamicRadgrid" EnableEmbeddedSkins ="false" CssClass ="WebGrid20" Visible="false" runat="server" ShowFooter="False"

 

 

AutoGenerateColumns="False" AllowPaging="true" PageSize="10" HeaderStyle-HorizontalAlign="Center" FooterStyle-HorizontalAlign="left" HeaderStyle-Height="15px" GridLines="None"

 

 

 

 

 

 

OnNeedDataSource="DynamicRadgrid_NeedDataSource" Width="795px">

 

 

 

 

 

 

<ClientSettings>

 

 

 

 

 

 

<Scrolling AllowScroll="True" ScrollHeight="150px" UseStaticHeaders="True" />

 

 

 

 

 

 

<Selecting AllowRowSelect="True" />

 

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

 

<FooterStyle HorizontalAlign="Left" />

 

 

 

 

 

 

<HeaderStyle Height="15px" HorizontalAlign="Center" />

 

 

 

 

 

 

<PagerStyle Mode="NextPrev" />

 

 

 

 

 

 

<ItemStyle Font-Bold ="true" Font-Size ="11px" Font-Names ="Arial"/>

 

 

 

 

 

 

</Telerik:RadGrid>

 


/*global*/

 

div.RadGrid_WebBlue

 

{

 

font: normal 9px Arial;

 

 

text-align: left;

 

 

 

 

 

scrollbar-face-color: #E9E9E9;

 

 

scrollbar-highlight-color: white;

 

 

scrollbar-shadow-color: #E9E9E9;

 

 

scrollbar-3dlight-color: #DBDBDB;

 

 

scrollbar-arrow-color: #787878;

 

 

scrollbar-track-color: #F5F5F5;

 

 

scrollbar-darkshadow-color: #AEAEAE;

 

}

 

.WebGrid20 .rgCaption

 

{

 

background-color :#92b4e1;

 

 

color :#ffffff;

 

}

 

.WebGrid20 .RadGrid_WebBlue,

 

 

.WebGrid20 .RadGridRTL_WebBlue,

 

 

.WebGrid20 .RadGrid_WebBlue a

 

{

 

font: normal 11px arial;

 

 

font-weight: bold;

 

 

color: #333;

 

}

 

.WebGrid20 .rgMasterTable

 

{

 

border: solid 1px #E8E8E8;

 

 

border-collapse: separate !important;

 

 

color: #333;

 

}

 

 

.WebGrid20 .rgMasterTable td,

 

 

.WebGrid20 .rgMasterTable th

 

{

 

padding:2px 4px;

 

}

 

.WebGrid20 th.rgHeader,

 

 

.WebGrid20 th.rgResizeCol

 

{

 

font: bold 11px Arial;

 

 

font-weight: bold;

 

 

background: #E8E8E8;

 

 

height: 21px;

 

 

color: white;

 

 

background-color :#92b4e1;

 

}

 

 

.WebGrid20 .rgHeaderDiv a

 

{

 

color: white;

 

 

font-weight: bold;

 

 

font: bold 11px Arial;

 

 

text-decoration: none;

 

}

 

.WebGrid20 .rgRow td,

 

 

.WebGrid20 .rgEditRow td,

 

 

.WebGrid20 .rgAltRow td,

 

 

.WebGrid20 .rgSelectedRow td

 

{

 

border-right: solid 1px #999999;

 

 

}

 

.WebGrid20 .rgActiveRow

 

{

 

height: 15px;

 

}

 

.WebGrid20 .rgEditRow td

 

{

 

border-bottom: solid 1px #d8dde0;

 

}

 

 

.WebGrid20 .rgFooter td

 

{

 

border: solid 0px Red;

 

 

border-top: 0px solid Red;

 

 

padding:0 4px;

 

}

 

 

 

.WebGrid20 tr.rgAltRow

 

{

 

background: #c6e3f1;

 

 

font: bold 11px Arial;

 

 

}

 

 

.WebGrid20 .rgSelectedRow,

 

{

 

background: #F9ECDB !important;

 

 

}

 

.WebGrid20 .rgEditRow input

 

{

 

font-size: 11px;

 

}

 

.WebGrid20 .rgActiveRow

 

{

 

background: #e7f1ff !important;

 

}

 

 

.WebGrid20 .rgSelectedRow td,

 

 

.WebGrid20 .rgActiveRow td

 

{

 

border-right: solid 1px #999999;

 

}

 

.WebGrid20 .rgPager

 

{

 

background: #d6d6d6;

 

 

height: 15px;

 

}

.WebGrid20

 

.rgPager td

 

{

color

 

: Navy;

 

}

.WebGrid20

 

.rgFooter

 

{

 

background: #e8e8e8;

 

 

height: 21px;

 

 

color: #666;

 

}

.WebGrid20

 

.rgFooter td

 

{

 

border: solid 0px #E8E8E8;

 

 

border-top: 0px solid Red;

 

 

padding:0 4px;

 

}

.WebGrid20

 

.rgFooter a,

 

.WebGrid20

 

.rgPager td,

 

.WebGrid20

 

.rgPager a

 

{

 

font-weight: bold !important;

 

}

.WebGrid20

 

.rgPager td a:hover,

 

.WebGrid20

 

.rgFooter td a:hover

 

{

 

color: Navy;

 

}

 

.WebGrid20 tr.rgGroupHeader td

 

{

 

border-bottom: solid 2px #6788be;

 

}

.WebGrid20

 

table.rgGroupPanel

 

{

 

background: #92b4e1;

 

 

width: 100% !important;

 

 

height: 15px;

 

 

border-collapse: collapse;

 

 

border: dashed 0px #ff9900;

 

 

margin-bottom: 12px;

 

 

text-align: center;

 

 

color: #333;

 

}

.WebGrid20

 

.rgGroupItem

 

{

 

background: #544b58 url('Img/GroupPanelItemsButtonBg.gif') repeat-x;

 

 

color: #ffebcc;

 

 

border: solid 1px #8e827f;

 

 

white-space: nowrap;

 

 

font-size: 9px;

 

 

padding: 0px 30px;

 

 

height: 18px;

 

}

 

.WebGrid20 td.rgHeader input

 

{

 

margin-top: 10px;

 

 

width: auto;

 

 

float: left;

 

 

border: solid 1px #E8E8E8;

 

 

background: white;

 

 

font: bold 9px Arial;

 

 

color: #E8E8E8;

 

 

height: 14px;

 

 

vertical-align: middle;

 

}

 

.WebGrid20 td.rgHeader img

 

{

 

margin-top: 10px;

 

 

margin-left: 2px;

 

 

float: left;

 

}

.WebGrid20

 

.rgPager

 

{

 

background:#dae2e8;

 

}

.WebGrid20

 

.rgPager td

 

{

 

padding:0;

 

}

.WebGrid20

 

.rgPager .rgPagerCell

 

{

 

border:1px solid;

 

 

border-color:#a2b3c7 #fff #fff;

 

 

border-right:0;

 

 

padding:3px 0 2px;

 

}

.WebGrid20

 

.rgWrap

 

{

 

float:left;

 

 

padding:0 10px;

 

 

line-height:26px;

 

 

white-space:nowrap;

 

}

.WebGrid20

 

.rgArrPart1

 

{

 

padding-right:0;

 

 

line-height:22px;

 

}

.WebGrid20

 

.rgArrPart2

 

{

 

padding-left:0;

 

 

line-height:22px;

 

}

.WebGrid20

 

.rgInfoPart

 

{

 

float:right;

 

 

color:#506175;

 

}

.WebGrid20

 

.rgInfoPart strong

 

{

 

font-weight:normal;

 

 

color:#000;

 

}

.WebGrid20

 

.rgSEO .rgArrPart1,

 

.WebGrid20

 

.rgSEO .rgArrPart2

 

{

 

line-height:24px;

 

}

.WebGrid20

 

.rgWrap a img

 

{

 

margin:0 8px;

 

}

.WebGrid20

 

.rgPageFirst,

 

.WebGrid20

 

.rgPagePrev,

 

.WebGrid20

 

.rgPageNext,

 

.WebGrid20

 

.rgPageLast

 

{

 

width:22px;

 

 

height:24px;

 

}

.WebGrid20

 

.rgPageFirst

 

{

 

background-position:0 -549px;

 

}

.WebGrid20

 

.rgPageFirst:hover

 

{

 

background-position:0 -599px;

 

}

.WebGrid20

 

.rgPagePrev

 

{

 

background-position:0 -699px;

 

}

.WebGrid20

 

.rgPagePrev:hover

 

{

 

background-position:0 -749px;

 

}

.WebGrid20

 

.rgPageNext

 

{

 

background-position:0 -849px;

 

}

.WebGrid20

 

.rgPageNext:hover

 

{

 

background-position:0 -899px;

 

}

.WebGrid20

 

.rgPageLast

 

{

 

background-position:0 -999px;

 

}

.WebGrid20

 

.rgPageLast:hover

 

{

 

background-position:0 -1049px;

 

}

.WebGrid20

 

.rgPagerButton

 

{

 

height:22px;

 

 

border:1px solid;

 

 

border-color:#4e667e #476077 #425c71;

 

 

margin:0 14px 0 0;

 

 

padding:0 4px 2px;

 

 

background:#d6e1e7 repeat-x 0 -1550px url('FocalPoint/sprite.gif');

 

 

color:#0d202b;

 

 

font:12px/12px "segoe ui",arial,sans-serif;

 

 

vertical-align:middle;

 

 

cursor:pointer;

 

}

.WebGrid20

 

.rgNumPart

 

{

 

padding:2px 0;

 

}

.WebGrid20

 

.NumericPages .rgNumPart

 

{

 

padding:2px 10px;

 

}

.WebGrid20

 

.rgNumPart a:hover,

 

.WebGrid20

 

.rgNumPart a:hover span,

 

.WebGrid20

 

.rgNumPart a.rgCurrentPage,

 

.WebGrid20

 

.rgNumPart a.rgCurrentPage span

 

{

 

background:no-repeat url('FocalPoint/sprite.gif');

 

}

.WebGrid20

 

.rgNumPart a

 

{

 

float:left;

 

 

line-height:22px;

 

 

margin:0;

 

 

padding:0 5px 0 0;

 

 

color:#000;

 

 

text-decoration:none;

 

}

.WebGrid20

 

.rgNumPart span

 

{

 

float:left;

 

 

padding:0 0 0 5px;

 

}

.WebGrid20

 

.rgNumPart a:hover

 

{

 

background-position:100% -1250px;

 

 

color:#0e3d4f;

 

}

.WebGrid20

 

.rgNumPart a:hover span

 

{

 

background-position:0 -1150px;

 

 

cursor:pointer;

 

}

.WebGrid20

 

.rgNumPart a.rgCurrentPage,

 

.WebGrid20

 

.rgNumPart a.rgCurrentPage:hover

 

{

 

background-position:100% -1450px;

 

 

color:#0053a5;

 

 

cursor:default;

 

}

.WebGrid20

 

.rgNumPart a.rgCurrentPage span,

 

.WebGrid20

 

.rgNumPart a.rgCurrentPage:hover span

 

{

 

background-position:0 -1350px;

 

 

cursor:default;

 

}

.WebGrid20

 

.NextPrevNumericAndAdvanced .rgAdvPart

 

{

 

float:none;

 

 

text-align:center;

 

}

.WebGrid20

 

.rgPager .RadSlider

 

{

 

float:left;

 

 

margin:2px 10px 0 0;

 

}

.WebGrid20

 

.rgPager .rgPagerLabel,

 

.WebGrid20

 

.rgPager .RadComboBox,

 

.WebGrid20

 

.rgPager .RadInput_WebBlue

 

{

 

margin:0 4px 0 0;

 

 

vertical-align:middle;

 

}

.WebGrid20

 

.rgPager .RadComboBox

 

{

 

margin-top:-1px;

 

}

*+html

 

.WebGrid20 .rgPager .RadComboBox{margin-top:-2px;}

 

*

 

html .WebGrid20 .rgPager .RadComboBox{margin-top:-2px;}

 

*

 

html .WebGrid20 .rgPager .RadComboBox{padding:1px 0;}

 

.WebGrid20

 

.rgPagerTextBox

 

{

 

text-align:center;

 

}

/*hierarchy*/

.WebGrid20

 

.rgDetailTable

 

{

 

border:1px solid #768ca5;

 

 

border-right:0;

 

 

font:12px/16px "segoe ui",arial,sans-serif;

 

 

border-collapse:separate;

 

}

.RadGridRTL_WebBlue

 

.rgDetailTable

 

{

 

border-right:1px solid;

 

 

border-left:0;

 

}

.WebGrid20

 

.rgDetailTable

 

{

 

border-collapse:separate;

 

}

Dimo
Telerik team
 answered on 01 Jun 2009
2 answers
117 views
I was searching for a way to automatically dock a pane on expanding of the pane. I found the article below, but for some reason the javascript does not seem to be firing on the OnClientExpanded. Can somone point me in the right direction?


http://www.telerik.com/support/kb/aspnet-ajax/splitter/dock-a-radslidingpane-on-expand.aspx

<

 

telerik:RadSplitter id="RadSplitter1" runat="server" height="708" width="100%" CssClass="Splitter.Forest.css" ResizeMode="EndPane" BorderStyle="None" Skin="Forest" EnableEmbeddedSkins="False" >

 

 

<telerik:RadPane id="Radpane1" runat="server" width="22" scrolling="None" minwidth="22" MaxHeight="708" >

 


<

 

telerik:RadSlidingZone id="SlidingZone1" runat="server" width="22px" clicktoopen="true" >

 


 

<telerik:RadSlidingPane id="MBOM" title="MBOM" runat="server" width="500px" MaxHeight="708" OnClientBeforeExpand="beforeExpand" >

 


<

 

script type="text/javascript">

 

 

function beforeExpand(sender,eventArgs)

 

{

 

var slidingZone = $find("<%= SlidingZone1.ClientID %>");

 

slidingZone.dockPane(sender.get_id());

eventArgs.set_cancel(

true);

 

alert(

"Your text in the alert function.");

 

 

}

 

</script>

 


Dmitry
Top achievements
Rank 1
 answered on 01 Jun 2009
0 answers
101 views
Hi,

I have a simple grid:
- no paging
- client side row selection allowed (single selection)
I have the id of the last selected row (let's say (for simplicity) - it's index in the grid) stored somewhere (let it be Session). When I load the page with this grid I want to select this row automatically.
I do the following (all client side):
- hook to GridCreated event
- supply the event handler like this:
function GridCreatedHandler(sender, eventArgs) {  
  var master = sender.get_masterTableView();  
  master.get_dataItems()[<stored row index>].set_selected(true);  
} 
OK, it seems to work well. The desired row gets automatically selected. When I click on any other row - the previous gets deselected, the new one - selected.
But when I click on an already selected row (the last selected one, not neccessarily this <stored row index> one) this row gets deselected and the subsequent clicks don't want to select it.
If I comment out this "set_selected" statement selecting and deselecting works as expected.
It is independent from the used browser.

What should I do to achieve my goal?

Regards
Tomasz
tmlipinski
Top achievements
Rank 1
 asked on 01 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?