Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
255 views
I know this is not officially supported, but I would like to find out if you guys know of any unofficial support, as I have seen in your support forums, that it used to be possible and there were some work arounds.

Do to limitations of design with RadWindow and RadDock, I would like to use the AJAX Modal Dialog control from the AJAX Toolkit on my site.  I know it's not recommended, but the fact is, RadWindow and RadDock do not offer the same functionality, and require far more code to accomplish the functionality I desire. 

However of course the AJAX Toolkit requires the <asp:AjaxScriptManager> which can't be on the same page as the <telerik:ScriptManager>  so do you guys know any method off the top of your heads to get the AJAX Toolkit to use the Telerik script manager?

Thanks!
Georgi Tunev
Telerik team
 answered on 16 Mar 2010
1 answer
189 views
I'm using the editor to allow people to edit HTML that will be sent in an email.

When someone inserts an image it's using a relative path for the image so in the email the image is broken.

Is there a simple way to tell the editor to use a fully-qualified URL for images inserted into it?

Thanks,
Kevin
Rumen
Telerik team
 answered on 16 Mar 2010
3 answers
206 views

Requirement is to replace the < and > links in the Calendar titlebar to the text 'Previous Year' and 'Next Year' and make those links highlighted when the cursor hovers over them for both Firefox 3.5 and IE 7+ browsers.  The CSS I defined in the .aspx file is below.  It works fine in IE but the old 'CSS width property' issue with FF/IE is making the highlighted text appear inconsistent with IE (with the padding around the text).  Any ideas on how to fix this?

 

 

 

<style type="text/css">

 

 

td.rcTitle{

 

 

 

color: black;

 

 

 

height: 3em;

 

 

 }

 

 

 

/* provide extra room for the previous/next year text at the title edges */

 

 

.RadCalendar_Default .rcTitlebar .rcTitle{

 

 

 

width: 85%;

 

 

 }

 

 

 

/* remove the fast previous/next <</>> links in the title bar */

 

 

 

 

 

.RadCalendar_Default .rcTitlebar .rcFastNext,

 

.RadCalendar_Default .rcTitlebar .rcFastPrev {

 

 

 

display: none;

}

 

 

.RadCalendar_Default .rcTitlebar a.rcNext:hover,

 

.RadCalendar_Default .rcTitlebar a.rcPrev:hover {

 

background-color: #c2cfe5;

 

 

 

border:1px solid #335ea8;

 

 

 }

  

 

 

.RadCalendar_Default .rcTitlebar a.rcNext:active,

 

.RadCalendar_Default .rcTitlebar a.rcPrev:active {

 

 

 

background-color: #99afd4;

 

 

 

border:1px solid #335ea8;

 

 

 }

 

 

/* display the previous/next year text */

 

 

 

 

 

.RadCalendar_Default .rcTitlebar a.rcNext,

 

.RadCalendar_Default .rcTitlebar a.rcPrev {

 

 

 

display: inline;

 

 

 

background: none;

 

 

 

overflow: visible;

 

 

 

text-decoration: underline;

 

 

 

color: black;

 

 

 

width: 110px; 

 

 

 

text-indent:0px;

 

 

 

}

 

 

 

</style>

Dimo
Telerik team
 answered on 16 Mar 2010
1 answer
142 views
Hello,

I just upgraded to the latest version of Telerik UI (version 2010.1.309.35). Now there is a problem on how my grids are displayed. In previous version, when I set GridLines="None" property for the grids, the borders separating the rows wouldn't display, which was my desired behavior. Now, after upgrading, even though that property is still set for my grids, the borders are now displayed. Please see the attached screenshot.

Thanks
Dimo
Telerik team
 answered on 16 Mar 2010
4 answers
190 views
Hi,

I m having multiple GridDateTimeColumn in a radgrid, but i can able to open pop up for single GridDateTimeColumn datetimepicker only when i selecting the date.

