Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
65 views
Hello,

How can I expand a node and all its parents (Not one parent).

Here is my code which only expands a node:
protected void GuideRadTreeView_NodeDataBound(object sender, RadTreeNodeEventArgs e)
        {
            if (e.Node.Text.Equals("Share Tests"))
            {
                e.Node.Expanded = true;
            }
        }

Please, I need your help in order to expand also its all parents until the root node.
It is very appreciated to send me the modified code.

Regards,
Bader
Bader
Top achievements
Rank 1
 answered on 25 Aug 2011
1 answer
175 views
Hi,
I need to style the RadGrid filter popup, this popup shows up when users click on the filter icon in the filter row. e.g. on this url:

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx

click on OrderDate Filter icon, the popup menu shows.

How do I do that?

Thanks
Princy
Top achievements
Rank 2
 answered on 25 Aug 2011
6 answers
976 views

In our application, we need to be able to return to the page with the grid, and have the grid select the row you were on before you left.

The path I have been approaching this issue from was to store the PageNumber, the ItemIndex and the NumberPerPage whenever you select a row, in session. Then the user could leave the page and when they return I could simply look for those values and set the grid accordingly. This almost worked.

The problem was that one of the things they user could do when away from the page was change data that the grid is showing. For example, my grid lists Locations is sorted by the Location's Trading Name.

If they select the first row in the grid ('ACME'), then leave that page and in another part of the site and change the Trading Name of that location to 'Z-Acme', returning the grid, the wrong row will be selected. Furthermore, it will most likely be on the wrong page.

What I need is a concrete way to store some value, and to have the grid find and select the correct row based on that value.Regardless of where that row is now.  No matter what page or item index.

I did this code (hardcoded for now) but this only finds the row if it is in the currently loaded set.
protected void rgLocations_DataBound(object sender, EventArgs e)
        {
            string SBingo = String.Empty;
 
            for(int i = 0; i < rgLocations.Items.Count; i++)
            {
                if (rgLocations.Items[i]["Trading_Name"].Text == "Z-Acme")
                {
                    SBingo = "Found it";
                }
            }
        }

This is not ideal for a couple of reasons.

1. As mentioned above it only searches the records currently returned (which might be just 10 records out of a set of 1000s)

2. The search criteria is based on the Trading Name. As two or more locations 'might' have the same Trading Name in my app, this is far from ideal. I'd like this based on the Primary Key ID of each row. Note: the Primary key is not displayed in the grid. Can the RadGrid store but not display the primary key from each row?

What I'd like is some generic function that takes 2 parameters.
 
SetGrid(ref RadGrid r, int ItemID)

I just pass it the grid I want to set and the item ID of the row I want selected.

This code would need to happen before the grid is bound to the data source I would think. But I'm not sure.

Problem is I can't see how to do this. The RadGrid seems to work in blocks of data that are 'PageSize' in size.

Anyone done something similar? This seems like pretty basic stuff that should be part of the RadGrid. Maybe I'm just missing it.

Brad
















Brad
Top achievements
Rank 1
 answered on 25 Aug 2011
1 answer
102 views
Hi,

When I use Aggregate function in RadGrid, footer display "Sum: xxx" or other titles depending on type of aggregate functions, is there a way to just display aggregate results without the titles?

TIA
Princy
Top achievements
Rank 2
 answered on 25 Aug 2011
2 answers
147 views
Hello,

I'm using RadRotator to display image and its ID from DB:
<telerik:RadRotator ID="thumbRotator" runat="server" RotatorType="Buttons" WrapFrames="false" Width="750px" Height="150px" ItemWidth="150px" ItemHeight="150px" >
      <ItemTemplate>
         <img id="imgAvatar" src='ViewImage.ashx?avatar=<%# Eval("ID") %>&width=150&height=150'
             alt="Avatar Image" style="border: 0px; cursor:pointer;" />
         <label id="label1" runat="server" title='<%# Eval("ID") %>'>
         </label>
      </ItemTemplate>
   <ControlButtons LeftButtonID="img_left" RightButtonID="img_right" />
</telerik:RadRotator>
There is a button on my WebPage which deletes record from DB. I use ajax request of RadAjaxManager:
function confirmCallBackFn(arg) {
   if (arg) {
      var id = HiddenField.Get('ID');
      if (id > 0) {
         var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
         ajaxManager.ajaxRequest('delete:' + id);
      }
   }
}

On Server side I delete record and do 
thumbRotator.DataBind();
So the rotator updates itself.
Everything works fine, except every time when I delete a record, I need to scroll back to the last position.
Imagine hundreds of images, I scroll through them, find one to delete, and then scroll again. A bit annoying.
I tried to set InitialItemIndex, but I've got mess
I tried to addCssClass, and was able to hide image, but it left empty cell in rotator.
So my question is there a way I can remove item from rotator on client side?

Thank you.

Regards,
Sergei
Sergei
Top achievements
Rank 1
 answered on 25 Aug 2011
2 answers
115 views
Hi there,

I have question on setting default file extension for the pop up file explorer (in my attachment).
Is it possible to set a default file extension there?

Thank you.
Andy Taslim
Top achievements
Rank 1
 answered on 25 Aug 2011
2 answers
77 views
My Data Format Look like This : DDate,Year,Value
in LinqDataSource_Selecting base of RadioButton i get a year , 2years or 3 Years Data
and then if selection is 2 or 3 years data then i set DataGroupColumn = "Year"

if for fist time i select 3 years then move to 2 years or this year every thing is fine

if for fist time i select 2 years then move to this year is Ok, But if go to 3 years chart will show just 2 group in chart and legend !!

if for fist time i select this year , and then i go to 2 or 3 years still will show me 1 group in chart and legend

i can see i chart data items every thing works as the it should be but just it is not showing new groups !!

is there anyway i can force chart to Re-group it's self
Ashim
Top achievements
Rank 1
 answered on 24 Aug 2011
2 answers
52 views
Is there anyway to get rid of the whitespace above my appointments in each cell?
Michael Constantine
Top achievements
Rank 1
 answered on 24 Aug 2011
1 answer
110 views
I wrote a page to replace an existing application using another product, so I was constrained in trying to replicate existing functionality.  To whit:  there are 2 updatable columns on a grid: a date and a quantity.  Both update without confirmation on the event triggered when either of them is changed.  Only problem is, I don't know how or where to give the update command so the edit mode closes after an update.

I am executing javascript on both so I could
     $find("<%= RadGrid1.ClientID %>").get_masterTableView().updateItem(editedRow);

where editedRow is set on the edit command but where do I put the command?
Elliott
Top achievements
Rank 2
 answered on 24 Aug 2011
2 answers
69 views
Hi all, 

I'm looking for some help regarding nested tabstrips and multipages/pageviews.

I have the following structure:
default.aspx
   Tabstrip (mainTabStrip) with dynamic tabs using contentURL.  e.g. Account.aspx
        Account.aspx holds another tabstrip (accountTabStrip) loading pages using contentURL  e.g. Stock.aspx, Orders.aspx
              Orders.aspx contains a radgrid with a list of orders. 
              When an order is clicked I want to open a new tab in mainTabStrip as opposed to the fixed tabstrip in Account.aspx (accountTabStrip)

My question is: How do obtain a refrence to mainTabStrip in default.aspx from pageviews below this?

I hope this is clear, but can provide more detailed info if required.

Cheers in advance for any suggestions.

Rich
RichJ
Top achievements
Rank 1
 answered on 24 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?