Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
123 views
I have a form where the user should be able to edit a range of Textboxes

It looks something like this:

Number   Name   Amount
123          Test      [TEXTBOX]
125          Test2    [TEXTBOX]
127          Test3    [TEXTBOX]

[Save input Button]

The Number and Name columns are simply clear text, however the Amount column should be an editable textbox.
It this possible with the RadGrid or ?

Do you maybe have an example of how this could be implemented ?

Lenny_shp
Top achievements
Rank 2
 answered on 02 Dec 2008
7 answers
351 views
In order for performance to be good I have no choice but to handle paging myself such that the recordset returns only the records to be displayed - am I correct?

I would have thought that when this line executed...

RadGrid1.DataSource = ds.Tables[0].DefaultView;

That, if paging was enabled, it would only actually bind the records to be displayed. But that line is taking about 40 seconds to execute so obviously the grid binds all of the data and then only displays 10 (or whatever is specified).

I've tried all of the performance tricks I could find but can't speed it up. I would prefer not to have to handle the paging myself because then I have to handle the sorting, grouping myself which kind of defeats the purpose of using a grid.


Craig Smith
Top achievements
Rank 1
 answered on 02 Dec 2008
2 answers
180 views
Hello,

I'm trying to fill nodes on server on "On demand" mode. It works fine when my node has no children. But if it has children - they will be duplicated.

Scenario: TreeView has node "Root" and child "Node1". I click on "+" near "Root". Server gets event. The event adds nothing. TreeView expands with 1 child. This works fine until postback. After postback "Root" has 2 children "Node1"!

It looks like a bug or I'm doing somthing wrong.

I wrote small function to remove duplicates each time on load but maybe there is a better way for me to prevent duplicate appearing? I'll appreciate any idea on this.

Thanks,
Eugene
Paul
Top achievements
Rank 1
 answered on 02 Dec 2008
2 answers
201 views
Hello,

I was wondering if this feature exists for the ComboBox; for the list of ComboBox items, I was wondering if it was possible to be able to type items into the list, and have those items selected.  For instance, if the combo is a list of states, and I start typing A, it would select the first A, but as I type RK, it would select Arkansas, not jump down to Kentucky (which is the default functionality because typing the letter evaluates only the first letter).

Does that exist?

Thanks.
Brian Mains
Top achievements
Rank 1
 answered on 02 Dec 2008
2 answers
129 views
I was wondering if there was a way to only return fully Selected checkboxes in a TriStateCheckbox Tree...

For example, in your demo Tree at http://demos.telerik.com/ASPNET/Prometheus/TreeView/Examples/Functionality/CheckBoxes/DefaultCS.aspx , simply selecting the "Arts" node will return "Books" and "Books/Arts" as selected...

Is there a way that treeview.CheckedNodes can only return "Books/Arts" ?

Thanks.

Guillaume
Top achievements
Rank 1
 answered on 02 Dec 2008
1 answer
144 views
We are planing to integrate the Rad Editor [ Telerik RADControls for ASP.NET 2007 Q4 Release] tool, into our application, for some html formatting and to exporting it into the Office-2007 Document.
[The export utility is done by us already].

While integrating the editor to our application, we are facing  some problems like:

  • When we use the Paste From Word feature, there we see some Special Character comes out in the final output to our Document. Technically, we have seen that the HTML is not appropriate. I have used the stripp word formatting feature as well, but is of no use. [FYI: We are pasting the contents from the Word-2007 Doc to the editor.]
  • When we use 'Insert Table' feature, within the editor, we are not been able to retain the border as an output to our Document.
  • The HTML formatting at various places, got disturbed like we lost bullets at many places.[This could be because of the same reason, the special character issue.]
  • When some one manually inserts some text and formate them within the editor, with the given features, the final outcome in the Document comes as of containg those Special Characters there as well.

    One of the example of special character sequence is.
     Â Ã‚ Ã‚ Ã‚ Ã‚ Ã‚ Ã‚
     will provide timely access.....

Also on the different context, I am curious if the Rad Editor or any telerik component provided the functionality of exporting the editor's HTML to any document [word-2003 or word -2007, openoffice or any other one].
That means whatever design I will be performing on the editor should reflect into Document as it is, means with the proper formatting and coloring.

Looking for the great relations ahead, with you guys.

