Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
182 views
Sometimes the Outllok style in the Radgrid(Outlook) are not applied.When i refersh my screen multiple times then the Outlook theme is applied to grid.
Dimo
Telerik team
 answered on 12 May 2010
2 answers
101 views
Hello
I Need to combine a bar chart with a stacked bar, I tried to do it with the code I show you below
In the first series the bars are generated fine, but when I add the stacked bar that are placed next to the first bar and I need the stacked bar to be placed at the fourth position
I also attach a graph to show you what generates the code and what I need
Could you please help me?
Thanks
Best regards
Marcos J. Perez


Here is the code:
                RadChart graExpediente = new RadChart(); 
                graExpediente.ChartTitle.TextBlock.Text = "Expedientes"
                graExpediente.PlotArea.XAxis.AutoScale = false
                graExpediente.PlotArea.XAxis.AddRange(1, 4, 1); 
                graExpediente.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Font = new System.Drawing.Font("Arial", 8, System.Drawing.FontStyle.Regular); 
                graExpediente.PlotArea.XAxis[0].TextBlock.Text = "Asignados"
                graExpediente.PlotArea.XAxis[1].TextBlock.Text = "En Proceso"
                graExpediente.PlotArea.XAxis[2].TextBlock.Text = "A Vencer"
                graExpediente.PlotArea.XAxis[3].TextBlock.Text = "Dependientes"
                graExpediente.PlotArea.XAxis.IsZeroBased = false
                graExpediente.PlotArea.YAxis.AxisMode = ChartYAxisMode.Extended; 
                graExpediente.PlotArea.YAxis.AxisLabel.TextBlock.Text = "Asignados"
                graExpediente.Skin = "Vista"
 
                // Crea la series y las barras para el Supervisor 
                ChartSeries Supervisor = new ChartSeries("Supervisor", ChartSeriesType.Bar); 
                Supervisor.Appearance.TextAppearance.TextProperties.Font = new System.Drawing.Font("Tahoma", 7, System.Drawing.FontStyle.Regular); 
                Supervisor.Appearance.Border.Color = System.Drawing.Color.Black; 
                Supervisor.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.Nothing; 
                // Define las barras en la serie 
                Supervisor.AddItem(50, string.Empty, System.Drawing.Color.Yellow); 
                Supervisor.AddItem(30, string.Empty, System.Drawing.Color.Green); 
                Supervisor.AddItem(20, string.Empty, System.Drawing.Color.Red);                 
 
                // Crea la serie y la seccion para los Dependientes 
                ChartSeries AsignadosDep = new ChartSeries("AsignadosDep", ChartSeriesType.StackedBar); 
                AsignadosDep.Appearance.Border.Color = System.Drawing.Color.Black; 
                AsignadosDep.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.Nothing; 
                // Define la seccion en la serie 
                AsignadosDep.AddItem(11, string.Empty, System.Drawing.Color.Yellow); 
 
                ChartSeries EnProcesoDep = new ChartSeries("EnProcesoDep", ChartSeriesType.StackedBar); 
                EnProcesoDep.Appearance.Border.Color = System.Drawing.Color.Black; 
                EnProcesoDep.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.Nothing;                 
                EnProcesoDep.AddItem(6, string.Empty, System.Drawing.Color.Green); 
 
                ChartSeries AVencerDep = new ChartSeries("AVencerDep", ChartSeriesType.StackedBar); 
                AVencerDep.Appearance.Border.Color = System.Drawing.Color.Black; 
                AVencerDep.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.Nothing; 
                AVencerDep.AddItem(5, string.Empty, System.Drawing.Color.Red); 
 
 
                // Add the series to the chart, chart to page. 
                graExpediente.Series.Add(Supervisor); 
                graExpediente.Series.Add(AsignadosDep); 
                graExpediente.Series.Add(EnProcesoDep); 
                graExpediente.Series.Add(AVencerDep);                 
 
                this.Page.Controls.Add(graExpediente);

Marcos Perez
Top achievements
Rank 1
 answered on 12 May 2010
3 answers
156 views
Hi, I have a radgrid with some columns generated automatically and a linqdatasource as the grid's datasource, I have a problem that the command buttons for update and insert in the edit item do not trigger an item command on the grid, I already debugged it an the debugger doesnt step in to the item command method and neither the datasource inserting method trigger so I guess the button commandname is wrong or is empty, is there any way to set these? thanks!
Radoslav
Telerik team
 answered on 12 May 2010
2 answers
295 views
Hi,

I have a treeview with the multiple select option set to true.  Each parent node has a couple of child nodes as such:

Parent Node 1
  - Child Node 1
  - Child Node 2
  - Child Node 3
