Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
124 views
HI
I have a RadTreeView inside RadAjaxPanel, I also have a textbox and button inside AjaxPanel, when the user clicks the button, Server side method executes and find appropriate node according to the text in textbox and select the first item.I want to scroll to selected node and I use ScrollIntoView with the following format:

<script type="text/javascript">
function OnResponseEnd(sender, arguments)
{
      var treeviewInstance = <%=RadTreeView1.ClientID %>;
      var selectedNode = treeviewInstance.SelectedNode;
       if (selectedNode != null)
       { 
          selectedNode.ScrollIntoView();
       }
}
</script>

<radA:RadAjaxPanel
    ID="RadAjaxPanel1"
    runat="server"
    ClientEvents-OnResponseEnd="OnResponseEnd">
</radA:RadAjaxPanel>

But it doesn't work and it can not find treeviewInstance.SelectedNode. What should I do?

Thanks In Advance
Simon
Telerik team
 answered on 10 Jan 2011
1 answer
124 views
Hi all,

I have bind listbox as the following at RadAjaxManager1_AjaxRequest event.

ListBox1.DataTextField = "Desc"
ListBox1.DataValueField = "ID"
ListBox1.DataSource = dt
ListBox1.DataBind()
Data didn't show out in ListBox1.

But when I look at Watch window like this   ListBox1.Items.count it shows me 5 , when I look detail  ListBox1.Items(0).text it shows "AAA".
So this mean data are already in Listbox, but just not show.

Please advise how I can show these data?
Here is my Listbox sourcecode
<telerik:RadListBox ID="ListBox1" runat="server" CheckBoxes="True"
            Skin="Default" Height="300px" >
        </telerik:RadListBox>

Please Help...

Thanks and best regard.
Simon
Telerik team
 answered on 10 Jan 2011
1 answer
496 views
Hello, 

I have a small question, about the SortExpression in a GridTemplateColumn.
In fact, I have a SQL table [Action] and a table [PlanActionNiveauDeRealisation]. Like this an [Action] can have a lot of [PlanActionNiveauDeRealisation].

So, I put a RadGrid with all my [Actions] and in the last columns I put this : 
<telerik:GridTemplateColumn UniqueName="LastNiveau" HeaderText="Niveau de réalisation" >
                        <ItemTemplate>
                            <telerik:RadRating ID="ratingBar" runat="server" Orientation="Horizontal" ItemHeight="61px"
                                ItemWidth="11px" CssClass="ratingClass" OnRate="ratingBar_Rate" AutoPostBack="true">
                                <Items>
                                    <telerik:RadRatingItem Value="0" HoveredImageUrl="/images/Rating/Rating1/2h.png" HoveredSelectedImageUrl="/images/Rating/Rating1/2h.png"
                                        SelectedImageUrl="/images/Rating/Rating1/2s.png" ImageUrl="/images/Rating/Rating1/2.png" ToolTip="0 %" />
                                    <telerik:RadRatingItem Value="25" HoveredImageUrl="/images/Rating/Rating1/3h.png" HoveredSelectedImageUrl="/images/Rating/Rating1/3h.png"
                                        SelectedImageUrl="/images/Rating/Rating1/3s.png" ImageUrl="/images/Rating/Rating1/3.png" ToolTip="25 %" />
                                    <telerik:RadRatingItem Value="50" HoveredImageUrl="/images/Rating/Rating1/4h.png" HoveredSelectedImageUrl="/images/Rating/Rating1/4h.png"
                                        SelectedImageUrl="/images/Rating/Rating1/4s.png" ImageUrl="/images/Rating/Rating1/4.png" ToolTip="50 %" />
                                    <telerik:RadRatingItem Value="75" HoveredImageUrl="/images/Rating/Rating1/5h.png" HoveredSelectedImageUrl="/images/Rating/Rating1/5h.png"
                                        SelectedImageUrl="/images/Rating/Rating1/5s.png" ImageUrl="/images/Rating/Rating1/5.png" ToolTip="75 %" />
                                    <telerik:RadRatingItem Value="100" HoveredImageUrl="/images/Rating/Rating1/6h.png" HoveredSelectedImageUrl="/images/Rating/Rating1/6h.png"
                                        SelectedImageUrl="/images/Rating/Rating1/6s.png" ImageUrl="/images/Rating/Rating1/6.png" ToolTip="100 %" />
                                </Items>
                            </telerik:RadRating>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>

In the ItemDataBound, I put : 
protected void RGPlanAction_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
            {
                var maxLength = 50;
                var dataItem = e.Item as GridDataItem;
                var myPlanAction = (Model.PlanAction)e.Item.DataItem;
 
                var myRadRating = (RadRating) dataItem["LastNiveau"].FindControl("ratingBar");
                myRadRating.Attributes.Add("IdPlanAction", myPlanAction.IdPlanAction.ToString());
                myRadRating.Attributes.Add("IndexRadGrid", e.Item.ItemIndex.ToString());
                var ndr = myPlanAction.PlanActionNiveauDeRealisation.LastOrDefault();
                if(ndr != null)
                {
                    myRadRating.Value = ndr.NiveauDeRealisation;   
                }
                else
                {
                    myRadRating.Value = 0;  
                }
            }
        }

