Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
41 views
My program seems to work fine without it but I am nervous about removing it.

 protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
            if (!e.Item.OwnerTableView.IsItemInserted)
            {
                GridEditableItem item = e.Item as GridEditableItem;

                GridEditManager manager = item.EditManager;

                GridTextBoxColumnEditor editor = manager.GetColumnEditor("CustomerID") as GridTextBoxColumnEditor;

                editor.TextBoxControl.Enabled = false;
            }

        }
    }

Nikolay Rusev
Telerik team
 answered on 23 Sep 2010
1 answer
101 views
I am using version 2009.3.1314.35 of the Telerik controls.

When I place a datetimepicker control on an empty form, I am expecting to see a control.SelectedTime property. However, I don't see it.

<

 

telerik:RadTimePicker ID="RadTimePicker1" runat="server">

 

 

</telerik:RadTimePicker>

Inside my designer file, I have the following:

 

 

/// <summary>

 

 

 

 

 

/// RadTimePicker1 control.

 

 

 

 

 

/// </summary>

 

 

 

 

 

/// <remarks>

 

 

 

 

 

/// Auto-generated field.

 

 

 

 

 

/// To modify move field declaration from designer file to code-behind file.

 

 

 

 

 

/// </remarks>

 

 

 

 

 

protected global::Telerik.Web.UI.RadTimePicker RadTimePicker1;

 

 


How can I get this property value to appear in the code behind?

Shinu
Top achievements
Rank 2
 answered on 23 Sep 2010
1 answer
155 views
In RADGrid, how to make 'Enter' key to accept the change in a popup edit form and return to parent grid control?

What it does now is when I press 'Enter' in a popup edit form, it pops up another edit form for another grid control in the same window. How could that happen?

Ken
Shinu
Top achievements
Rank 2
 answered on 23 Sep 2010
3 answers
592 views
Hi,

I have a grid with 5 columns, what I want to do is when editing a row, only the 5th column is editable, columns 1-4 should remain as it is, is this possible? can you please point me to a good example.

Thanks in advance
John
John
Top achievements
Rank 1
 answered on 23 Sep 2010
4 answers
451 views
Hello All,

Can anyone help me to solve this problem.

1) I have a normal IE window, when i click on button, it should open a completely new Radwindow and close the parent window. 
     Currently its opening in same window.

2) From Child window, hope it can open popups and should not be a problem.

Any solution will be really appreciated.

Regards
Sudhakar
sudhakar
Top achievements
Rank 1
 answered on 23 Sep 2010
1 answer
111 views
I have a page using a master page.  The content page includes a tabstrip and multipage combo.  I have created a wizard (based on the sample) where the user fills out part of a form and then clicks on a "Next" button to progress to the next pageview.  The user can not navigate via the tabstrip and serves only as an indicator of the user's progress towards completing the form.

The tabstrip and multipage are contained in a RadAjaxPanel.

Unfortunately some of the forms in each of the views can be pretty lengthy.  When the user clicks on the next button, the pageview changes as desired but it remains scrolled down to the point where the button appeared.  How can I make the page scroll back to the top each time the active pageview changes?

Thanks!!!
Steve LaForge
Top achievements
Rank 1
 answered on 22 Sep 2010
3 answers
106 views

Radlistbox fires both OnClientItemChecked and OnClientSelectedIndexChanged when an item is checked in Firefox and IE but not in Chrome.
Chrome seems to have the proper behavior. Is there a reason for this? Can I make IE and Firefox behave accordingly as well?

<telerik:RadListBox ID="radListBox0" runat="server" Height="400" Width="275"
SelectionMode="Single" CheckBoxes="true" Visible="true"
CssClass="RadListBox_SlidingPanel" EnableEmbeddedSkins="False"
EnableEmbeddedBaseStylesheet="False"
OnClientItemChecked="ListBoxIndexCheckToggled"
OnClientSelectedIndexChanged="ListBoxIndexChanged" />


Brad Bell
Top achievements
Rank 1
 answered on 22 Sep 2010
2 answers
67 views
Hi.

I'm trying to get a 1 digit decimal format (ex: 102.4 or 6.0) instead of getting 2 digits (102.41 or 6.02).

protected void gridReport_ExcelMLExportStylesCreated(object source, GridExportExcelMLStyleCreatedArgs e)
        {
            StyleElement oneDecimalStyle = new StyleElement("oneDecimalStyle");
            oneDecimalStyle.NumberFormat.FormatType = NumberFormatType.Fixed;
            oneDecimalStyle.NumberFormat.Attributes["ss:Format"] = "0/.0";
            e.Styles.Add(oneDecimalStyle);
 }
  
protected void gridReport_ExcelMLExportRowCreated(object source, GridExportExcelMLRowCreatedArgs e)
        {
            if (e.RowType == GridExportExcelMLRowType.DataRow)
            {
                CellElement cell = e.Row.Cells.GetCellByName("airDuration");
                cell.StyleValue = "oneDecimalStyle";
             }
        }

What's wrong in my code?
nabilus
Top achievements
Rank 1
 answered on 22 Sep 2010