If i selected a date from any one of these GridDateTimeColumn, then i cannot open other GridDateTimeColumn (they not open pop up). But it works only in 'Popup' editmode'

Please find the code snippet i have used below,

private GridDateTimeColumn CreateDateGridColumn(string fieldname)     
        {     
               
    
            GridDateTimeColumn DT = new GridDateTimeColumn();     
            DT.UniqueName = fieldname;     
            DT.HeaderText = "fieldname";     
            DT.PickerType = GridDateTimeColumnPickerType.DatePicker;     
            DT.DataFormatString = "{0:MM/dd/yyyy}";     
            DT.ColumnEditorID = fieldname + "Editor";     
            DT.DataField = fieldname;     
            DT.SortExpression = fieldname;     
            DT.ItemStyle.Width = Unit.Pixel(120);     
            DT.FilterControlWidth = Unit.Pixel(50);     
              
    
            DT.EmptyDataText = " ";     
            return DT;     
        }  

Please give any suggestion.

Thanks in advance.

Regards
Maha




utchi
Top achievements
Rank 1
 answered on 16 Mar 2010
1 answer
98 views

Hi,

I am facing a problem while using RadDatePicker in IE8, below is the code:

<script language="javascript" type="text/javascript">  
 
    function fireHiddenButton(sender, args) {  
        var textBox1 = $find("<%= startDate.ClientID %>").get_selectedDate();  
        var textBox2 = $find("<%= endDate.ClientID %>").get_selectedDate();  
        if (textBox1 != null && textBox2 != null ) {  
            $get("<%= submitForm.ClientId %>").click();  
        }  
 
    }  
</script> 
<table> 
<tr> 
<td> 
Start Date  
</td> 
<td> 
 
 
<telerik:RadDatePicker ID="startDate" ShowPopupOnFocus="true"  runat="server">  
<ClientEvents OnPopupClosing="fireHiddenButton" /> 
 
</telerik:RadDatePicker> 
</td> 
 
</tr> 
<tr> 
<td> 
End Date  
</td> 
<td> 
 
 
<telerik:RadDatePicker ID="endDate" ShowPopupOnFocus="true" runat="server">  
<ClientEvents OnPopupClosing="fireHiddenButton" /> 
</telerik:RadDatePicker> 
</td> 
</tr> 
</table> 
 
<asp:LinkButton style="display:none" ID="submitForm"  runat="server"> 

over here i have two raddatepicker with OnPopupClosing client event, and a hidden linkbutton. if i select startdate and then enddate the OnPopupClosing event calls the JS function fireHiddenButton which fires the click event of the linkbutton. the problem is after selecting the dates i can't change them, like if i select  3rd march as startdate and 10th march as enddate once the page postback and i try to change the enddate to 15th march after a postback the date is still the old date (10th march).

it will be very kind if any one can help on this.

thanks & regards
nitesh monga
Pavel
Telerik team
 answered on 16 Mar 2010
6 answers
220 views
Hello,

I'm using a RadTreeView within a master page in sharepoint with ExpandMode = TreeNodeExpandMode.ServerSideCallBack for RadTreeNodes.
When I expand a node with children and then I click on a leaf node, the new page is displayed and the tree is expanded like in the previous page.
But the parent node has a class sets to rtPlus instead of rtMinus with its children displayed.
When I click on the '+' image the children are collapsed.

I think that this can be due to the following code:
private void RenderExpand(HtmlTextWriter writer)  
{  
    if (this.Expanded && (this.ExpandMode != TreeNodeExpandMode.ServerSideCallBack))  
    {  
        writer.AddAttribute(HtmlTextWriterAttribute.Class, "rtMinus");  
    }  
    else  
    {  
        writer.AddAttribute(HtmlTextWriterAttribute.Class, "rtPlus");  
    }  
    writer.RenderBeginTag(HtmlTextWriterTag.Span);  
    writer.RenderEndTag();  
}  
 

Can somebody help me please?

Thanks by advance.

Best regards.

