Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
259 views
After converting the classic tree to promethius, my old custom skin doesnt work.  The promethius documentation seems to be a mix of old and new information, so its unclear where to put custom tree view skins. 

I tried EnableEmbeddedSkins=false, but I still see no requests going to any css files, just WebResource.axd. 
Nikolay
Telerik team
 answered on 14 Feb 2008
2 answers
126 views
Hi there,

I have a RadTreeView inside a user control with a custom skin.  The base behavior is to expand the nodes on a double click, but I want it to be on a single click to expand, so i followed this help item at : http://www.telerik.com/help/radcontrols/prometheus/tree_expand_onsingleclick.html but it doesnt seem like the BeforeClientClick event is firing.  Here is my markup: 

<%

@ Control Language="C#" AutoEventWireup="true" CodeBehind="MainMenu.ascx.cs" Inherits="website.MainMenu" %>

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<

script type="text/javascript" language="javascript">

function ClickHandler(node)

{

if(node.Nodes.length > 0)

{

node.Toggle();

}

}

</

script>

<div id="sidenav">

<div class="sidetop"></div>

<telerik:RadTreeView ID="RadTVTestMenu" runat="server" onnodedatabound="RadTVTestMenu_NodeDataBound" Skin="wired" EnableEmbeddedSkins="false" BeforeClientClick="ClickHandler">

<CollapseAnimation Type="OutQuint" Duration="100"></CollapseAnimation>

<ExpandAnimation Type="OutQuart" Duration="100"></ExpandAnimation>

</telerik:RadTreeView>

<div class="sidebottom"></div>

</

div>

Sharbel Lutfallah
Top achievements
Rank 1
 answered on 13 Feb 2008
1 answer
208 views
Hey,
I am using SelfReferencing in "Prometheus" grid
If there is no child record in the grid it shows empty row with "No child records to display." i want to remove these rows can you please help me out..


i have seen one link for that and its not working for me..
undefined value in RowObject

http://www.telerik.com/help/radgrid/v3_NET2/grdHideExpandCollapseImagesWhenNoRecordsClientLoadMode.html

<script type="text/javascript">

function RowCreated(rowObject)

{

//alert(rowObject.Type);

if(rowObject.ItemType == "NestedView")

{

 

var nestedTable = rowObject.Control.cells[1].childNodes[0];

if(nestedTable != null && nestedTable.tBodies[0].rows.length == 1 && nestedTable.innerHTML.indexOf("No child records to display.") != -1)

{

var parentRow = this.Control.rows[rowObject.Control.rowIndex - 1];

parentRow.cells[0].childNodes[0].style.display =

"none";

rowObject.Control.style.display =

"none";

}

}

}

</script>

thanks

 

HHH
Top achievements
Rank 1
 answered on 13 Feb 2008
2 answers
210 views
Hello,

I have two questions:

1) I recall reading somewhere that changes were planned to help with aligning columns in hierarchical grids.  Is there an updated sample or article on how to accomplish this?

2) I want to suppress the headings for the 2nd and 3rd levels of a hierarchical grid.  Is this different under prometheus or do I have to do this using the ItemCreated event?

Thanks in advance,
Jim
HHH
Top achievements
Rank 1
 answered on 13 Feb 2008
1 answer
219 views
Hello,
I have a button in a template column. When clicked I would like to show the contents of the EditItemTemplate. When clicked again, I'd like to hide the contents. Can someone instruct me on how to achieve this? Also, how can I remove the Update and Cancel link buttons that appear automatically in the EditItemTemplate?

Thank you!
Vinny
Top achievements
Rank 1
 answered on 13 Feb 2008
7 answers
412 views
I have a RadGrid with a column that uses a ComboBox in edit mode. I have it defined as follows:

<telerik:GridTemplateColumn UniqueName="den_ldr_id" HeaderText="Den Leader">  
    <ItemStyle Width="175" /> 
    <ItemTemplate> 
        <asp:Label Width="170" CssClass="gridDropDown" runat="server" ID="lbl_den_ldr_id" Text='<%#DataBinder.Eval(Container.DataItem, "adult_nm")%>' /> 
    </ItemTemplate> 
    <EditItemTemplate> 
        <telerik:RadComboBox Width="170" MarkFirstMatch="true" Skin="scSkin" EnableEmbeddedSkins="false" DataTextField="adult_nm" DataValueField="adult_id" DataSourceID="DenLeaderDataSource" ID="dd_den_ldr_id" runat="server" SelectedValue='<%#Bind("den_ldr_id") %>' /> 
    </EditItemTemplate> 