Many Thanks
Amit Kothari
Rumen
Telerik team
 answered on 02 Dec 2008
2 answers
215 views
I am attempting to use a toolbar to hide and show columns client side depending upon the desire of the user. However, when I use the .set_visible(true/false), only the column header is hidden/shown. When I use masterTable.showColumn(idx), nothing changes. I'm pretty sure I might be doing something wrong, but I'm not sure what.

Here's the definition of the toolbar:
<telerik:RadToolBar ID="MainToolBar" runat="server" Skin="Vista" AutoPostBack="true" 
    OnClientButtonClicked="ToolbarButtonClicked">  
    <ExpandAnimation Type="OutQuad" Duration="300" /> 
    <CollapseAnimation Type="OutQuad" Duration="300" /> 
    <Items> 
        <telerik:RadToolBarButton runat="server" Text="Bulk Edit" PostBack="false" ToolTip="Allows you to make sweeping changes to multiple cost centers" 
            OnLoad="CheckForPortalAdmin" /> 
        <telerik:RadToolBarButton runat="server" Text="Bulk Approve" PostBack="false" ToolTip="Allows you to approve multiple cost centers at a time." 
            OnLoad="CheckForPortalAdmin" /> 
        <telerik:RadToolBarButton IsSeparator="true" OnLoad="CheckForPortalAdmin" /> 
        <telerik:RadToolBarButton Checked="false" Text="Previous Budget" CheckOnClick="true" 
            AllowSelfUnCheck="true" PostBack="false" CheckedImageUrl="Images/columnremoveicon.gif" 
            Group="PBDG" ImageUrl="Images/columnicon.gif" /> 
        <telerik:RadToolBarButton Checked="false" Text="Previous Actual" CheckOnClick="true" 
            AllowSelfUnCheck="true" PostBack="false" CheckedImageUrl="Images/columnremoveicon.gif" 
            Group="PACT" ImageUrl="Images/columnicon.gif" /> 
        <telerik:RadToolBarButton Checked="true" Text="Year To Date" CheckOnClick="true" 
            AllowSelfUnCheck="true" PostBack="false" CheckedImageUrl="Images/columnremoveicon.gif" 
            Group="YTD" ImageUrl="Images/columnicon.gif" /> 
        <telerik:RadToolBarButton IsSeparator="true" /> 
        <telerik:RadToolBarButton runat="server" Text="Export" ImageUrl="~/Images/export.gif" 
            CommandName="Export">  
        </telerik:RadToolBarButton> 
    </Items> 
</telerik:RadToolBar> 