Like this, it's perfect, I have a nice RadGrid with the last [PlanActionNiveauDeRealisation] of each [action].

Just, I would like to make some sorting with this last column : [lastNiveau], but i dunno what to put in the SortExpression...

Do you have any idea?


Thank you



Maria Ilieva
Telerik team
 answered on 10 Jan 2011
5 answers
204 views
Hi,

I am using version 2009.2.826.35 and I am unable to update to the latest version at the moment. There is a bug in this version when the RadComboBox gets placed in a user control and it is set for Load On Demand.  Even though the RadComboBox has the AutoPostback set to true, the postback does NOT occur when the user highlights the text in the RadComboBox and clicks delete or backspace.

I have access to a later dll (2010.1.519.35) and I verified that this bug was fixed in this version. However, as I mentioned before, at the moment we don't want to update to the latest dll. Are there any other work arounds that can fix this bug?

Here is a link to a demo project that shows the bug (link expires on Jan 16 2011): Sample Project
Thanks,
Oran
Simon
Telerik team
 answered on 10 Jan 2011
1 answer
249 views
Hi, I have a simple page with RadGrid above two RadListBox controls that are supposed to be populated with different items based on which item is selected in the grid.

No matter what techniques I try, RadListBox controls appear to be empty on the page.  I am currently trying to use simple method shown here:

http://www.telerik.com/help/aspnet-ajax/listbox-working-with-items-server-side.html

Basically manually adding an object of type RadListBoxItem directly to the RadListBox in question, but the box remains empty on the page, any tips?  Maybe grid is throwing it off in some way?  How do I refresh it?
Simon
Telerik team
 answered on 10 Jan 2011
1 answer
281 views
I have a Radgrid with checkbox template column for puropse of select all rows functionality. but right now whenever i hover through the header checkbox im getting the drag and drop cursor for drag & drop but i want thearrow cursor for that.
Any help is appreciated.

Regards,
Krishnan
Cognizant
Chennai
Shinu
Top achievements
Rank 2
 answered on 10 Jan 2011
1 answer
152 views
Hi,
  I am displaying RadCalendar in my App., In that i need to display the holidays on the date. like dec 25th x-mas... For that i have stored procedure having all the holidays for the year.. how can i diplay on the date....how can we do that?
Maria Ilieva
Telerik team
 answered on 10 Jan 2011
1 answer
132 views
Hello,

Does Telerik have anything like Dart's LiveControls for ASP.NET (http://www.dart.com/pwlc_overview.aspx)? I'm new to Telerik and am currently working on a big project which will require a good deal of client to server  interaction. Looks like the best solution other than potentially LiveControls is to write JavaScript in order to avoid postback caused screen flickering. Any suggestions for this issue or getting to know Telerik?

Thanks

Geoffrey
Sebastian
Telerik team
 answered on 10 Jan 2011
3 answers
355 views
I have a radlistbox
I can add to the list box
I can remove from the list box
What I cant for the life of me work out how to do is how to edit an entry in radlistbox in place.

I want to be able to change and save the text of a radlistbox item (preferably with AJAX)...

If anyone can point me to an example, pointer or guide as how to get started with this would be great.

Thanks....
Shinu
Top achievements
Rank 2
 answered on 10 Jan 2011
2 answers
123 views
Hi All,

I've been trying to figure this out for a while and not having much luck hence this posting.

I have a grid that has a subgrid for each row using detailtables, both levels are editable.  Because I have checkboxes in the admin form of each level I need to setup the value of any new rows in the InitInsert event and all of this works nicely.  

I have two issues now.  The fist issue is that I need to conditionally hide the checkbox (and potentially other fields) in the child level depending on a value in the parent level.  The second issue is that I want to have a checkbox present on the form which when ticked and the record is saved a new insert form opens up - thus saving the user from clicking a on the new item icon again.

Re the first issue I have the following in the ItemCommand event for the grid,

...
ElseIf e.CommandName = "InitInsertElement" Then
    e.Canceled = True
    Dim newValues As System.Collections.Specialized.ListDictionary = New System.Collections.Specialized.ListDictionary()
    newValues("IncludeInTotal") = True
    'IF THE CostType CELL IN THE PARENT ROW = UnitCost THEN HIDE THE uxIncludeInTotal CHECKBOX ON THIS INSERT FORM
 
    DirectCast(e.Item, Telerik.Web.UI.GridDataItem).ChildItem.NestedTableViews(0).InsertItem(newValues)
ElseIf .....

Re the second issue I have tried the following code to trigger the insert form to reopen but although the itemcommand is triggered the insert form does not load.  

If CType(editedItem.FindControl("uxAddNewAfterSave"), CheckBox).Checked Then
    Dim parentItem = CType(e.Item.OwnerTableView.ParentItem, Telerik.Web.UI.GridDataItem)
    parentItem.FireCommandEvent("InitInsertElement", String.Empty)
End If

Any help please?

Regards,

Jon
Jon
Top achievements
Rank 1
 answered on 10 Jan 2011
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?