</telerik:GridTemplateColumn> 

I'm setting the DataSource in my code behind:

DenLeaderDataSource.ConnectionString = ConfigurationManager.ConnectionStrings("LocalSqlServer").ToString  
DenLeaderDataSource.SelectCommand = "SELECT [sc_adult].[adult_id], [sc_adult].[adult_fnm] + ' ' + [sc_adult].[adult_lnm] AS [adult_nm] FROM [sc_adult] WHERE [sc_adult].[unit_id] = " & Profile.UnitID 

Currently in display mode on the grid, if the value is null, it displays the first item in the ComboBox. And of course when you go into edit mode on the grid, it has the first item in the list selected.

What I would like to do is if the value is null, display a blank field in display mode on the grid, and when in edit mode, display a "Please Select a Value" text with a specific value that I can check to avoid writing anything to the database if they don't select a value. I could also handle having the ComboBox show a blank when going into edit mode instead of  a "Please Select a Value".

Can someone point me in the right direction for this? Thanks
Philip
Top achievements
Rank 1
 answered on 13 Feb 2008
2 answers
157 views
I have a pagerstyle that I set its fontsize = 12

this works untill there are enough elements to require paging, at which point prometheus stops outputing the inline style tag.

<

PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" AlwaysVisible="true" PagerTextFormat="Showing {2} - {3} of {5}: {4}" Font-Size="12px" Font-Bold="true" FirstPageImageUrl="/images/blank.gif" NextPageImageUrl="/images/blank.gif" LastPageImageUrl="/images/blank.gif" PrevPageImageUrl="/images/blank.gif"/>

in the source code I get this output for showing the pager, but only 1 page:
  <tr class="GridPager_Vista" style="font-size:12px;font-weight:bold;">
   <td colspan="13"><div class="PagerLeft_Vista">
    Showing 1 - 5 of 5: <span><img title="Previous Pages" src="/images/blank.gif" originalAttribute="src" originalPath="/images/blank.gif" originalAttribute="src" originalPath="/images/blank.gif" alt="Previous Pages" style="border-width:0px;" /></span>&nbsp;<span>1</span>&nbsp;<img title="Next Page" src="/images/blank.gif" originalAttribute="src" originalPath="/images/blank.gif" originalAttribute="src" originalPath="/images/blank.gif" alt="Next Page" style="border-width:0px;" />
   </div><div class="PagerRight_Vista">
    
   </div></td>
  </tr>

then when i get enough elements to page the source code is this:

  <tr class="GridPager_Vista">
   <td colspan="13"><div class="PagerLeft_Vista">
    Showing 1 - 2 of 5: <span><img title="Previous Pages" src="/images/blank.gif" originalAttribute="src" originalPath="/images/blank.gif" originalAttribute="src" originalPath="/images/blank.gif" alt="Previous Pages" style="border-width:0px;" /></span>&nbsp;<span>1</span>&nbsp;<a href="javascript:__doPostBack('ctl00$ctl00$Columns$PageCode$PageCode$RadGrid1$ctl00$ctl02$ctl00$ctl04','')">2</a>&nbsp;<a href="javascript:__doPostBack('ctl00$ctl00$Columns$PageCode$PageCode$RadGrid1$ctl00$ctl02$ctl00$ctl05','')">3</a>&nbsp;&nbsp;<a title="Next Page" originalAttribute="href" originalPath="javascript:__doPostBack('ctl00$ctl00$Columns$PageCode$PageCode$RadGrid1$ctl00$ctl02$ctl00$ctl04','')">2</a>&nbsp;<a href="javascript:__doPostBack('ctl00$ctl00$Columns$PageCode$PageCode$RadGrid1$ctl00$ctl02$ctl00$ctl05','')">3</a>&nbsp;&nbsp;<a title="Next Page" originalAttribute="href" originalPath="javascript:__doPostBack('ctl00$ctl00$Columns$PageCode$PageCode$RadGrid1$ctl00$ctl02$ctl00$ctl04','')">2</a>&nbsp;<a href="javascript:__doPostBack('ctl00$ctl00$Columns$PageCode$PageCode$RadGrid1$ctl00$ctl02$ctl00$ctl05','')">3</a>&nbsp;&nbsp;<a title="Next Page" originalAttribute="href" originalPath="javascript:__doPostBack('ctl00$ctl00$Columns$PageCode$PageCode$RadGrid1$ctl00$ctl02$ctl00$ctl05','')">3</a>&nbsp;&nbsp;<a title="Next Page" href="javascript:__doPostBack('ctl00$ctl00$Columns$PageCode$PageCode$RadGrid1$ctl00$ctl02$ctl00$ctl06','')"><img src="/images/blank.gif" originalAttribute="href" originalPath="javascript:__doPostBack('ctl00$ctl00$Columns$PageCode$PageCode$RadGrid1$ctl00$ctl02$ctl00$ctl06','')"><img src="/images/blank.gif" originalAttribute="href" originalPath="javascript:__doPostBack('ctl00$ctl00$Columns$PageCode$PageCode$RadGrid1$ctl00$ctl02$ctl00$ctl06','')"><img src="/images/blank.gif" originalAttribute="src" originalPath="/images/blank.gif" alt="Next Page" style="border-width:0px;" /></a>
   </div><div class="PagerRight_Vista">
    
   </div></td>
  </tr>