Here's the definition of the grid:
<telerik:RadGrid ID="CurrentCostCentersGrid" runat="server" Skin="Vista" AllowMultiRowSelection="True" 
    AllowMultiRowEdit="True" AllowFilteringByColumn="false" ShowGroupPanel="True" 
    AllowPaging="True" DataSourceID="DataSourceUnits" GridLines="Horizontal" AutoGenerateColumns="False" 
    PageSize="50" ShowFooter="true" Width="100%">  
    <ClientSettings AllowDragToGroup="true" AllowGroupExpandCollapse="true" AllowColumnsReorder="false" 
        AllowExpandCollapse="true" AllowColumnHide="true">  
        <Selecting AllowRowSelect="true" /> 
        <ClientEvents OnRowSelected="CostCenterSelected" OnRowDeselected="CostCenterUnselected" 
            OnRowSelecting="checkValidRowTarget" OnRowDeselecting="checkValidRowTarget" /> 
    </ClientSettings> 
    <GroupPanel Enabled="true" Text="Groups">  
    </GroupPanel> 
    <PagerStyle Mode="NextPrevAndNumeric" NextPageText="Next" PrevPageText="Previous" /> 
    <MasterTableView ShowGroupFooter="true" ShowFooter="true" DataSourceID="DataSourceUnits" 
        DataKeyNames="CostCenterItemID" CommandItemDisplay="None" ClientDataKeyNames="CostCenterItemID">  
        <RowIndicatorColumn> 
            <HeaderStyle Width="20px"></HeaderStyle> 
        </RowIndicatorColumn> 
        <ExpandCollapseColumn Visible="False" UniqueName="ExpandColumn">  
            <HeaderStyle Width="20px"></HeaderStyle> 
        </ExpandCollapseColumn> 
        <Columns> 
            <telerik:GridTemplateColumn UniqueName="StatusIcon" Groupable="false" DataField="StatusName">  
                <ItemTemplate> 
                    <asp:Image ID="StatusIcon" runat="server" ImageUrl='<%# "./images/statusicons/" + Eval("StatusName") + ".png" %>' 
                        AlternateText='<%#Eval("StatusName") %>' /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridBoundColumn UniqueName="Status" Groupable="false" Display="false" DataField="StatusName" /> 
            <telerik:GridClientSelectColumn UniqueName="ClientSideSelect">  
                <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" /> 
            </telerik:GridClientSelectColumn> 
            <telerik:GridBoundColumn HeaderText="Fund" DataField="FundID" AllowFiltering="true" 
                DataType="System.Int32" SortExpression="FundID" ReadOnly="True" UniqueName="FundID">  
                <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" Wrap="false" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn HeaderText="Unit" DataField="UnitID" AllowFiltering="true" 
                DataType="System.Int32" SortExpression="UnitID" ReadOnly="True" UniqueName="UnitID">  
                <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" Wrap="false" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn HeaderText="Object" DataField="LineItemID" AllowFiltering="true" 
                DataType="System.Int32" SortExpression="LineItemID" ReadOnly="True" UniqueName="LineItemID">  
                <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" Wrap="false" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn HeaderText="Description" DataField="LineItemName" SortExpression="LineItemName" 
                UniqueName="Description" ReadOnly="true" Groupable="false">  
                <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" Wrap="true" Width="150px" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn HeaderText="Prev Budget" DataField="PreviousBudget" AllowFiltering="true" 
                DataType="System.Decimal" SortExpression="PreviousBudget" UniqueName="PreviousBudget" 
                DataFormatString="{0:C}" ReadOnly="True" Aggregate="Sum" FooterAggregateFormatString="{0:C}" 
                Groupable="false">  
                <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" Width="100px" /> 
                <FooterStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn HeaderText="Prev Actual" DataField="PreviousActual" DataType="System.Decimal" 
                SortExpression="PreviousActual" UniqueName="PreviousActual" DataFormatString="{0:C}" 
                Groupable="false" Aggregate="Sum" FooterAggregateFormatString="{0:C}">  
                <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" Width="100px" /> 
                <FooterStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn HeaderText="Current Budget" DataField="CurrentBudget" DataType="System.Decimal" 
                SortExpression="CurrentBudget" UniqueName="CurrentBudget" DataFormatString="{0:C}" 
                Groupable="false" Aggregate="Sum" FooterAggregateFormatString="{0:C}">  
                <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" Width="100px" /> 
                <FooterStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn HeaderText="YTD" DataField="CurrentYTD" DataType="System.Decimal" 
                SortExpression="CurrentYTD" UniqueName="CurrentYTD" DataFormatString="{0:C}" 
                Groupable="false" Aggregate="Sum" FooterAggregateFormatString="{0:C}">  
                <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" Width="100px" /> 
                <FooterStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn HeaderText="Proposed" DataField="ProposedBudget" DataType="System.Decimal" 
                SortExpression="ProposedBudget" UniqueName="ProposedBudget" Groupable="false" 
                Aggregate="Sum" FooterAggregateFormatString="{0:C}" DataFormatString="{0:C}">  
                <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" Width="100px" /> 
                <FooterStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="Category" EmptyDataText="&amp;nbsp;" HeaderText="Category" 
                SortExpression="Category" UniqueName="Category">  
                <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" Wrap="false" Width="115px" 
                    Font-Size="10px" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridTemplateColumn HeaderText="Modified" DataField="ModifyDate" UniqueName="Modified" 
                Groupable="false">  
                <ItemTemplate> 
                    <strong> 
                        <%#Eval("ModifyBy")%></strong><br /> 
                    <%#Eval("ModifyDate")%> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
        </Columns> 
        <DetailTables> 
            <telerik:GridTableView DataSourceID="DataSourceHistory" AutoGenerateColumns="false" 
                ShowHeader="false" GroupsDefaultExpanded="false" NoDetailRecordsText="No notes currently exist for this item" 
                Width="100%" CommandItemDisplay="Top" Frame="Void" Name="RequestHistory">  
                <CommandItemTemplate> 
                    <telerik:RadToolBar ID="DetailsToolbar" runat="server" Skin="Vista" Width="100%" 
                        AutoPostBack="true" OnClientLoad="SetNestedToolbar">  
                        <ExpandAnimation Type="OutQuad" Duration="150" /> 
                        <CollapseAnimation Type="InQuad" Duration="150" /> 
                        <Items> 
                            <telerik:RadToolBarButton Text="Make Request" CommandName="MakeRequest" ImageUrl="Images/request.gif">  
                            </telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton IsSeparator="true">  
                            </telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton Text="Approval" CommandArgument="Approval">  
                            </telerik:RadToolBarButton> 
                        </Items> 
                    </telerik:RadToolBar> 
                </CommandItemTemplate> 
                <ParentTableRelation> 
                    <telerik:GridRelationFields MasterKeyField="CostCenterItemID" DetailKeyField="ItemID" /> 
                </ParentTableRelation> 
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
                <Columns> 
                    <telerik:GridTemplateColumn> 
                        <ItemTemplate> 
                            <strong> 
                                <%#Eval("CreateDate","{0:d}") %>&nbsp;<%#Eval("CreateDate","{0:t}") %>&nbsp;-&nbsp;<%#Eval("UserName")%>:</strong>&nbsp;<br /> 
                            <br /> 
                            <%#Eval("NoteText")%><br /> 
                            <br /> 
                            <strong style="color: Red">Amount Requested:</strong>&nbsp;  
                            <%#Eval("RequestedBudget", "{0:C}")%><hr /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                </Columns> 
            </telerik:GridTableView> 
        </DetailTables> 
        <PagerStyle Mode="NextPrevAndNumeric" /> 
    </MasterTableView> 