13 answers
209 views
I'm trying to tweak my menu.  I have it built and have a sample of what it looks like here:
http://www.crhcf.org/images/menu-sample.jpg

1.  Right now the children are left-aligned and I need them right aligned.  I'm using images for the 3 child items.  

2.  How do I define a separator between the child menu items?  For instance I'd like to have two small white lines between the 3 child items like this:  http://www.crhcf.org/images/menu-sample-2.jpg
Right now it has 3 separators from the body gradient which is not what I want.  I don't want a separator under the last item.

3.  I would also like to define a border around the entire child menu and make it the same width as the dark green portion of its parent.

How do I do these things?  Thanks.
dean.carrefour
Top achievements
Rank 1
 answered on 22 Sep 2010
2 answers
121 views
I have been able to export to csv by adding a button to the CommandItemTemplate, then in server side findong the control and setting registerPostBackControl,
    Protected Sub RadGrid1_ItemCreated1(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated
 
 ....
 
                Dim btn_excel As LinkButton = TryCast(item.FindControl("btn_excel"), LinkButton)
 
                ScriptManager.GetCurrent(Page).RegisterPostBackControl(btn_excel)
 
 ....
 
End Sub

When fired this calls the export and fires correctly prompting the user to view or download.

However I have changed this to now appear as an item in the headerContextMenu, when the user clicks on the export option, the same code fires in the same order, however instead of exporting it just rebinds the data to the grid, the function i use is below,

Sub buildExport(ByVal type As String)
       RadGrid1.MasterTableView.Columns.Clear()
 
       Dim boundColumn As GridBoundColumn
 
       For Each column As DataColumn In Datasource.Columns
 
           If GridDataKeyNames <> "" Then
               If Not GridDataKeyNames.Contains(column.ColumnName.ToString()) Then
                   If column.ColumnName.ToString().ToLower().IndexOf("_hidden") < 0 And column.ColumnName.ToString().ToLower().IndexOf("rowclick") < 0 Then
 
                       boundColumn = New GridBoundColumn
                       RadGrid1.MasterTableView.Columns.Add(boundColumn)
 
                       boundColumn.DataField = column.ColumnName
                       boundColumn.HeaderText = column.ColumnName.Replace("_", " ")
                   Else
                       boundColumn = New GridBoundColumn
                       RadGrid1.MasterTableView.Columns.Add(boundColumn)
 
                       boundColumn.DataField = column.ColumnName
                       boundColumn.HeaderText = column.ColumnName
 
                       boundColumn.Visible = False
                   End If
 
               Else
 
               End If
           Else
               If column.ColumnName.ToString().ToLower().IndexOf("_hidden") < 0 And column.ColumnName.ToString().ToLower().IndexOf("rowclick") < 0 Then
 
                   boundColumn = New GridBoundColumn
                   RadGrid1.MasterTableView.Columns.Add(boundColumn)
 
                   boundColumn.DataField = column.ColumnName
                   boundColumn.HeaderText = column.ColumnName.Replace("_", " ").ToLower()
               Else
                   boundColumn = New GridBoundColumn
                   RadGrid1.MasterTableView.Columns.Add(boundColumn)
 
                   boundColumn.DataField = column.ColumnName
                   boundColumn.HeaderText = column.ColumnName.ToLower()
 
                   boundColumn.Visible = False
               End If
           End If
 
 
       Next
 
       RadGrid1.DataSource = Datasource
       RadGrid1.DataBind()
 
       RadGrid1.PageSize = Datasource.Rows.Count()
       RadGrid1.ExportSettings.IgnorePaging = True
 
       Select Case type
           Case "excel"
               RadGrid1.ExportSettings.ExportOnlyData = True
               RadGrid1.MasterTableView.ExportToCSV()
           Case "pdf"
               RadGrid1.ExportSettings.OpenInNewWindow = True
               RadGrid1.MasterTableView.ExportToPdf()
       End Select
 
   End Sub

Like i said boths methods in exporting call the same function, but only the contextItem will work.  I am databinding the grid again as the user may have hidden some columns, so this way all coulmns are provided, also needed to remove the boundColumn.DataFormatString = "<nobr>{0:N}</nobr>"
which is created when the grid is loaded to prevent word wrap.

I create the headerMenuItems in the following way

Private Sub addMenuItem(ByVal sender As Object, ByVal e As System.EventArgs)
 
    Dim menu As RadContextMenu = RadGrid1.HeaderContextMenu
    Dim item As New RadMenuItem
    item.Text = "Save Layout"
    item.Value = "save"
    item.Attributes("ColumnName") = String.Empty
    item.Attributes("TableID") = String.Empty
    menu.Items.Add(item)
    item = New RadMenuItem
    item.Attributes("ColumnName") = String.Empty
    item.Attributes("TableID") = String.Empty
    item.Text = "Export to CSV"
    item.Value = "csv"
    menu.Items.Add(item)
 
End Sub

The save Layout works fine (calls GridSettingsPersister)

Any help would be much appreciated.
mabs
Top achievements
Rank 1
 answered on 22 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?