Didier.
EPU
Top achievements
Rank 1
 answered on 16 Mar 2010
2 answers
110 views
Hi all,
It is not easy for me to set custom css into each of radcontrol...Now I have a question, I have downloaded a style sheet from telerik and read this topic already:
http://www.telerik.com/help/aspnet-ajax/panel_appearancecreatingacustomskin.html
But I cannot change its css with the following code and the result is attached.

style sheet 
 
.RadPanelBar_JonDan 
{ 
    background: #f8f8f8 !Important; 
    font-family: Verdana, Arial, helvetica, sans-serif !Important; 
    font-size: 11px !Important; 
    line-height: 24px !Important; 
} 
 
.RadPanelBar_JonDan .rpRootGroup 
{ 
    border: solid 1px #f0f0f0; 
} 
 
.RadPanelBar_JonDan .rpRootGroup .rpLink 
{ 
    background: #fff !Important; 
    font-weight: bold; 
    font-size: 12px; 
    border: none !Important; 
    color: #cc0000; 
} 
 
.RadPanelBar_JonDan .rpRootGroup .rpFocused, 
.RadPanelBar_JonDan .rpRootGroup .rpLink:hover 
{ 
    background: #fff url('PanelBar/RootItemBg.png') 0 -1px !Important; 
    color: #fff; 
} 
 
.RadPanelBar_JonDan .rpGroup .rpLink 
{ 
    background: #f8f8f8 none !Important; 
    border-top: solid 1px #fff !Important;  
    border-bottom: solid 1px #f0f0f0 !Important; 
    border-left: solid 1px #f8f8f8 !Important; 
    border-right: solid 1px #f8f8f8 !Important; 
    font-weight: normal; 
    color: #666 !Important; 
} 
 
.RadPanelBar_JonDan .rpGroup .rpFocused, 
.RadPanelBar_JonDan .rpGroup .rpLink:hover 
{ 
    background: #fff none !Important; 
    border-top: solid 1px #fff !Important;  
    border-bottom: solid 1px #e6e6e6 !Important; 
    border-left: solid 1px #f8f8f8 !Important; 
    border-right: solid 1px #f8f8f8 !Important; 
    font-weight: normal; 
    color: #ff0000 !Important; 
} 
 
.RadPanelBar_JonDan .rpOut 
{ 
    border-color: #f8f8f8 !Important; 
} 
 
 
.RadPanelBar_JonDan .rpExpanded 
{ 
    border-color: #f8f8f8; 
} 
 
 
/* <disabled items> */ 
.RadPanelBar_JonDan .rpDisabled, 
.RadPanelBar_JonDan .rpDisabled:hover 
{ 
    color: #ccc; 
} 
 
.RadPanelBar_JonDan .rpDisabled:hover 
{ 
    border-color: #002d96; 
} 
 
.RadPanelBar_JonDan .rpDisabled .rpOut, 
.RadPanelBar_JonDan .rpDisabled:hover .rpOut 
{ 
    border-color: #89aee5; 
} 
/* </disabled items> */ 
 
/* <expand arrows> */ 
.RadPanelBar_JonDan .rpExpandable .rpText, 
.RadPanelBar_JonDan .rpExpanded .rpText 
{ 
    background-color: transparent; 
    background-image: url('PanelBar/Expandable.gif'); 
} 
 
/* </expand arrows> */ 
 
/*      <expand arrows override> */ 
.RadPanelBar .rpExpandable .rpText, 
.RadPanelBar .rpExpanded .rpText 
{ 
    padding-right: 20px; 
    background-repeat: no-repeat; 
} 
 
.RadPanelBar_rtl .rpExpandable .rpText, 
.RadPanelBar_rtl .rpExpanded .rpText 
{ 
    padding-left: 20px; 
} 
 
.RadPanelBar_rtl .rpGroup .rpText 
{ 
    padding: 0 10px; 
} 
 