</telerik:RadGrid> 

Finally, the javascript:
    function ToolbarButtonClicked(sender, args)  
    {  
        // Used to handle the bulk approve button.  
        var clickedButton = args.get_item();  
        if(clickedButton.get_text() == "Bulk Approve"// Make sure the button is the approval button  
        {  
            var items = "";  
            for (idx=0;idx<currentCostCenters.length;idx++) // loop through the items in the array and build a string  
            {  
                if (items.length > 0)  
                {  
                    items = items + ";" 
                }  
                items = items + currentCostCenters[idx];  
            }  
            window.radopen("BulkApproveItems.aspx?keys=" + items,"BulkApprove");  
            return false;  
        }  
        if(clickedButton.get_text() == "Bulk Edit"// Make sure the button is the edit button  
        {  
            var items = "";  
            for (idx=0;idx<currentCostCenters.length;idx++) // loop through the items in the array and build a string  
            {  
                if (items.length > 0)  
                {  
                    items = items + ";" 
                }  
                items = items + currentCostCenters[idx];  
            }  
            window.radopen("BulkEditItems.aspx?keys=" + items,"BulkEdit");  
            return false;  
        }  
        if(clickedButton.get_text() == "Previous Budget")  
        {  
            ShowHideColumn('PreviousBudget');  
        }  
        if(clickedButton.get_text() == "Previous Actual")  
        {  
            ShowHideColumn('PreviousActual');  
        }  
        if(clickedButton.get_text() == "Year To Date")  
        {  
            ShowHideColumn('CurrentYTD');  
        }  
    }  
      
    function ShowHideColumn(uniqueName)  
    {  
        var masterTable = $find('<%= CurrentCostCentersGrid.ClientID %>').get_masterTableView();  
        var columns = masterTable.get_columns();  
        for(idx=0;idx<columns.length;idx++)  
        {  
            var column = columns[idx];  
            if(column.get_uniqueName() == uniqueName)  
            {  
                if (column.get_visible() == true)  
                {  
                    masterTable.showColumn(idx);  
                    break;  
                }  
                else 
                {  
                    masterTable.hideColumn(idx);  
                    break;  
                }  
            }  
        }  
          
    }  
 

Thanks for any insight or better ways of handling this!
Chris
Top achievements
Rank 1
 answered on 02 Dec 2008
1 answer
132 views
Hey Guys

I would really appreciate your help as this is the first time I am using the charting controls. I have a screenshot attached here.

http://michael.dimoudis.s3.amazonaws.com/telerik-chart-help.gif

Basically on the left is the excel chart. On the right is what I so far managed to achieve, however I need help with the labels of the RadChart.

The DataSource is a list. Here it is...

public class MeanResults
{
        public int QuestionId { get; set; }
        public string Quadrant { get; set; }
        public string StatementType { get; set; }
        public double OrganisationalDelivery { get; set; }
        public double PersonalNeeds { get; set; }
}

Here is the aspx page code
<telerik:RadChart ID="RadChart1" runat="server" Skin="LightBlue" Width="900px" Height="700px" SeriesOrientation="Horizontal">
            <Series>
                <telerik:ChartSeries DataYColumn="OrganisationalDelivery" Name="Organisational Delivery">
                </telerik:ChartSeries>
                <telerik:ChartSeries DataYColumn="PersonalNeeds" Name="Personal Needs">
                </telerik:ChartSeries>
            </Series>
        </telerik:RadChart>

I basically do a RadChart1.DataSource = List<MeanResults>(the date...); RadChart1.DataBind().

Basically instead of the numbers 1-24 on the left, I need the StatementType label (only once per double bar). I also need the bottom scale to ALWAYS display 0 -10 instead of 0 - the last value of the OrganisationalDelivery or PersonalNeeds value.

Thanks in advance.

If someone is board and can help me go one step further and acheive this, I would be very grateful.
http://michael.dimoudis.s3.amazonaws.com/telerik-chart-help2.gif

Thanks, Michael










Vladimir Milev
Telerik team
 answered on 02 Dec 2008
3 answers
127 views
I put the Prometheus Editor into a production environment today quite confident that the switch from our previous $40 off-the-shelf HTML editor would have our users wowed. Instead, several pointed out some basic ommissions which, at first, i could not believe were not part of Editor (i equally could not believe i had not noticed this up until now).

Our $40 editor included the ability to edit a cell and adjust the padding (left, right, top , bottom) and borders (width, size and which sides). These were fundamental to maintaining attractive content for our users.

Please someone, tell me i'm missing something here or that this vital functionality is just around the corner!

cheers,
rob
Stanimir
Telerik team
 answered on 02 Dec 2008
1 answer
122 views
I have a combobox defined on my .aspx page as follows:

<radC:RadComboBox ID="ddlCustomers" runat="server" Height="300px" EnableLoadOnDemand="true"

HighlightTemplatedItems="true" Skin="WindowsXP" Width="300px" AutoPostBack="true" />


I load the combobox in the ItemRequested event as follows:
With ddlCustomers

 

 

'-- 1) Clear any items that already exist --

 

 

.Items.Clear()

 

 

'-- 2) Set the fields, get the dataset and bind the results --

 

 

.DataTextField = strTextField

 

.DataValueField = strValueField

.DataSource = GetDataTable(chkActiveOnly.checked)

.DataBind()

 

End With

 

 

I have a checkbox on the page that is autopostback and ajaxifies as follows:

 

<asp:CheckBox ID="chkActiveOnly" runat="server" Text="Active Customers Only" AutoPostBack="true" />

 

 

<radA:RadAjaxManager ID="ramManageCustomers" runat="server">

<AjaxSettings>

<radA:AjaxSetting AjaxControlID="chkActiveOnly">

<UpdatedControls>

<radA:AjaxUpdatedControl ControlID="chkActiveOnly" />

<radA:AjaxUpdatedControl ControlID="ddlCustomers" />

</UpdatedControls>

</radA:AjaxSetting>

</AjaxSettings>

</radA:RadAjaxManager>

 

Here is the checkchanged event for my checkbox:

 

Protected

Sub chkActiveOnly_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles chkActiveOnly.CheckedChanged

 

Response.Cookies.Add(

New HttpCookie("ShowInactive", Not chkActiveOnly.Checked))

 

ddlCustomers.Items.Clear()

 

End Sub

 

 

When I navigate to the page, the stored procedure in the ItemRequested event pulls only records that are marked active in the DB.  If I click the checkbox to uncheck it (meaning I want to populate the combobox with all values and not just those that are marked active in the DB), the combobox fills all values just fine.  However, if I try to filter the combobox by entering a "t" in the textbox area of the combobox so that it only shows records in the combobox that start with a "t", the list reverts back to the original stored procedure used (which filters out inactive records).  I am assuming this is a problem with how the radcombobox ajaxifies, but if you have a work around, that would really help.

Simon
Telerik team
 answered on 02 Dec 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?