Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
119 views
Hi all,

I have the following issue:

In Site.Master I have the following:

<head runat="server">
    <title>
        <asp:ContentPlaceHolder ID="TitleContent" runat="server" />
    </title>
    <telerik:RadCodeBlock runat="server">
        <%= Html.MinifyStylesheet("~/Content/Site.css") %>
        <%= Html.MinifyStylesheet("~/Content/dark-hive-custom/jquery-ui-1.7.2.custom.css")%>
        <%= string.Format("<link REL='SHORTCUT ICON' HREF='{0}'>", CompilationSymbol.IsCableSolve ? Html.ResolveUrl("~/content/images/cs_icon.ico") : Html.ResolveUrl("~/content/images/id.ico"))%>
    </telerik:RadCodeBlock>
    <asp:ContentPlaceHolder ID="CssContent" runat="server">
    </asp:ContentPlaceHolder>
</head>

and, at the bottom of the page right before the closing body tag, I put my RadScriptManager declaration.

When my RadScriptManager is on the Master page, I encounter a weird error in my View. The view is acknowledging that it sees the RadScriptManager, but AJAX RadSplitter is saying that Telerik is undefined. If I move my RadScriptManager to the view page, removing it from the master page, AJAX RadSplitter works as expected.

Now, I was completely happy keeping my RadScriptManager on my view. I only use Telerik AJAX controls on this view. Unfortunately, I need the RadScriptManager on my Master Page in order to make the RadCodeBlock work on all pages which are not my view. If I remove the RadCodeBlock from Site.Master then my view throws an error mentioning the code blocks. 

You see my problem? I have a circular reference of errors. Any suggestions on how to support this other than adding a ScriptManager to every other view?
Simon
Telerik team
 answered on 29 Jun 2011
1 answer
52 views
Hi,

I'm trying to apply and inprove D'n'D from http://www.telerik.com/community/forums/aspnet-ajax/treelist/treelist-drag-n-drop-example-jquery.aspx

Unfortunately, OnItemCreated event fires only after mouse click anywhere on RadTreeList control, which is unexpected behaviour, as I understood.

Telerik version is 2011.1.526.40
Tsvetina
Telerik team
 answered on 29 Jun 2011
4 answers
107 views
Hello,

    I am unable to set the font size and color for rad editor. Even after setting it is taking the default settings values. In this regard, i need help urgently.

Thanks,

R. Vikram Goud
Dobromir
Telerik team
 answered on 29 Jun 2011
6 answers
1.4K+ views
Hi,

In RAD Grid Q3 2007 version, how to get all selected rows in the radgrid in javascript?

I tried the following code, but it returns only the count of the current DetailTableView only; where the page is a web user control.

function OnRowSelected() 
    var noOfRowsSelected; 
    noOfRowsSelected = this.SelectedRows.length 

Here is the declaration of the grid control:

<MasterTableView
<MasterTableView
<MasterTableView
            <rad:RadGrid ID="grdViewRegistries" runat="server" AutoGenerateColumns="False" GridLines="Vertical" 
                Height="220px" AllowPaging="false" AllowSorting="false" EnableAJAX="true" Skin="BlueCare" 
                OnItemDataBound="grdViewRegistries_ItemDataBound" HorizontalAlign="Center" AllowMultiRowSelection="true" 
                AllowMultiRowEdit="true" EnableOutsideScripts="true" EnableAJAXLoadingTemplate="true" 
                OnDetailTableDataBind="grdViewRegistries_DetailTableDataBind" OnItemCreated="grdViewRegistries_ItemCreated"
                <ClientSettings ApplyStylesOnClient="true" AllowExpandCollapse="true" ClientEvents-OnRowCreated="onRowCreated"
                    <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" /> 
                    <ClientEvents OnRowMouseOver="ChangeColor" OnRowMouseOut="RemoveColor" OnRowDeselected="RowSelectColor" 
                        OnRowSelected="RowSelectColor" /> 
                    <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="220px" /> 
                </ClientSettings> 
<MasterTableView>
</MasterTableView>
</rad:RadGrid> 

Please let me know.

Thanks

Andrey
Top achievements
Rank 1
 answered on 29 Jun 2011
3 answers
228 views
Hi,

I want to do some custom adjustments when a user uses the grouping function in radgrid. Now my real problem is catching the event that should happen when you use the grouping and I can't seem to get it. From reading I thought that the grid would always use a ItemCommand and that you could simply use:

    protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
    {
        if (e.CommandName == "RowClick")
        {
               // Do something
        }
    }

And simply change the "RowClick" with what ever the name might be of a grouping so I just put a breakpoint there and tested it but I never stopped there. My grid is called RadGrid1 so that shouldn't be a problem, do I need todo something else to make the grid throw out events?

