Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
309 views
Inside my RadGrid Edit Form I have a checkbox that toggles other fields in the form Enabled property. Following advice posted in another thread involving using the OnItenDataBound and OnPreRender, I am able to accomplish this with no issues when in edit mode; however, the control collections are empty when in insert mode.

protected void Grid_ItemDataBound(object sender, GridItemEventArgs e)  
{  
  if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
  {  
     GridEditableItem item = e.Item as GridEditableItem;  
     CheckBox cb = (CheckBox)item["Toggler"].Controls[0];  
     cb.AutoPostBack = true;  
  }  
} 

protected void Grid_PreRender(object sender, System.EventArgs e)  
{  
   foreach (GridEditFormItem item in rgrdList.MasterTableView.GetItems(GridItemType.EditFormItem))  
   {  
     if (item.IsInEditMode)  
     {  
        bool isToggled = ((CheckBox)item["Toggler"].Controls[0]).Checked;  
        ((TextBox)item["TextItem1"].Controls[0]).Enabled = isToggled;  
        ((TextBox)item["TextItem2"].Controls[0]).Enabled = isToggled;  
        ((TextBox)item["TextItem3"].Controls[0]).Enabled = isToggled;  
     }    
   }  
} 

What am I missing? Any suggestions would be greatly appreciated.

Thank you,

Marlayna
Shinu
Top achievements
Rank 2
 answered on 05 Jul 2008
2 answers
179 views
I need to include a required field validator with the GridDropDownColumn .

I believe the only way to do this is to extend the functionality of the GridDropDownColumn.

Is there an example of this?


Thanks,
john
john
Top achievements
Rank 1
 answered on 05 Jul 2008
2 answers
73 views
Hi

I have a page containing about five RAD Editors layout one after another rows. The first editor works fine. The problem comes when i try to use the menu. The drop-down menu (like 'Real Font Size', 'BackColor') from other editors are not appearing in the right position. Those dropdown menus are appearing around the first Editor. The right-click-context-menu also facing the same problem. But the actions are reflected correctly on the respective Editor. Did anyone encountered this before? I would appreciate it if you can enlighten me on what the cause is and how the problem can be solved.


Thanks in advance,
zaw
Top achievements
Rank 2
 answered on 04 Jul 2008
2 answers
101 views
I'm keeping the sort order of the grid in the session and it maintains fine when you leave the page and come back. However, I cannot find anywhere that will let me manipulate the sort arrows, to re-indicate which column is being sorted.


How can I manipulate these arrows in code-behind?
Tom Underhill
Top achievements
Rank 1
 answered on 04 Jul 2008
0 answers
141 views
Hi
I use the RadPanelBar to display a simple menu which is fed by a sitemap datasource:
<telerik:RadPanelBar ID="RadPanelBarMenu" runat="server" DataSourceID="SiteMapDataSource" Width="200px" Font-Bold="True" Skin="Telerik">  
    <CollapseAnimation Duration="100" Type="None" /> 
    <ExpandAnimation Duration="100" Type="None" /> 
</telerik:RadPanelBar> 

Security trimming is enabled:
        <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">  
            <providers> 
                <add name="XmlSiteMapProvider" description="Default SiteMap provider." type="System.Web.XmlSiteMapProvider " siteMapFile="Web.sitemap" securityTrimmingEnabled="true"/>  
            </providers> 
        </siteMap> 
        <authentication mode="Forms">  
            <forms name=".SATAUTH" loginUrl="Login.aspx" protection="All" timeout="60" path="/" slidingExpiration="true" requireSSL="false" defaultUrl="Default.aspx"/>  
        </authentication> 
        <authorization> 
            <deny users="?"/>  
            <allow users="*"/>  
        </authorization> 

All menu items (sitemap nodes) are accessible to anyone. Only the last one called "Administration" should be invisible unless a person with administrator privileges is using the site.
<?xml version="1.0" encoding="utf-8" ?> 
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > 
 
  <siteMapNode url="Default.aspx" title="_Home" description="Home" roles="*">  
      
    <siteMapNode url="~/CaseManagement/CaseOverview.aspx" title="Data Input"  description="Case Management (Data input)" roles="*" /> 
 
    <siteMapNode url="" title="Reports" roles="*">  
      <siteMapNode url="~/Reports/ProvisionsReportFilter.aspx" title="Provisions Report"  description="Provisions Report" roles="*" /> 
      <siteMapNode url="~/Reports/DivisionalControllingReportFilter.aspx" title="Divisional Controlling Report"  description="Divisional Controlling Report" roles="*" /> 
      <siteMapNode url="~/Reports/FinancialReportFilter.aspx" title="Financial Report"  description="Financial Report" roles="*" /> 
      <siteMapNode url="~/Reports/OverviewReportFilter.aspx" title="Overview Report" description="Overview Report" roles="*" /> 
      <siteMapNode url="~/Reports/PPTPreparationReportFilter.aspx" title="PPT Preparation Report" description="PPT Preparation Report" roles="*" /> 
    </siteMapNode> 
 
    <siteMapNode url="" title="Info" roles="*">  
      <siteMapNode url="~/Info/CorporateStructure.aspx" title="Corporate Structure"  description="Corporate Structure" roles="*" /> 
      <siteMapNode url="~/Info/Currencies.aspx" title="Exchange Rates"  description="Supported Currencies and Exchange Rates" roles="*" /> 
      <siteMapNode url="~/Info/Plants.aspx" title="Plants"  description="List of Plants" roles="*" /> 
      <siteMapNode url="~/Info/Supplier.aspx" title="Supplier"  description="List of Supplier" roles="*" /> 
    </siteMapNode> 
 
    <siteMapNode url="" title="Administration" roles="Administrator">  
      <siteMapNode url="~/Administration/UserManager.aspx" title="User Manager"  description="User Manager" roles="Administrator" /> 
      <siteMapNode url="~/Administration/SupplierManager.aspx" title="Supplier Manager"  description="Supplier Manager" roles="Administrator" /> 
      <siteMapNode url="~/Administration/FinancialClosingManager.aspx" title="Financial Closing Manager"  description="Financial Closing Manager" roles="Administrator" /> 
      <siteMapNode url="~/Administration/SnapshotManager.aspx" title="Snapshot Manager"  description="Snapshot Manager" roles="Administrator" /> 
    </siteMapNode> 
 
  </siteMapNode> 
    