*************
Also, is there a way to disable the pager icons without resorting to blank images?

John
Top achievements
Rank 1
 answered on 13 Feb 2008
2 answers
211 views
Hello,

With the old RadEditor, we had a custom link manager that we built. We used some of your internal functions to make things happen (per your advice), but now it seems that some of the functionality that we used to accomplish the task has either changed or is no longer available. We've converted from using ASPX pages to ASCX pages throughout, and up until this custom dialog have not had issues. We have a basic working custom link manager in place, but there is certain functionality that we're missing. Code that we used in the past that we've been unable to reproduce in the new RadEditor includes:

   var link = RadEditorNamespace.GetSelectionLinkArgument(editor);
   if (link.realLinkObject && link.realLinkObject.style && link.realLinkObject.style.cssText)
   {
        link.style = link.realLinkObject.style.cssText;
   }

We used this to get the currently selected link from the content area. What can we call in the new editor to accomplish the same thing? The new RadEditor's built-in Hyperlink Manager does this functionality still, so there must be a function that we can still call. Also:

function callBackFunctionPtr(returnValue, arg2)
{
   if (returnValue)
   {
      var originalFunctionToExecute = returnValue.realLinkObject == null
        ? RadEditorNamespace.radEditorCreateLink
        : RadEditorNamespace.radEditorSetLinkProperties;
      originalFunctionToExecute(returnValue, arg2);
   }
}

This was our old callback function that received back from the RadWindow:

  function insertLink()
  {
   var returnValue =
   {
    realLinkObject:dialogArguments.realLinkObject,
    href:document.linkform.oHref.value,
    target:document.linkform.oTarget.value,
    style:document.linkform.oStyle.value,
    className:document.linkform.oClass.value,
    name:document.linkform.oName.value
   };
   CloseDlg(returnValue);
  }

This is the other missing piece of the puzzle. How can we now take the new hyperlink parameters and create a new hyperlink, or replace the parameters of the one that was currently selected? We've managed to put together:

Telerik.Web.UI.Editor.CommandList["InternalLink"] = function(commandName, editor, args)
{
   var myCallbackFunction = function(sender, args)
   {
       if (args)
       {
       editor.setFocus();
       editor.get_document().execCommand("createlink", false, args.href);
       }
   }
   editor.showDialog("InternalLink", {}, myCallbackFunction);
}

We do not, however, know how to pass the hyperlink parameters to "createlink" to properly form the new hyperlink (or update the currently selected one). This may not even be the function that is called by the built-in Hyperlink Manager upon return, but it's all we've been able to dig up in the documentation/forums.
Rumen
Telerik team
 answered on 13 Feb 2008
1 answer
245 views
I have a ReadOnly RadTextBox with empty text value. I set its value using Javascript from the client side. When the page is submitted, the server gets empty value in the text box. The javascript value is lost.

Is there anyway, to get this value?

I saw other threads talk about similar problem, but all of which said that telerik could not reproduce the behavior. Can you try this one?
-Piyush
Pavel
Telerik team
 answered on 13 Feb 2008
4 answers
139 views
I realize that the reason my radwindow loads every time the page is reloaded is because I have the visibleonpageload property set to true, but I don't want this behavior to happen.  I have looked at a similar post located at http://www.telerik.com/community/forums/thread/b311D-mhctd.aspx, but I need a more concrete example of how you can prevent the window from popping up every single time the page is reloaded.  I want the window to load up only when the user clicks on the appropriate asp:linkbutton control.

Thanks,
Dave
Svetlina Anati
Telerik team
 answered on 13 Feb 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?