Also any links to where I can read up more would be great, but I've been trying to read on all the helps and API's I can find and they just don't do it, I can't seem to understand or get it right.
Iana Tsolova
Telerik team
 answered on 29 Jun 2011
1 answer
887 views
I am using WCF Dataservices so I have hierarchical data...Some of my values are coming back with null and I am getting "Input String was not in a correct format"...I am trying to handle the null values in the radgrid_ItemDatabound, but I am still having problems...How SHOULD I be handling null values in the radgrid column. 

RadGrid HTML:
<telerik:RadGrid ID="radgridCredits" runat="server" 
AllowFilteringByColumn="True"<BR>                                                
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
CellSpacing="0"<BR>                                                
GridLines="None" Height="270px" 
OnNeedDataSource="radgridCredits_NeedDataSource"<BR>                                                
OnSelectedIndexChanged="radgridCredits_SelectedIndexChanged" 
OnItemDataBound="radgridCredits_ItemDatabound" PageSize="100" 
ShowGroupPanel="True"<BR>                                                 
Visible="False" 
Width="100%"><BR>                                                
<ClientSettings 
AllowDragToGroup="True"><BR>                                                    
<Scrolling AllowScroll="True" UseStaticHeaders="True" 
/><BR>                                                
</ClientSettings><BR>                                                
<MasterTableView><BR>                                                    
<CommandItemSettings ExportToPdfText="Export to Pdf" 
/><BR>                                                    
<Columns><BR>                                                        
<telerik:GridButtonColumn CommandName="Select" DataTextField="Show.Title" 
FilterControlAltText="Filter column2 
column"<BR>                                                            
HeaderText="Show" SortExpression="Show.Title" 
UniqueName="column2"><BR>                                                            
<HeaderStyle Width="25%" 
/><BR>                                                            
<ItemStyle Width="25%" VerticalAlign="Top" 
/><BR>                                                        
</telerik:GridButtonColumn><BR>                                                        
<telerik:GridBoundColumn DataField="Show.Medium.name" 
FilterControlAltText="Filter TalentColumn 
column"<BR>                                                            
FilterControlWidth="50px" HeaderText="Media" 
SortExpression="Show.Medium.name"<BR>                                                            
UniqueName="TalentColumn"><BR>                                                            
<HeaderStyle Width="9%" 
/><BR>                                                            
<ItemStyle VerticalAlign="Top" Width="9%" 
/><BR>                                                        
</telerik:GridBoundColumn><BR>                                                        
<telerik:GridBoundColumn DataField="Craft.name" FilterControlAltText="Filter 
column1 
column"<BR>                                                            
FilterControlWidth="75px" HeaderText="Craft" SortExpression="Craft.name" 
UniqueName="column1"><BR>                                                            
<HeaderStyle Width="15%" 
/><BR>                                                            
<ItemStyle Width="15%" VerticalAlign="Top" 
/><BR>                                                        
</telerik:GridBoundColumn><BR>                                                        
<telerik:GridBoundColumn DataField="Show.Project.us_bor" 
DataFormatString="${C:0}" FilterControlAltText="Box 
Office"<BR>                                                            
FilterControlWidth="50px" HeaderText="US BO(US$)"  
SortExpression="Show.Project.us_bor"<BR>                                                            
UniqueName="colBoxOffice"><BR>                                                            
<HeaderStyle Width="8%" 
/><BR>                                                            
<ItemStyle Width="8%" VerticalAlign="Top" 
/><BR>                                                        
</telerik:GridBoundColumn><BR>                                                        
<telerik:GridBoundColumn DataField="Show.Project.ProdHouse.name" 
FilterControlAltText="Filter column3 
column"<BR>                                                            
HeaderText="Production House" SortExpression="Show.Project.ProdHouse.name" 
UniqueName="column3"><BR>                                                            
<HeaderStyle Width="12%" 
/><BR>                                                            
<ItemStyle Width="12%" VerticalAlign="Top" 
/><BR>                                                        
</telerik:GridBoundColumn><BR>                                                        
<telerik:GridBoundColumn DataField="comment" FilterControlAltText="Filter 
column4 
column"<BR>                                                            
HeaderText="Comment" SortExpression="comment" 
UniqueName="colComment"><BR>                                                            
<HeaderStyle Width="22%" 
/><BR>                                                            
<ItemStyle Width="22%" VerticalAlign="Top" 
/><BR>                                                        
</telerik:GridBoundColumn><BR>                                                        
<telerik:GridBoundColumn DataField="Show.year" FilterControlAltText="Filter 
column5 
column"<BR>                                                            
FilterControlWidth="40px" HeaderText="Year" SortExpression="Show.year" 
UniqueName="column5"><BR>                                                            
<ItemStyle VerticalAlign="Top" 
/><BR>                                                        
</telerik:GridBoundColumn><BR>                                                    
</Columns><BR>                                                    
<EditFormSettings><BR>                                                        
<EditColumn FilterControlAltText="Filter EditCommandColumn 
column"><BR>                                                        
</EditColumn><BR>                                                    
</EditFormSettings><BR>                                                
</MasterTableView><BR>                                                
<FilterMenu 
EnableImageSprites="False"><BR>                                                
</FilterMenu><BR>                                                
<HeaderContextMenu CssClass="GridContextMenu 
GridContextMenu_Default"><BR>                                                
</HeaderContextMenu><BR>                                            
</telerik:RadGrid>