Parent Node 2
  - Child Node 1
  - Child Node 2
  - Child Node 3
Parent Node 3
  - Child Node 1
  - Child Node 2
  - Child Node 3

A user can select a parent node, and a child node from another parent.  I have code here that tells you if the node is selected or not.  How do I check if the selected node is a parent node or a child node?

Please can someone advise?

Thanks
Brendan
Brendan Vogt
Top achievements
Rank 1
 answered on 12 May 2010
1 answer
62 views
Hey there,

I'm attempting to use the RadFormDecorator to style some ASP.Net Button and DropDownList controls within the CommandItemTemplate of a RadGrid.  The relevant code looks like this:

<telerik:RadFormDecorator ID="RadFormDecorator1" Skin="Vista" runat="server"/> 
                <telerik:RadGrid ID="SentBox" runat="server" AutoGenerateColumns="False" GridLines="None" 
                    OnItemCommand="SentBox_ItemCommand" ShowGroupPanel="false" AllowFilteringByColumn="false" 
                    PagerStyle-Mode="NextPrevAndNumeric" AllowSorting="true" AllowPaging="true" OnItemDataBound="SentBox_ItemDataBound" 
                    OnNeedDataSource="SentBox_NeedDataSource" OnItemCreated="SentBox_ItemCreated" CssClass="DocSiteGrid" 
                    PageSize="10" ShowStatusBar="true" OnSelectedIndexChanged="SentBox_SelectedIndexChanged"
                    <HeaderStyle CssClass="Normal" Font-Bold="true" /> 
                    <MasterTableView CommandItemDisplay="Top"
                        <CommandItemTemplate> 
                            <table style="width: 100%"
                                <tr> 
                                    <td> 
                                        <asp:DropDownList ID="SentBoxSelect" runat="server" CssClass="Normal" AutoPostBack="true" OnSelectedIndexChanged="SentBoxSelect_SelectedIndexChanged"
                                            <asp:ListItem Text="All" Value="All" /> 
                                            <asp:ListItem Text="None" Value="None" /> 
                                        </asp:DropDownList> 
                                        <asp:Button ID="btnReplySent" runat="server" CssClass="Normal" Text="Reply" /> 
                                        <telerik: 
                                    </td> 
                                    <td style="text-align: right"><asp:Button ID="SentTools" runat="server" CssClass="Normal" Text="Tools & Settings" /></td
                                </tr> 
                            </table> 
                        </CommandItemTemplate> 

Unfortunately, this isn't working as I'd expect at the moment.  Any controls outside of the CommandItemTemplate are skinned appropriately; those within are not.  

Suggestions?

Chris


Christopher Wooten
Top achievements
Rank 1
 answered on 12 May 2010
2 answers
134 views
hi,
I have a problem of validateing entered date in dateinput of RadeDateTimePicker control client side
follwoing script is giving me return value of "" when I enterd wrong date or blank

document.getElementById('ctl00_ContentPlaceHoder1_dtpPrefferedAttendingDateTime').value

for example entered value like sdsafdgfvfs it returns ""
                   leave it blanke it returns ""
                   entered right date like 01/01/2010 bring correct same date

I need script to determine wheather it blank or wrong or correct date

also following script not helping




script type="text/javascript">
        Telerik.Web.UI.RadDateInput.prototype.parseDate = function(value, baseDate) {
        debugger
            if (new Date(value) != "NaN")
                return value;
        }   

any Idea please,
Ihab


Bill Witt
Top achievements
Rank 1
 answered on 12 May 2010
2 answers
110 views
I have a RadGrid with a FormTemplate for editing the grid rows.  In one case the grid is populated with multiple rows and the user clicks the 'Edit' button on the row to invoke the editing form.  In another case the grid is populated by a single row.  In the later case, how can I instruct the grid to automatically open the editing form for the single row record when the grid is initially rendered?
Dan
Top achievements
Rank 2
 answered on 12 May 2010
3 answers
142 views
In my case the Clear(); method throws an ArgumentOutOfRangeException.
.Remove() and RemoveAt() are the same.
What can be the reason?

I use toolbar to programmatically create and remove grouping.

Full code is below.

Thanks in advance


    GridGroupByExpression expr1 = new GridGroupByExpression(RadGrid1.Columns[1]);
RadGrid1.MasterTableView.GroupByExpressions.Add(expr1);
//this is fine.
But 
RadGrid1.MasterTableView.GroupByExpressions.Clear() .RemoveAt() throws the error.

Pavlina
Telerik team
 answered on 12 May 2010
5 answers
716 views
Hello Friends,

I have one page in that i created dynamically bound column and bind it to radgrid.