.RadPanelBar .rpExpandable .rpText { background-position: 100% 0; } 
.RadPanelBar .rpExpanded .rpText { background-position: 100% -176px; } 
.RadPanelBar_rtl .rpExpandable .rpText { background-position: 0 0; } 
.RadPanelBar_rtl .rpExpanded .rpText { background-position: 0 -176px; } 
 
.RadPanelBar .rpExpandable:hover .rpText, 
.RadPanelBar .rpExpandable.rpSelected .rpText, 
.RadPanelBar .rpExpandable.rpSelected:hover .rpText 
{ 
    background-position: 100% -337px; 
} 
 
.RadPanelBar .rpExpanded:hover .rpText, 
.RadPanelBar .rpExpanded.rpSelected .rpText, 
.RadPanelBar .rpExpanded.rpSelected:hover .rpText 
{ 
    background-position: 100% -476px; 
} 
 
.RadPanelBar_rtl .rpExpandable:hover .rpText, 
.RadPanelBar_rtl .rpExpandable.rpSelected .rpText, 
.RadPanelBar_rtl .rpExpandable.rpSelected:hover .rpText 
{ 
    background-position: 0 -337px; 
} 
 
.RadPanelBar_rtl .rpExpanded:hover .rpText, 
.RadPanelBar_rtl .rpExpanded.rpSelected .rpText, 
.RadPanelBar_rtl .rpExpanded.rpSelected:hover .rpText 
{ 
    background-position: 0 -476px; 
} 
 
/*      </expand arrows override> */ 
 
/* <subitems> */ 
.RadPanelBar_JonDan .rpGroup 
{ 
    background-color: #fff; 
} 
 
.RadPanelBar_JonDan .rpGroup .rpLink, 
.RadPanelBar_JonDan .rpGroup .rpTemplate 
{ 
    color: #000; 
    background-color: transparent; 
    background-image: none;      
    line-height: 20px; 
    min-height: 20px; 
} 
* html .RadPanelBar_JonDan .rpGroup .rpLink { height: 20px; } 
 
.RadPanelBar_JonDan .rpGroup .rpLink 
{ 
    background-color: transparent; 
    background-image: none; 
     
    padding: 1px; 
    margin: 0 1px; 
} 
 
.RadPanelBar_JonDan .rpGroup .rpOut 
{ 
    border-bottom: 0; 
    margin-right: 3px; 
} 
 
/* <subitems (disabled)> */ 
.RadPanelBar_JonDan .rpGroup .rpItem .rpDisabled, 
.RadPanelBar_JonDan .rpGroup .rpItem .rpDisabled:hover, 
.RadPanelBar_JonDan .rpGroup .rpItem .rpDisabled:hover .rpOut 
{ 
    background-image: none; 
} 
 
.RadPanelBar_JonDan .rpGroup .rpItem .rpDisabled, 
.RadPanelBar_JonDan .rpGroup .rpItem .rpDisabled:hover 
{ 
    color: #999; 
    text-decoration: none; 
    background-color: #fff; 
    border: 0; 
    padding: 1px; 
} 
 
.RadPanelBar_JonDan .rpGroup .rpItem .rpDisabled:hover .rpOut 
{ 
    border-bottom: 0; 
} 
/* </subitems (disabled)> */ 
 
/* <subitems> */ 

ascx
<link href="../Styling/ProductPanel.css" rel="stylesheet" type="text/css" />
<telerik:RadPanelBar ID="RadPanelBar1" Runat="server" DataFieldID="productID"  
            DataFieldParentID="productParentID" DataSourceID="adsProducts"  
            DataTextField="productTitle" DataValueField="productID" Width="250px" EnableEmbeddedSkins="false" Skin="RadPanelBar_JonDan"> 
        </telerik:RadPanelBar> 

louis chan
Top achievements
Rank 1
Iron
 answered on 16 Mar 2010
2 answers
151 views
Hi,

I'm implementing Telerik radgrid in Sharepoint.