</siteMap> 
 

This mechanism actually does work. Except for one very annoying thing:
An Admin can actually see the Administration-menu item when he is on the default page. But once he clicks e.g. on any other item (e.g. Data Input or Report or their children), the Administration-item disappears.

Consequently, the user always has to go back to the default / home page in order to perform administrative tasks.

Any idea why the admin item disappears while using any other page?

Thanks

s.
scrut
Top achievements
Rank 1
 asked on 04 Jul 2008
7 answers
212 views
I am using Rad Editor - 7.1.1.0, skin = Office2007
I can not set the background color of the editor, It always takes the default color of the body style. How can I set that ? please help me, it is urjent.
Rumen
Telerik team
 answered on 04 Jul 2008
6 answers
113 views
I have a button inside a RadTooltip that when clicked does an ajax request. The RadAjaxLoadingPanel is set to appear over the button with these straighforward settings:

AJAXMan.AjaxSettings.AddAjaxSetting(this.Btn_AddNewEvent, this.ListView_Events);
AJAXMan.AjaxSettings.AddAjaxSetting(this.Btn_AddNewEvent, this.Btn_AddNewEvent, LoadingPanel1);

When I do not scroll down to open the RadTooltip, the LoadingPanel1 appears on top of the button like expected.

But when I scroll down to open the RadTooltip, the LoadingPanel1 appears completetly offset. I looks like it ignores the scroll offset completely.

What can I do?

Thanks,


Gabriel Beauchamp
Top achievements
Rank 2
 answered on 04 Jul 2008
3 answers
250 views
We have been using a RadGrid "classic" with AllowMultiRowSelection enabled and EnableDragToSelectRows enabled.  On this page, we also display a context menu.  If the user right-clicks while over the grid (to launch the context window), he/she can easily accidentally end up selecting rows in the grid at the same time. To deal with this, we have been using an onMouseDown handler which cancels the mouse down event if it is triggered by a right-click.

<script type="text/javascript"> 
 
function OnMouseDown(e) 
{ 
    //  To protect the context menu, kill right-click drag'n'select 
    //  by stopping the mouse-down event if the right button is 
    //  the one triggering it.  Context menus are launched by the 
    //  mouse-up event.  Hooray. 
    if ( e.button == 2 ) 
    { 
        e.cancelBubble = true; 
        e.returnValue = false; 
        return false; 
    } 
} 
</script> 
 

However, with RadGrid "prometheus", this no longer works.  No matter what, the selection drag begins.  This is quite a "drag" -- I want to allow drag-to-select only with a left-button click, so that right-clicks will be exclusively available for displaying my context menu.

Is there some grid setting, or other workaround, by which I can prevent right-click drag-to-select?  I tried to leverage the OnRowContextMenu handler, but that gets called after-the-fact.


:(
Rosen
Telerik team
 answered on 04 Jul 2008
3 answers
126 views
Hi

i need to remove some filter menu items for a specific column at server side (all other columns should have the default ones)
Sebastian
Telerik team
 answered on 04 Jul 2008
8 answers
220 views
Hi All,

I've had success with my usage of the RadControls for ASP.NET AJAX (4.0) so far, and I'm optimistic that will continue.  I'm looking for a how-to pointer or at least some guidance to avoid going down some dead ends.  Essentially, I want to produce something that resembles this:

http://www.telerik.com/demos/aspnet/prometheus/Grid/Examples/Hierarchy/DeclarativeRelations/DefaultCS.aspx

Using a hypothetical real-estate application, the essential behaviors would be:

The main RadGrid table displays summary rows about available real-estate, for example:

Price   Sq. Footage   Rooms   Baths   Taxes   ...   ...   ...

Then for each row, I'd like to expand it inline and have 3 or 4 fixed (this is what differs from the linked example above)  detail views, for example:

Price   Sq. Footage   Rooms   Baths   Taxes   ...   ...   ...
house row info 1
Bathrooms
Kitchen
Bedrooms
Yard Features

Then each of those detail areas (Bathrooms, Kitchen, etc.) could be further expanded:

Bathrooms
  Bathroom   Shower   Tub   Sinks   Sq. Footage
  1                1            0        2         300
  2                1            1        1         325

Kitchen
  Appliance  Included?  Age  Other
  Fridge        Y             3       Kenmore
  Stove         Y             3       Gas stove
.
.
.

The summary objects contain properties which themselves are collections of elements, with headers and 0 or more rows, i.e., the Kitchen property is a collection of Kitchen objects, which has Kitchen[0].Appliance, Kitchen[0].Included, etc.

Any suggestions on approaching this would be greatly appreciated.

Thank you,
Tim


Sebastian
Telerik team
 answered on 04 Jul 2008
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?