I need to apply grouping dynamically.

When i try to apply grouping than i got the below error.jpg(attachment) error.

Below is my .aspx code

<radG:RadGrid ID="dgVendorLists" runat="server" AllowSorting="True" AllowPaging="true"
            GroupPanel-Text="Drag and Drop Column Header To Regroup Column. " EnableAJAX="False"
            AllowFilteringByColumn="True" ShowGroupPanel="True" ExportSettings-ExportOnlyData="true"
            ExportSettings-IgnorePaging="true" ExportSettings-OpenInNewWindow="true" ShowFooter="false"
            Skin="Monochrome" BorderStyle="None" MasterTableView-CellPadding="0" EnableAJAXLoadingTemplate="False"
            GridLines="both" ClientSettings-ApplyStylesOnClient="true" Width="100%" PageSize="19" GroupingEnabled="true">
            <PagerStyle Mode="NumericPages" />
            <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="None" GroupLoadMode="Server"
                EnableColumnsViewState="true" TableLayout="Fixed">
                <ExpandCollapseColumn Visible="False">
                    <HeaderStyle Width="19px" />
                </ExpandCollapseColumn>
                <RowIndicatorColumn Visible="False">
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <Columns>
                </Columns>
            </MasterTableView>
            <ClientSettings EnableClientKeyValues="True" ReorderColumnsOnClient="True" AllowColumnsReorder="True"
                AllowGroupExpandCollapse="True" AllowDragToGroup="True">
                <Resizing AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="False" />
                <Selecting AllowRowSelect="true" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" ScrollHeight="405px">
                </Scrolling>
            </ClientSettings>
            <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
        </radG:RadGrid>



Below is my .vb code.

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
        CreateTempUserTable()
         End If
    End Sub
    Private Sub CreateTempUserTable()
        ViewState("dtUser") = Nothing
        Dim dt As New DataTable
        dt.Columns.Add("name")
        dt.Columns.Add("Companyid")
        Dim dr As DataRow
        Dim i As Integer
        For i = 0 To 10
            dr = dt.NewRow()
            dr("name") = "Test" & i
            If i = 0 Or i = 2 Or i = 4 Or i = 8 Then
                dr("Companyid") = "10"
            Else
                dr("Companyid") = "20"
            End If
            dt.Rows.Add(dr)
        Next

        Dim boundName As New GridBoundColumn
        boundName.AllowFiltering = True
        boundName.DataField = "name"
        boundName.HeaderText = "name"
        boundName.HeaderText = "name"
        boundName.GroupByExpression = "name"
        boundName.Groupable = True

        dgVendorLists.MasterTableView.Columns.Add(boundName)
        Dim boundCompanyId As New GridBoundColumn

        boundCompanyId.AllowFiltering = True
        boundCompanyId.DataField = "Companyid"
        boundCompanyId.HeaderText = "Companyid"
        boundCompanyId.UniqueName = "Companyid"
        boundCompanyId.SortExpression = "Companyid"
        boundCompanyId.Display = True
        boundCompanyId.Groupable = True
        boundCompanyId.GroupByExpression = "Companyid"
        dgVendorLists.MasterTableView.Columns.Add(boundCompanyId)
        dgVendorLists.DataSource = dt
        dgVendorLists.DataBind()
        ViewState("dt") = dt
    End Sub
    Protected Sub dgVendorLists_NeedDataSource(ByVal source As Object, ByVal e As Telerik.WebControls.GridNeedDataSourceEventArgs) Handles dgVendorLists.NeedDataSource
       Me.dgVendorLists.DataSource = ViewState("dt")
    End Sub
 
    Protected Sub dgVendorLists_Grouping(ByVal source As Object, ByVal e As Telerik.WebControls.GridGroupsChangingEventArgs) Handles dgVendorLists.GroupsChanging
        Dim expression As GridGroupByExpression = New GridGroupByExpression
        Dim gridGroupByField As GridGroupByField = New GridGroupByField
        gridGroupByField = New GridGroupByField
        gridGroupByField.FieldName = "Companyid"
        expression.GroupByFields.Add(gridGroupByField)
        dgVendorLists.MasterTableView.GroupByExpressions.Add(expression)
        dgVendorLists.Rebind()
    End Sub

Please help me where i am wrong and how to implement grouping dynamically with dynamic column.


Thanks & Regards
Jignesh Patel

Pavlina
Telerik team
 answered on 12 May 2010
1 answer
134 views
How to open multiple radwindows based on one definition of one radwindow?

If I open multiple radwindows in different position, how can I retrieve their current positions?

Thanks
Georgi Tunev
Telerik team
 answered on 12 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?