I use the NeedDataSource event to populate my grid. I get the data through linqtosql in the following manner:

    RadGrid1.DataSource = handler.Find(); ->

    

public IList<Company1.Grid.Data.DataTransferObjects.KravDTO> Find()  
        {  
            using (Company1LinqDSDataContext context = new Company1LinqDSDataContext())  
            {  
 
                return (from k in context.Kravs  
                        select new Company1.Grid.Data.DataTransferObjects.KravDTO()  
                        {  
                            Anr=k.anrr,  
                            ID=k.ID,  
                            Kund=k.Kund  
 
                        }).ToList();  
 
            }  
             
              
        } 

Hence the RadGrid is populated with an IList as datasource.

This works fine! However the filtering and paging functions only work once every refresh. E.g: Navigate to the page containing the RadGrid. Filter/change page or anything like that and the filtering and ability to change number of items per page stops working.
The paging itself (clicking the navigation) and sorting still works.

If i refresh the page the filtering and "number per page" function works again until the next action.

The only error message i get is: "'null' is null or not an object".

My .ascx code:

            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                </AjaxSettings> 
            </telerik:RadAjaxManager> 
            <telerik:RadGrid ID="RadGrid1" Width="97%"   
             AllowPaging="True" PageSize="25" runat="server" AllowFilteringByColumn="True" AllowSorting="True" 
             OnNeedDataSource="RadGrid1_NeedDataSource" GridLines="None">  
              <MasterTableView Width="100%" /> 
              <PagerStyle Mode="NextPrevAndNumeric" /> 
                <FilterMenu EnableTheming="True">  
                    <CollapseAnimation Duration="200" Type="OutQuint" /> 
                </FilterMenu> 
            </telerik:RadGrid> 

Any ideas?

Johan Frisell
Top achievements
Rank 1
 answered on 16 Mar 2010
1 answer
138 views
I have read tons of questions regarding the update of the grid ;not working, but I can't seem to find a solution :(
I a grid filled with a list of objects. When I press refresh it updates the lines, but when I add or delete an item the grid is not updated. When I change an object and save, the line IS updated.

My code:
protected override void Page_Init(object sender, EventArgs e) 
        { 
            base.Page_Init(sender, e); 
            CreateGrid(); 
        } 
 
        protected void Page_Load(object sender, System.EventArgs e) 
        { 
            lblLocation.Text = Location.Title; 
            if (!IsPublished) 
            { 
                lblStatus.Text = " - " + _location.Status.ToString(); 
                lblStatus.Visible = true; 
            } 
 
            if (_ajaxmanager != null) 
            { 
                _ajaxmanager.AjaxSettings.AddAjaxSetting(Grid, Grid); 
            } 
        } 
 
        public void CreateGrid() 
        { 
 
            GridButtonColumn edit_col = new GridButtonColumn(); 
            edit_col.Text = "wijzig"; 
            edit_col.UniqueName = "EditColumn"; 
            edit_col.CommandName = "Edit"; 
            edit_col.ItemStyle.Width = Unit.Pixel(35); 
 
            GridButtonColumn copy_col = new GridButtonColumn(); 
            copy_col.Text = "kopieer"; 
            copy_col.UniqueName = "CopyColumn"; 
            copy_col.CommandName = "Copy"; 
            copy_col.ItemStyle.Width = Unit.Pixel(40); 
 
            GridButtonColumn del_col = new GridButtonColumn(); 
            del_col.Text = "verwijder"; 
            del_col.UniqueName = "DeleteColumn"; 
            del_col.CommandName = "Delete"; 
            del_col.ItemStyle.Width = Unit.Pixel(50); 
 
            RadGrid grid = new RadGrid(); 
            grid.UpdateCommand += new GridCommandEventHandler(grid_UpdateCommand); 
            grid.DeleteCommand += new GridCommandEventHandler(grid_DeleteCommand); 
            //grid.ItemDataBound += new GridItemEventHandler(grid_ItemDataBound); 
 
            grid.ID = "grdFreeplaces"; 
            grid.AutoGenerateColumns = false; 
            grid.ShowStatusBar = true; 
            grid.Width = Unit.Pixel(737); 
            grid.ClientSettings.AllowKeyboardNavigation = true; 
            grid.ClientSettings.KeyboardNavigationSettings.InitInsertKey = GridFocusKeys.I; 
 
            grid.MasterTableView.EditFormSettings.EditFormType = GridEditFormType.Template; 
            grid.MasterTableView.EditFormSettings.FormTemplate = new VisualObjectEditorFreeDaysFormTemplate(this, _location); 
            grid.MasterTableView.CommandItemSettings.AddNewRecordText = "Toevoegen"; 
            grid.MasterTableView.CommandItemSettings.RefreshText = "Herladen"; 
            if (IsPublished) 
                grid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.TopAndBottom; 
            else 
                grid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None; 
            grid.MasterTableView.EditMode = GridEditMode.PopUp; 
            grid.MasterTableView.EditFormSettings.PopUpSettings.Width = Unit.Pixel(765); 
            grid.MasterTableView.EditFormSettings.PopUpSettings.Height = Unit.Pixel(240); 
            grid.DataSource = Location.FreePlaces; 
            grid.MasterTableView.DataKeyNames = new string[] { "LexiconItemID" }; 
            if (IsPublished) grid.MasterTableView.Columns.Add(edit_col); 
            if (IsPublished) grid.MasterTableView.Columns.Add(del_col); 
            grid.MasterTableView.Columns.Add(CreateDataColumn("Omschrijving", "Description")); 
            grid.MasterTableView.Columns.Add(CreateDataColumn("Leeftijd", "AgeRangeDescription")); 
 
            phFreePlace.Controls.Add(grid); 
        } 

