Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
304 views
Dear Sir:
    I have a radgrid and there is some tooltips inside the grid. i tried to use the tooltip manager for the tooltip but i found the performance is not satisfy when there are a lot of tooltips needed. Now, i changed to load the tooptip by javascript (sample on below) . Everything seem fine except the width and height, the tooltips seem cannot automatically change the tooltips width and height, i also tried to use the auto scrollbar but the scrollbar didn't show up. how can I pass the tooltip's width and height to the tooltip manager and it will resize/show scrollbar to the tooltip. is there any sample which i can follow?

i got some hints from other post  with property (OnClientBeforeShow, OnClientShow) to change the size  but i cannot make it work.



thks

From CH


function GetXMLObject()
{
    var xmlhttp=false;
          
    try {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
        try 
        {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (E) 
        {
            xmlhttp = false;
        }
    }  
  
    if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
        try {
            xmlhttp = new XMLHttpRequest();
        } catch (e) {
            xmlhttp=false;
        }
    }
      
    if (!xmlhttp && window.createRequest) {
        try {
            xmlhttp = window.createRequest();
        } catch (e) {
            xmlhttp=false;
        }
    }
      
    if (!xmlhttp)
        return null;
    else
        return xmlhttp;
}


function ShowTooltip(sender, manager, url) {
        if (manager != null) {
            var tooltip = manager.getToolTipByElement(sender);
  
            if (!tooltip) {
                tooltip = manager.createToolTip(sender);
            }
  
            if (xmlRequest != null)
                xmlRequest.Abort();
  
            xmlRequest = GetXMLObject();
  
            tooltip.show();
            var contentElement = document.createElement('div');
  
            contentElement.innerHTML = "<img src='../../images/loading7.gif' />";
            tooltip.set_contentElement(contentElement);
  
            if (xmlRequest != null) {
                xmlRequest.open("GET", url, true);
                xmlRequest.onreadystatechange = function () {
                    if (xmlRequest.readyState == 4) {
                        if (xmlRequest.status == 200) {
                            tooltip.hide();
                            contentElement = document.createElement('div');
                            contentElement.innerHTML = xmlRequest.ResponseText;
                            if (contentElement.outerText.length < 10)
                                contentElement.style.width = "100px";
  
  
                            tooltip.set_contentElement(contentElement);
                            tooltip.show();
  
                        }
                    }
                }
            }
            xmlRequest.send(null);
        }
Marin Bratanov
Telerik team
 answered on 03 Aug 2011
2 answers
184 views
How is the way to add radAjaxPanel programmatically?
I have a MasterPage . I need added in content.
I tried with this in Init event of page:

         RadAjaxPanel radajaxPanel = new RadAjaxPanel();
         radajaxPanel.ID="RadAjaxPanel3";
         radajaxPanel.ClientEvents.OnRequestStart = "conditionalPostback";

         containerUpload.Controls.Add(radajaxPanel);           


but didn't work
thanks!
July
Top achievements
Rank 2
 answered on 03 Aug 2011
1 answer
269 views
Hi,
I have my RadWindow defined in one ascx file for example "controlParent". Content of this window is another ascx file for example "controlChild". How can I close my RadWindow by asp:button in control "controlChild" ?
My aspx file:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"/>
 <user:ContolParent runat="server" ID="cParent" />

ContorlParent.ascx:
<telerik:RadWindow ID="selectorPopupWindow" CssClass="rad_window" runat="server" Title="Galeria multimediów" Width="950" EnableEmbeddedSkins="false" Skin="MSIT_sitefinityLocal"
            Height="600" VisibleOnPageLoad="false" Behaviors="Minimize, Move, Maximize, Close"
            OffsetElementID="RadGrid1">
            <ContentTemplate>
                <user:ControlChild runat="server" ID = "cChild" />
            </ContentTemplate>
</telerik:RadWindow>


ContolChild.ascx:
Grids, TextBox etc.
<asp:Button runat="server" ID="btnCancel" Text="Cancel" />


I am thankful for any help,
Mateusz Wajcowicz
Kevin
Top achievements
Rank 2
 answered on 03 Aug 2011
1 answer
100 views

Hi,

We are using RadEditor with Ajax Tab Container.

We have three tabs in tab container.
Tab 1 - RadEditor
Tab 2 - .Net Grid View
Tab 3 - .Net Grid View

In IE browser, we don't face any issue, it is working fine.

In Firefox, we are facing the following issue,
    Whenever working with Rad editor in first tab, we don't have any issue.
    But whenever, we are working with second tab and coming back to first tab, the Editor alignment goes off and the buttons available at top (first row controls - e.g., spell checker ...) are displayed in the single column instead of single row, so the control enlarges and UI is affected. In the same situation, if we hit refresh (F5), then the control regains the original alignment and look & feel.
 
Please let us know, if we are missing something.

Regards,
Guru

Rumen
Telerik team
 answered on 03 Aug 2011
1 answer
142 views
Hi,

I'm using RadBinaryImage to render database stored imagery but, in a notification email i neet it to render instead of this:
<img id="propertyImg" src="Telerik.Web.UI.WebResource.axd?imgid=900376f0988148a1a0cdb64b64d02373&type=rbi" height="50" width="50">

I need it like this:
<img id="propertyImg" src="http://servername:serverport/Telerik.Web.UI.WebResource.axd?imgid=900376f0988148a1a0cdb64b64d02373&type=rbi" height="50" width="50">

Anyone has an idea how to make it happen?

Best Regards,
Vitor Monteiro

Maria Ilieva
Telerik team
 answered on 03 Aug 2011
2 answers
93 views
Hi,
I want to display a new child window(created by me) for creating a new appointment instead of the one which is built in Telerik Scheduler.
I have written java function to open the new window for 'OnClientTimeSlotClick' event. I want the new custom created window to open on double click of the timeslot, right now it is happening for single click as well. If I remove 'OnClientTimeSlotClick' from declaration, I get a small popup window with no controls on it. I want to get rid of that small popup and get my custom created screen as popup on double click of the timeslot. Please suggest.

Thanks,
Navya
Navya
Top achievements
Rank 1
 answered on 03 Aug 2011
4 answers
173 views
Hi
Is there a way to print the radgrid (ie to export and send it to printer) without opening in pdf/tiff files?

Appreciate your support.
Regards,
SR





Mohammed
Top achievements
Rank 1
 answered on 03 Aug 2011
1 answer
122 views
Team Telerik,

I've created a grid programatically and populate it with data.  The first two columns are frozen, and I'm able to scroll left and right with the horizontal scroll bar.  Everything looks wonderful.  However, when I click on any column header to sort the data (Frozen, or Data columns); the horizontal scroll bar disappears and the columns off screen become inaccessible.   Let me know if I've done anything wrong, below you will find my code.  When I remove FrozenColumnsCount from the code, everything works fine.  However... I do need the first two columns to be frozen.

Thanks,
Michael

protected void Page_Init(object source, System.EventArgs e)
{
    DefineGridStructure();
}
 
private void DefineGridStructure()
{
    var someTable = GetSomeTable();
 
    RadGrid radGrid1 = new RadGrid();
     
    radGrid1.ItemCommand += new GridCommandEventHandler(radGrid1_ItemCommand);
 
    radGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
    radGrid1.AutoGenerateColumns = false;
    radGrid1.ShowStatusBar = true;
    radGrid1.MasterTableView.DataKeyNames = new string[] { "Id" };
    radGrid1.DataSourceID = "ObjectDataSource1";
    radGrid1.AllowSorting = true;
    radGrid1.AllowPaging = true;
    radGrid1.PageSize = 50;
    radGrid1.Width = new Unit(99, UnitType.Percentage);
 
    radGrid1.MasterTableView.TableLayout = GridTableLayout.Fixed;
    radGrid1.ClientSettings.Scrolling.AllowScroll = true;
    radGrid1.ClientSettings.Scrolling.UseStaticHeaders = true;
    radGrid1.ClientSettings.Scrolling.FrozenColumnsCount = 2;
    radGrid1.ClientSettings.Scrolling.SaveScrollPosition = true;
     
 
    GridBoundColumn displayFrozenColumn = new GridBoundColumn();           
    displayFrozenColumn .DataField = "Name";
    displayFrozenColumn .HeaderText = "Name";
    displayFrozenColumn .HeaderStyle.Width = new Unit(200, UnitType.Pixel);
    displayFrozenColumn .ItemStyle.Font.Bold = true;                   
    radGrid1.MasterTableView.Columns.Add(displayFrozenColumn );
 
    displayFrozenColumn = new GridBoundColumn();               
    displayFrozenColumn .DataField = "Id";
    displayFrozenColumn .HeaderText = "Id";
    displayFrozenColumn .HeaderStyle.Width = new Unit(50, UnitType.Pixel);
    displayFrozenColumn .ItemStyle.Font.Bold = true;           
    radGrid1.MasterTableView.Columns.Add(displayFrozenColumn );
 
    foreach (DataColumn dataColumn in someTable.Columns)
    {
        if (dataColumn.ColumnName == "Name" || dataColumn.ColumnName == "Id")
            continue;
 
        GridButtonColumnWithFilteringSorting displayDataColumn = new GridButtonColumnWithFilteringSorting();               
        displayDataColumn .HeaderText = dataColumn.ColumnName;
        displayDataColumn .DataTextField = dataColumn.ColumnName;
        displayDataColumn .SortExpression = dataColumn.ColumnName;
        displayDataColumn .UniqueName = dataColumn.ColumnName;
        displayDataColumn .HeaderStyle.Width = new Unit(75, UnitType.Pixel);              
 
        radGrid1.MasterTableView.Columns.Add(displayDataColumn );
    }
     
 
    PlaceHolder placeHolder1 = (PlaceHolder)RadPanelBar1.FindItemByValue("PanelItem1").FindControl("PlaceHolder1");
    placeHolder1.Controls.Add( radGrid1 );
}
Pavlina
Telerik team
 answered on 03 Aug 2011
1 answer
107 views
I have a RadPanelBar that is databound.  Based on the values contained in the datasource, certain controls will be added to each child item.  Controls such as dropdown, listbox, multiple labels, textboxes and buttons are added.  On clicking a button or dropdown selectedindexchanged the controls disappear.  I have tried creating dynamic controls in PanelBar_prerender event and they are created appropriately and displayed on the initial page_load,

On the subsequent pages, unless I do a PanelBar.DataBind, I get weird situation where the first child item disappears and the last child item repeats.  On the next postback what was now the first child item will disappear and the last child item will now appear three times.

I have seen the example where panelitems are created in the page_load event.  However, what I have is a databound PanelBar.  I have seen references to "templateneeded" event, but none of the links seem to work to get to that article.

Can you provide an example of where controls are added dynamically to child panelitem when the PanelBar itself is databound and the dynamically created controls need to postback.

Thanks
Sumith
Kate
Telerik team
 answered on 03 Aug 2011
2 answers
169 views
I have 2 List Boxes. One with State the other with City. The City Listbox has Checkboxes. 
I am trying to find a way to have all the checkboxes 'checked' as the default when the page opens with a State Default selected.
For example ... When the page opens the State Selected Value is 'WA' and all the cities in Washington are displayed with checkboxes. Works fine.
But I want them displayed with Checkboxes 'Checked'

I have tried the collection method:
If Not Page.IsPostBack Then
    rlbAreas.SelectedValue = "F50"
    Dim collection As IList(Of RadListBoxItem) = rlbSubAreas.Items
    For Each item As RadListBoxItem In Collection
       item.Checked = True
   
Next End If

But the collection at this point returns 0 items. I tried rebinding the rlbSubAreas listbox but that didn't work either.

Anyone?
Thad
Top achievements
Rank 2
 answered on 03 Aug 2011
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?