Here is my item databound event...
<P> protected void radgridCredits_ItemDatabound(object sender, 
GridItemEventArgs e)<BR>        
{<BR>            
try<BR>            
{<BR>                
if ((e.Item.ItemType == Telerik.Web.UI.GridItemType.Item) 
||<BR>                   
(e.Item.ItemType == 
Telerik.Web.UI.GridItemType.AlternatingItem))<BR>                
{<BR>                    
if (e.Item is 
GridDataItem)<BR>                    
{<BR>                        
GridDataItem gridDataItem = 
(GridDataItem)e.Item;<BR>                        
Credit credit = (Credit)(e.Item.DataItem);</P>
<P>                        
if (!credit.Show.title.ToLower().Contains("select a 
talent"))<BR>                        
{<BR>                            
if (credit.comment == 
null)<BR>                            
{<BR>                                
gridDataItem["colComment"].Text = 
"";<BR>                            
}<BR>                            
if (credit.Show.Project.us_bor == 
null)<BR>                            
{<BR>                                
gridDataItem["colBoxOffice"].Text = 
"";<BR>                            
}<BR>                        
}<BR>                    
}  </P>
<P>                   
// Telerik.Web.UI.GridDataItem item = e.Item as 
Telerik.Web.UI.GridDataItem;<BR>                    
//Credit credit = 
(Credit)e.Item.DataItem;<BR>                    
//if 
(credit.comment==null)<BR>                    
//{<BR>                    
//    credit.comment = 
"";<BR>                    
//}<BR>                    
//if (credit.Show.Project.us_bor == 
null)<BR>                    
//{<BR>                    
//    credit.Show.Project.us_bor = 
0m;<BR>                    
//}<BR>                    
//Get the "colDivision" cell value using the columnUniqueName.  
<BR>                    
//if (item["comment"].Text == 
null)<BR>                    
//{<BR>                    
//    item["comment"].Text = 
"";<BR>                    
//}<BR>                
}  
<BR>               
<BR>            
}<BR>            catch 
(Exception 
ex)<BR>            
{<BR>                
SiteMaster masterPage = 
(SiteMaster)Page.Master;<BR>                
masterPage.SetAlertMessage("Error fetching Talent Credits:  "
ex.Message);<BR>                
return;<BR>            
}<BR>        }</P><BR>
Marin
Telerik team
 answered on 29 Jun 2011
2 answers
128 views
hi

i have enabled the csv option in the grid and i have a column which consists of data in this format 28:30 but when i export it to csv the data gets changed to 28:30:00 i need to display it as 28:30
abinav
Top achievements
Rank 1
 answered on 29 Jun 2011
3 answers
109 views
I'm trying to use the Radgrid as a search form. 

When the grid is first loaded, I want it to bring back zero records, but show the columns and their various filter boxes and the command item section.  When a filter is selected, it then brings back the relevant records.

Currently, I am bringing back the full set of records, and then the user filters from there.  I only want to bring back the records after a filter has been entered.

Thanks!
Genti
Telerik team
 answered on 29 Jun 2011
1 answer
48 views
Hi All,

I have updated Rad controller to AJAX ASP.NET after that i am getting java script error I have attached image . Please any help in this.

Thanks in advance.


Georgi Tunev
Telerik team
 answered on 29 Jun 2011
2 answers
71 views
I have a control that has a Radgrid with three GridDropDownColumn as RadComboBox. I have been trying to enable paging for it and it works for all the other fields but this 3 fields. I'am assigning the  Datatable that i use as datasource to the Viewstate and use the following code in the PageIndexChanged and NeedDataSource events:

if (ViewState["GridData"] != null)
 {
      grdCitasMasivas.DataSource = ViewState["GridData"];
      grdCitasMasivas.Rebind();
  }

What could i do to make the paging work for the GridDropDownColumn columns?
Veli
Telerik team
 answered on 29 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?