And the command-functions:
        protected void grid_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
        { 
            bool isnew = false; 
            GridEditableItem item = e.Item as GridEditableItem; 
            VisualObjectEditor editor = (e.CommandSource as Button).Parent.FindControl("edtFormTemplate") as VisualObjectEditor; 
            LexiconItem freeplace = null; 
 
            Location.Location.Document.ContentControl.CheckOut(Framework, Framework.ActiveUser); 
 
            if (item.ItemIndex < 0) 
            { 
                freeplace = _location.Location.CreateNewFreePlace().LexiconItem; 
                isnew = true; 
            } 
            else 
                freeplace = Location.FindFreePlace(item.OwnerTableView.DataKeyValues[item.ItemIndex]["LexiconItemID"].ToString()).LexiconItem; 
 
            editor.GetContentStorageValues(freeplace.Content.DocumentType, freeplace.Content); 
 
            if (editor.Validate(freeplace)) 
            { 
                Location.Location.GetFreePlaceContentField().LexiconItems.Add(freeplace); 
                Location.Location.Document.ContentControl.Publish(Framework, Framework.ActiveUser); 
                Grid.DataSource = Location.FreePlaces; 
                Grid.Rebind(); 
            } 
            else 
            { 
                Location.Location.Document.ContentControl.UndoCheckOut(Framework, Framework.ActiveUser); 
                e.Canceled = true; 
            } 
        } 
 
        protected void grid_DeleteCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
        { 
            Location.Location.Document.ContentControl.CheckOut(Framework, Framework.ActiveUser); 
            string lexiconitemid = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["LexiconItemID"].ToString(); 
            Location.Location.DeleteFreePlace(lexiconitemid); 
            Location.Location.Document.ContentControl.Publish(Framework, Framework.ActiveUser); 
            Grid.DataSource = Location.FreePlaces; 
            Grid.Rebind(); 
        } 

the code is in a control that is created in a main page, if you want' I could add that code as well.

I've tried both the rebind and the NeedDataSource event, but that doesn't make any difference.

I really hope you guy's could help me out with this one.
Thanks
Marco
Top achievements
Rank 1
 answered on 16 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?