Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
95 views
Hi,

I would like to know if pagination of long magazine articles is possible in RAD editor. Where pages splits it coud say "Read Netx>>>"
Thank you,
-khan
Rumen
Telerik team
 answered on 23 Feb 2012
2 answers
187 views
Hi,

When I click a node in my treeview and if that node has NO child nodes, NodeClick event is firing.. Not sure why!!
Strange thing is when I copy exact same code to a newly created project, its working fine..


I am using .NET Framework3.5 with C#


Any ideas?
Silver
Top achievements
Rank 1
 answered on 23 Feb 2012
1 answer
47 views
Hi,

We have a user-selectable resolution drop down that ranges from 50-5 minutes. We are Rebinding to the scheduler per the documentation  - and all work fine except the 5 minute option.

When MinutesPerRow=5 and the user drags/drops a time slot, the mouse cursor and the time block are disconnected - a vertical offset between the two is seen, with over 200 pixels between them (I am on a big monitor), where the mouse cursor appears as a 4 way x, and the time slot in the drag operation is moving in unison with the mouse, but appears far above the cursor. We have activities where 5 minute time blocks are quite common - hoping there is a solution wherein we can make this work.
Peter
Telerik team
 answered on 23 Feb 2012
0 answers
92 views
Is it possible to have the RadDateTimePicker only display the time portion as needed? We have DateTimes which may or may not have a time portion. If no time portion is present, I'd like to not display the default time.

Also, when the user selects a date from the calendar, I'd like to not have the default time be displayed.

Finally, if the user is typing in a date and does not enter a time, I'd like to not have the default time be displayed; as well, if they start to type past a date, I'd like to allow the time portion to be entered.

For the first part, I've bee trying to do this by toggling the visibility of the TimeView (eg. RadDateTimePicker1.TimeView.Visibility = false ) in the code behind, but that doesn't seem to have any effect.
Jay
Top achievements
Rank 3
Iron
Iron
Iron
 asked on 23 Feb 2012
1 answer
87 views
Hi All,

I am using a fixed width RibbonBar in my application. Looks like setting the width of the RibbonBar causes it to show resize handle. I am looking for a way to hide the resize handle and to disable resizing functionality. Any help in this regard is highly appreciated. 

Thanks in advance,
Prasad 
Bozhidar
Telerik team
 answered on 23 Feb 2012
5 answers
110 views

I am using the version 2011.3.1305.35 of the RadGrid and experiencing some strange behavior when the grid is right clicked. Occasionally when a user right clicks the gird to bring up a context menu the row that was right clicked will be selected in addition to any rows that were previously selected. The other times it just displays the context menu without selecting the rows. It seems to be intermittent and I cannot consistently reproduce results. I do not want the additional rows to be selected. Is there any way to trap how a row became selected? The domEvent property of the onrowselecting event args does not look like it has what I need.

 
Here is how i have the grid configured and the code that displays the context menu:

<telerik:RadGrid ID="tGrid" runat="server" AllowPaging="True" AllowCustomPaging="true" PageSize="500"
                AllowSorting="True" AutoGenerateColumns="False" CellSpacing="0"
                OnNeedDataSource="tGrid_NeedDataSource" AllowMultiRowSelection="true"
 OnItemCreated="tGrid_ItemCreated" >
                <PagerStyle AlwaysVisible="True" Position="Top"/>
                
                <MasterTableView Width="100%" DataKeyNames="schedID" ClientDataKeyNames="schedID">
                    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                    <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>                   
                    <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                    <Columns>
                        ...
                    </Columns>
 
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                </MasterTableView>
                <ClientSettings EnableRowHoverStyle="true">
                    <Selecting AllowRowSelect="True" />
                    <ClientEvents OnGridCreated="GridCreated"
                                  OnRowContextMenu="RowContextMenu" OnRowDblClick="tGrid_RowDblClick" />
                    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                </ClientSettings>                          
                <FilterMenu EnableImageSprites="false"></FilterMenu>               
            </telerik:RadGrid>

 

