Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
170 views
Using RadPanelBar 2008.3.1125.35

Problem: Background image from SelectedCssClass does not work IF CssClass specifies background image as well. If CssClass does not specify background image - then everything works fine.


I want selected group in RadPanelBar to have different background image (compare to non-selected group). I created following CSS classes and assigned them to SelectedCssClass and CssClass properties.

And it does not work. SelectedCssClass ALWAYS shows background image of the CssClass. If I comment out background definition in the CssClass then I do see new background image - so it looks like a bug in the javascript code that applies SelectedCssClass style.

Any suggestions on how to work around this?

Thank you

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

.rootItemSelected
{
    background: url('/styles/rad/PanelBar/HeaderBg-selected.gif') repeat-x;
}

.rootItem
{
    background: url('/styles/rad/PanelBar/HeaderBg.gif') repeat-x;
}

---------

<Items>
                <telerik:RadPanelItem Text="Group1" Expanded="True" SelectedCssClass="rootItemSelected" Selected="true" CssClass="rootItem" >
                    <Items>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Group2" Expanded="True" SelectedCssClass="rootItemSelected" CssClass="rootItem"  >
                    <Items>
                    </Items>
                </telerik:RadPanelItem>
            </Items>
Kamen Bundev
Telerik team
 answered on 14 Jan 2009
1 answer
154 views
Hi Team,
    How to add a node under a specific node ?
    Also tell me how to export the tree view data into a excel sheet .

Regards
Manoj
Shinu
Top achievements
Rank 2
 answered on 14 Jan 2009
1 answer
195 views
HI ALL,
 Help plz, can I find out their nested controls. I want this, see below.

 

protected void AD_View_ItemCommand(object source, GridCommandEventArgs e)

 

{

 

    if (e.CommandName == "ExpandCollapse")

 

    {

 

 

        GridDataItem item = (GridDataItem)e.Item;

 

        item.Selected =

true;

 

 

        string strkey = item.GetDataKeyValue("AD_ID").ToString();

 

 

        this.Title = this.Title + strkey + " Mode(Expand): " + ((item.Expanded) ? false : true) ;

 

 

        Label lbl = (Label)item.FindControl("lblRowNumber");

 

        
        //EDR_View this is nested grid
        RadGrid grdEDR_View = (RadGrid)item.FindControl("EDR_View");
        if (grdEDR_View != null)
        {
            grdEDR_View.DataSource = GET_EDR_Records(strkey);
        }


    }

 

}

Princy
Top achievements
Rank 2
 answered on 14 Jan 2009
2 answers
161 views
Hello,

I have a Grid with paging enabled. I am creating an export button inside the footer to exports Data from grid based on the current Grid data. Let's say someone filtered the Grid and we now have like 30 rows that spans over 4 pages. The grid has an ID as a DataKeyName.

What I want is to get all the IDs, not only of the first page but from all the grid and pass them to a Stored Procedure to get me shaped data I want for my export, bind it to a special Grid and export the data to Excel.

How can I be able to get all the IDs from the Grid and not just the ones from the current page.

Thanks.
Shinu
Top achievements
Rank 2
 answered on 14 Jan 2009
3 answers
335 views
Hi,

Say a grid has a page size of 10. A datasource containing 20 items is bound to the grid and grouped on a given column. The grouping yields 2 groups of 10 elements. By default, only the first group is shown on the first page after the initial load.

On collapse of both groups, I would expect only 1 page of data showing the two collapsed groups. Currently, it seems like paging and grouping are dissociated in the grid even though they should complement each other.

I've seen many threads on grouping and paging and the general solution (without any source code) is to change the paging dynamically. Anyone has done it?

To do this, one would have to know what group is being collapsed/expanded, how many items are in this group and adjust the number of pages, the current page etc. and adjust the paging so that the current page contains all the grouped items collapsed into one plus the number of other items up to the page size. Not sure it's even possible to have different page size in the same grid. Sounds very hard indeed.

Any help is appreciated,

Marc-André Gosset
Shinu
Top achievements
Rank 2
 answered on 14 Jan 2009
1 answer
388 views
I've got a linkbutton in my grid which when I click it I want a Label in that row to toggle it's visiblity...

I tied the button to an event, and it is firing, but I have no way to get the row to set the visibility

Am I going about this the wrong way?
Shinu
Top achievements
Rank 2
 answered on 14 Jan 2009
1 answer
231 views
Hi

I got a multiple levels RadGrid generated in run-time. I tried the following code, which can only expand the first level of sub grid by default.

RadGrid1.MasterTableView.HierarchyDefaultExpanded =

true;

 

 