function RowContextMenu(sender, eventArgs)
{
    var contextmenu = $find("<%=DisplayContextMenu.ClientID %>");
     
    //get_domEvent returns a reference to the DOM event that caused the clicking
    var domEvent = eventArgs.get_domEvent();
 
    //If we're in an input field or a link, just ignore this request for a context menu
    if (domEvent.target.tagName == "INPUT" || domEvent.target.tagName == "A")
        return;
                   
    contextmenu.show(domEvent);
     
    domEvent.cancelBubble = true;
    domEvent.returnValue = false;
 
    if (domEvent.stopPropagation)
    {
        domEvent.stopPropagation();
        domEvent.preventDefault();
    }
 
    if(sender.get_id() == "<%= tGrid.ClientID %>")
        rightClickedRowId = eventArgs.getDataKeyValue("schedID")                
}


Thanks Dave

Tsvetoslav
Telerik team
 answered on 23 Feb 2012
5 answers
122 views
I have a issue in this radgrid in particular at templated column with radnumericbox inside the edittemplate, currency type and culture pt-br

The value in database is 10.00

The label in template of related column shows R$ 10,00 (it's ok).

When i enter in edit mode the radnumerictextbox shows R$ 1000,00 unselected and shows 1000 when got focus,  seems  it does not interprets the decimal point even when i force the numberformat properties. <NumberFormat GroupSeparator="." DecimalSeparator="," />

Did i missed something?

Gilberto
 
 <telerik:RadGrid ID="RadGridAnuidades" ValidationSettings-ValidationGroup="grid"
                                    runat="server" OnDataBound="RadGridAnuidades_DataBound" CellSpacing="0" GridLines="None"
                                    AllowAutomaticUpdates="True" DataSourceID="SqlDataSourceUpdateAnuidades" OnNeedDataSource="RadGridAnuidades_NeedDataSource">
                                    <ValidationSettings ValidationGroup="grid"></ValidationSettings>
                                    <MasterTableView AutoGenerateColumns="False" DataKeyNames="CódigoSócio,Ano" EditMode="InPlace"
                                        DataSourceID="SqlDataSourceUpdateAnuidades">
                                        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="CódigoSócio" Visible="false" DataType="System.Int32"
                                                FilterControlAltText="Filter CódigoSócio column" HeaderText="CódigoSócio" ReadOnly="True"
                                                SortExpression="CódigoSócio" UniqueName="CódigoSócio">
                                            </telerik:GridBoundColumn>
                                           
                                            <telerik:GridTemplateColumn DataField="Valor" DataType="System.Decimal" FilterControlAltText="Filter Valor column"
                                                HeaderText="Valor" SortExpression="Valor" UniqueName="Valor">
                                                <EditItemTemplate>
                                                    <telerik:RadNumericTextBox ID="RadNumericTextBoxValor" runat="server" Type="Currency"
                                                        Culture="pt-BR" Text='<%# Bind("Valor") %>'>
                                                        <NumberFormat GroupSeparator="." DecimalSeparator="," />
                                                    </telerik:RadNumericTextBox>
                                                    <asp:RequiredFieldValidator ValidationGroup="grid" ID="requiredfieldvalidatorValor"
                                                        runat="server" ControlToValidate="RadNumericTextBoxValor" CssClass="failureNotification"
                                                        ErrorMessage=" *">
                                                    </asp:RequiredFieldValidator>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="ValorLabel" runat="server" Text='<%# Bind("Valor", "{0:C2}") %>'></asp:Label>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                                                <ItemStyle CssClass="MyImageButton" />
                                            </telerik:GridEditCommandColumn>
                                           
                                        </Columns>
                                     
                                    </MasterTableView>
                                    
                                </telerik:RadGrid>

Gilberto
Top achievements
Rank 1
 answered on 23 Feb 2012
5 answers
120 views

Hi Telerik Team,

We have a requirement that the grid should fit in the page in such a way that the 
browser scrollbars should not appear.

We are dynamically creating the grid (i.e. programmatically in the code behind function DefineGridAttributes() (refer original function below),
(refer the attachments screenshot_1.jpg, screenshot_2.jpg)

This grid is being added into the placeholder control.
<! -- ASPX -- >
<telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel">
 <div>
            <asp:PlaceHolder ID="plcHolderGridControl" runat="server"></asp:PlaceHolder>
        </div>
</telerik:RadAjaxPanel>

Then,in order to achieve the above requirement, we used the following properties and we were able to
succesfully fit the grid (width + height) in the page. (Refer attachments, screenshot_3.jpg and refer modified function below)

//-- setting width to the rad grid --
grid.Width = Unit.Percentage(97);
grid.ClientSettings.Scrolling.ScrollHeight = Unit.Percentage(100);//changed from fixed pixel to percentage

But, when we do a sort on the grid column, then the grid spills outside the border. (Please refer screenshot_4.jpg)

Also, if we move the grid scrollbars, then browser scrollbars appear. (Please refer screenshot_5.jpg )

Before applying these two properties (grid.Width and grid.ClientSettings.Scrolling.ScrollHeight),
everything was working fine.

Can anyone please suggest, if we could try something here?
(also the solution should take care of the monitor resolution)

Regards,
CSW Support

-----------------------------------------------

// -- Original function --
  
  
// this function DefineGridAttributes defines the attributes of a dynamically build grid.    
    private void DefineGridAttributes(RadGrid grid)
    {
        // Grid General Setting
        grid.ID = "RadGrid1";
        //-- setting width to the rad grid --
        //grid.Width = Unit.Percentage(97);
        //grid.Height = Unit.Percentage(100);
        //grid.Skin = "Office2007";
        grid.AllowMultiRowSelection = true;
        grid.AutoGenerateColumns = false;
        grid.AllowPaging = true;
        grid.AllowCustomPaging = true;
        grid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
        grid.AllowSorting = true;
        grid.ShowGroupPanel = true;
        grid.ShowFooter = true;
        grid.PageSize = Convert.ToInt32(GeneralCode.sPageSize);
        grid.PagerStyle.Position = GridPagerPosition.Top;
        grid.BorderWidth = Unit.Pixel(1);
        grid.GridLines = GridLines.None;
        // Grid grouping and exporting Setting
        grid.GroupingSettings.ShowUnGroupButton = true;
        grid.ExportSettings.HideStructureColumns = true;
        // Added for Export To Excel
  
        grid.ExportSettings.OpenInNewWindow = true;
        grid.ExportSettings.ExportOnlyData = true;
        grid.ExportSettings.IgnorePaging = true;
        //--------
        grid.ExportSettings.Pdf.PageBottomMargin = Unit.Pixel(Convert.ToInt32(0.25));
        grid.ExportSettings.Pdf.PageFooterMargin = Unit.Pixel(Convert.ToInt32(0.25));
        grid.ExportSettings.Pdf.PageHeaderMargin = Unit.Pixel(Convert.ToInt32(0.25));
        grid.ExportSettings.Pdf.PageLeftMargin = Unit.Pixel(Convert.ToInt32(0.25));
        grid.ExportSettings.Pdf.PageRightMargin = Unit.Pixel(Convert.ToInt32(0.25));
        grid.ExportSettings.Pdf.PageTopMargin = Unit.Pixel(Convert.ToInt32(0.25));
        grid.ExportSettings.Pdf.PaperSize = GridPaperSize.A4;
        grid.ExportSettings.Pdf.FontType = Telerik.Web.Apoc.Render.Pdf.FontType.Subset;
        //grid.ExportSettings.Csv.ColumnDelimiter = GridCsvDelimiter.Semicolon;
        //grid.ExportSettings.Csv.EncloseDataWithQuotes = false;
        grid.ExportSettings.FileName = "CustomReport";
        // Grid client Setting
        if (bAllowedCellReorderResizing())
        {
            grid.ClientSettings.AllowColumnsReorder = true;
            grid.ClientSettings.AllowDragToGroup = true;
            grid.ClientSettings.ReorderColumnsOnClient = true;
            grid.ClientSettings.Resizing.AllowColumnResize = true;
            grid.ClientSettings.Resizing.ResizeGridOnColumnResize = false;
            grid.ClientSettings.Resizing.EnableRealTimeResize = false;
        }
        grid.ClientSettings.Selecting.AllowRowSelect = true;
        grid.ClientSettings.Selecting.EnableDragToSelectRows = true;
        grid.ClientSettings.Scrolling.AllowScroll = true;
        grid.ClientSettings.Scrolling.UseStaticHeaders = true;
        grid.ClientSettings.Scrolling.ScrollHeight = Unit.Pixel(600);
        //grid.ClientSettings.Scrolling.ScrollHeight = Unit.Percentage(97);
        //grid.ClientSettings.Scrolling.ScrollBarWidth = Unit.Percentage(97);
        grid.ClientSettings.EnableAlternatingItems = true;
        grid.ClientSettings.ClientEvents.OnRowContextMenu = "RowContextMenu";
        //grid.ClientSettings.ClientEvents.OnRowSelected = "OnRowSelected";
        grid.ClientSettings.ClientEvents.OnGridCreated = "OnGridCreated";
        // Grid mastertableview Setting        
        grid.MasterTableView.EnableHeaderContextMenu = false;
        grid.MasterTableView.ShowGroupFooter = true;
        grid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;
        grid.MasterTableView.TableLayout = GridTableLayout.Auto;
        grid.MasterTableView.AllowMultiColumnSorting = true;
        grid.MasterTableView.CommandItemSettings.ShowExportToCsvButton = true;
        grid.MasterTableView.CommandItemSettings.ShowExportToExcelButton = true;
        grid.MasterTableView.CommandItemSettings.ShowExportToPdfButton = false;
        grid.MasterTableView.CommandItemSettings.ShowExportToWordButton = true;
        grid.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = false;
        grid.MasterTableView.CommandItemSettings.ShowRefreshButton = false;
        //grid.MasterTableView.Width = Unit.Percentage(97);
        //grid.MasterTableView.Height = Unit.Percentage(100);
    }

--------------------------------

// --- Modified Function ---
  
  
// this function DefineGridAttributes defines the attributes of a dynamically build grid.    
    private void DefineGridAttributes(RadGrid grid)
    {
        // Grid General Setting
        grid.ID = "RadGrid1";
        //-- setting width to the rad grid --
        grid.Width = Unit.Percentage(97);
        //grid.Height = Unit.Percentage(100);
        //grid.Skin = "Office2007";
        grid.AllowMultiRowSelection = true;
        grid.AutoGenerateColumns = false;
        grid.AllowPaging = true;
        grid.AllowCustomPaging = true;
        grid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
        grid.AllowSorting = true;
        grid.ShowGroupPanel = true;
        grid.ShowFooter = true;
        grid.PageSize = Convert.ToInt32(GeneralCode.sPageSize);
        grid.PagerStyle.Position = GridPagerPosition.Top;
        grid.BorderWidth = Unit.Pixel(1);
        grid.GridLines = GridLines.None;
        // Grid grouping and exporting Setting
        grid.GroupingSettings.ShowUnGroupButton = true;
        grid.ExportSettings.HideStructureColumns = true;
        // Added for Export To Excel
  
        grid.ExportSettings.OpenInNewWindow = true;
        grid.ExportSettings.ExportOnlyData = true;
        grid.ExportSettings.IgnorePaging = true;
        //--------
        grid.ExportSettings.Pdf.PageBottomMargin = Unit.Pixel(Convert.ToInt32(0.25));
        grid.ExportSettings.Pdf.PageFooterMargin = Unit.Pixel(Convert.ToInt32(0.25));
        grid.ExportSettings.Pdf.PageHeaderMargin = Unit.Pixel(Convert.ToInt32(0.25));
        grid.ExportSettings.Pdf.PageLeftMargin = Unit.Pixel(Convert.ToInt32(0.25));
        grid.ExportSettings.Pdf.PageRightMargin = Unit.Pixel(Convert.ToInt32(0.25));
        grid.ExportSettings.Pdf.PageTopMargin = Unit.Pixel(Convert.ToInt32(0.25));
        grid.ExportSettings.Pdf.PaperSize = GridPaperSize.A4;
        grid.ExportSettings.Pdf.FontType = Telerik.Web.Apoc.Render.Pdf.FontType.Subset;
        //grid.ExportSettings.Csv.ColumnDelimiter = GridCsvDelimiter.Semicolon;
        //grid.ExportSettings.Csv.EncloseDataWithQuotes = false;
        grid.ExportSettings.FileName = "CustomReport";
        // Grid client Setting
        if (bAllowedCellReorderResizing())
        {
            grid.ClientSettings.AllowColumnsReorder = true;
            grid.ClientSettings.AllowDragToGroup = true;
            grid.ClientSettings.ReorderColumnsOnClient = true;
            grid.ClientSettings.Resizing.AllowColumnResize = true;
            grid.ClientSettings.Resizing.ResizeGridOnColumnResize = false;
            grid.ClientSettings.Resizing.EnableRealTimeResize = false;
        }
        grid.ClientSettings.Selecting.AllowRowSelect = true;
        grid.ClientSettings.Selecting.EnableDragToSelectRows = true;
        grid.ClientSettings.Scrolling.AllowScroll = true;
        grid.ClientSettings.Scrolling.UseStaticHeaders = true;
        //grid.ClientSettings.Scrolling.ScrollHeight = Unit.Pixel(600);
        grid.ClientSettings.Scrolling.ScrollHeight = Unit.Percentage(97);
        //grid.ClientSettings.Scrolling.ScrollBarWidth = Unit.Percentage(97);
        grid.ClientSettings.EnableAlternatingItems = true;
        grid.ClientSettings.ClientEvents.OnRowContextMenu = "RowContextMenu";
        //grid.ClientSettings.ClientEvents.OnRowSelected = "OnRowSelected";
        grid.ClientSettings.ClientEvents.OnGridCreated = "OnGridCreated";
        // Grid mastertableview Setting        
        grid.MasterTableView.EnableHeaderContextMenu = false;
        grid.MasterTableView.ShowGroupFooter = true;
        grid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;
        grid.MasterTableView.TableLayout = GridTableLayout.Auto;
        grid.MasterTableView.AllowMultiColumnSorting = true;
        grid.MasterTableView.CommandItemSettings.ShowExportToCsvButton = true;
        grid.MasterTableView.CommandItemSettings.ShowExportToExcelButton = true;
        grid.MasterTableView.CommandItemSettings.ShowExportToPdfButton = false;
        grid.MasterTableView.CommandItemSettings.ShowExportToWordButton = true;
        grid.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = false;
        grid.MasterTableView.CommandItemSettings.ShowRefreshButton = false;
        //grid.MasterTableView.Width = Unit.Percentage(97);
        //grid.MasterTableView.Height = Unit.Percentage(100);
    }
Pavlina
Telerik team
 answered on 23 Feb 2012
5 answers
129 views
How could I set the focus to this field when the grid goes into InPlace edit mode? I tried
catching it in the ItemCreated event per some samples for EditForms, but I couldn't catch
it. Nothing I tried worked...

<
telerik:GridTemplateColumn
      HeaderText="Awarded"
      SortExpression="Awarded" UniqueName="Awarded" ForceExtractValue="Always"
<ItemTemplate
   <asp:Label runat="server" ID="Awarded" Text='<%# Eval("Awarded", "{0:N0}")%>'></asp:Label>
 </ItemTemplate
 <EditItemTemplate>
   <telerik:RadNumericTextBox ID="AwardedTextBox" runat="server" MaxLength="7" MaxValue="999999" MinValue="0000" Width="90px"
      NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="," Text='<%# Bind("Awarded") %>' />
 </EditItemTemplate>
 <HeaderStyle Width="90px" HorizontalAlign="Center" />
 <ItemStyle HorizontalAlign="Right" />
</
telerik:GridTemplateColumn>
Fred
Top achievements
Rank 1
 answered on 23 Feb 2012
1 answer
44 views
Hi,
I have one question about the new Ganttview control that has been released for WPT and Silverlight 5.
Is there any plans to release this as an asp.net ajax control? and is there any timeplan for that.
Br Sture
Iana Tsolova
Telerik team
 answered on 23 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?