foreach (GridTableView gtv in RadGrid1.MasterTableView.DetailTables)

 

    gtv.HierarchyDefaultExpanded =

true;

Just wonder how to expand all sub-grids at one time by default.

Thanks in advance,
Richard

 

Shinu
Top achievements
Rank 2
 answered on 14 Jan 2009
2 answers
66 views

Hi,

I posted several threads in various Telerik AJAX forums and have not had replies to all.  I will try posting here since I'm using the courseware and encountering problems doing the lessons.  
 

  1. Unable to see the Tool tips in the column header of the RadGrid
    PDF pg 459

     
        Protected Sub RadGrid1_ItemCreated(ByVal sender As ObjectByVal e As GridItemEventArgs)     
            'Check for GridHeaderItem if you wish tooltips only for the header cells        
            If TypeOf e.Item Is GridHeaderItem Then     
                Dim headerItem As GridHeaderItem = TryCast(e.Item, GridHeaderItem)     
                headerItem("CreditRating").ToolTip = "CreditRating"    
                headerItem("PreferredVendorStatus").ToolTip = "PreferredVendorStatus"    
                headerItem("ActiveFlag").ToolTip = "ActiveFlag"    
            End If     
        End Sub 
  2. Unable to drag and drop rows within a RadGrid
    PDF pg. 475

        Protected Sub RadGrid1_RowDrop(ByVal sender As ObjectByVal e As Telerik.Web.UI.GridDragDropEventArgs)     
            Dim item As GridDataItem = TryCast(e.DraggedItems(0), GridDataItem)     
            RadAjaxManager1.Alert("Dropped VendorID: " + item.GetDataKeyValue("VendorID"))     
        End Sub 
  3. Unable to delete records in a RadGrid
    PDF pg. 472

    [T-SQL]     
    DELETE FROM Purchasing.[Vendor] WHERE [VendorID] = @VendorID   

    Javascript error:

    Line: 7  
    Char: 62099  
    Error: Sys.WebForms.PageReuestManagerServerErrorException: The transaction ended in the trigger.  The batch has been aborted.  Vendors cannot be deleted.  They can only be marked as not active  
     
  4. Item insert code not working
    PDF pg. 477

        Protected Sub RadGrid1_ItemInserted(ByVal source As ObjectByVal e As GridInsertedEventArgs)     
            If e.Exception <> Nothing Then     
                e.ExceptionHandled = True    
                e.KeepInInsertMode = True    
        
                DisplayMessage("Product cannot be inserted. Reason: " + e.Exception.Message)     
            Else     
                DisplayMessage("Product inserted")     
            End If     
        End Sub  

 

The compilation error I get using the code in #4 is:
Compiler Error Message: BC30452: Operator '<>' is not defined for types 'System.Exception' and 'System.Exception'.

Also, within the code, there are squiggly lines under "DisplayMessage".  The caption is "Name 'DisplayMessage' is not declared".  I understand how to declare a variable, but what should I declare it as?

Thanks very much for all help,
r2

R2
Top achievements
Rank 1
 answered on 13 Jan 2009
1 answer
122 views
I have a combo box that has some filtering controls in its header template.  Whenever I select the inner dropdown (to filter the outer dropdown's data) it closes both itself and the outer combo.  How can I prevent the parent from closing when the inner combo is closed? 

What would point me in the right direction is, can I grab the container combobox from javascript whenever the selected index is changed on the inner?  Also, could I have it do something that mimics the following?

function OnClientDropDownClosing(comboBox, eventArgs) {
    if(is inside a parent combo) {    <--  need help with this part
        eventArgs.set_cancel(true);
    }
}

 

Paul
Top achievements
Rank 1
 answered on 13 Jan 2009
2 answers
119 views
We have a requirement to allow the user to Insert a flash movie FLV with a skin/player SWF using the Flashmanager in the WYSIWYG editor. As in the user must be able to click the flash button to open Flashmanager, and insert an FLV. The requirement for this is to allow content to wrap around the FLV and avoid using a user control.

So far we have not found a good way to do this. Any help would be appreciated. I've noticed that even when we embed a movie with a skin and use parameters the FLV isn't playing.

I have updated the MIME settings on IIS on localhost (for testing), allowed scripting, and am using an FLV and SWF locally without an absolute path. Below is some sample code.

<p> 
<object height="360" width="480" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
<param name="flashvars" value="/Files/movie.flv"
<param name="movie" value="/Files/videoPlayer.swf"
<embed src="/Files/videoPlayer.swf" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="file=/Files/Movie.flv" width="480" height="360"
</object> 
</p> 

Jesse
Top achievements
Rank 1
 answered on 13 Jan 2009
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?