Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
166 views
In my RadGrid I have a template column in which I want a text box for the Edit Item Template, and a drop down list for the Insert Item template.  I know this seems a bit odd - but I'm just wondering if it's possible?  I've spent too much time trying to get it to work.  No matter what I do, the Edit Item template overrides the Insert Item Template.

<telerik:GridTemplateColumn
                  DataField="DocDesc"
                  FilterControlAltText="Filter column column" HeaderText="Document Name"
                  UniqueName="DocList">
                    <EditItemTemplate>
                    <asp:TextBox ID="DocDescTextBox" enabled = "false" runat="server" Text='<%# Bind("DocDesc") %>'></asp:TextBox>                      
                         
                     </EditItemTemplate>
                       
                       
                    <ItemTemplate>
                 <asp:Label ID="DocDescLabel" runat="server" Text='<%# Eval("DocDesc") %>'></asp:Label>
      
                    </ItemTemplate>
                    <InsertItemTemplate>
                        <telerik:RadComboBox ID="RadDocList" Enabled="true" runat="server"
                                  DataSourceID="sqlGetDocList"
                                  DataTextField="DocDesc"
                                  DataValueField="DocNum">
                        </telerik:RadComboBox>
                    </InsertItemTemplate>
             
              </telerik:GridTemplateColumn>
Radoslav
Telerik team
 answered on 21 Apr 2011
1 answer
67 views
Hi
I need to set a Custom Aggregation for a Column. but I do not know how to get grid items placed in each group when calculating aggregated value! in grouping I want my aggregation function only calculate value for items placed in its own current group!

How can I do this ?
Shinu
Top achievements
Rank 2
 answered on 21 Apr 2011
1 answer
88 views
I have my alert button showing, however after the OK is clicked it isn't redirecting the page.

ASPX:

 

<AlertTemplate>

 

 

<div class="windowpopup radalert">

 

 

<div class="dialogtext" style="text-align: center;">

 

{1}

 

</div>

 

 

<div>

 

 

<a onclick="$find('{0}').close(); window.location.href='home.aspx';" class="radwindowbutton"

 

 

href="javascript:void(0);">

 

 

<span class="outerspan">

 

 

<span class="innerspan" style="text-align: center;">##LOC[OK]##</span>

 

 

</span>

 

 

</a>

 

 

</div>

 

 

</div>

 

 

</AlertTemplate>

 

 

<Windows>

 

 

<telerik:RadWindow ID="wdwEmail" runat="server" EnableEmbeddedSkins="False" Skin="DMID"

 

 

Title="" Height="320px" Left="150px" Modal="true" ReloadOnShow="true" Width="300px"

 

 

ShowContentDuringLoad="false">

 

 

</telerik:RadWindow>

 

 

</Windows>

 

 

</telerik:RadWindowManager>


Code Behind:

 

 

 

protected void btnSubmit_Click(object sender, EventArgs e)

 

 

{

 

nBus.SendOrderSubmitNotification(uProfile, oProfile, pProfiles, bList);

 

 

ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "<script type='text/javascript'>Sys.Application.add_load(function(){radalert('Your Order has been saved');})</script>", false);

 

{

Georgi Tunev
Telerik team
 answered on 21 Apr 2011
3 answers
123 views
Hello Sir/Mam

I'm using 4 radtextbox which are invisible(visible=false). OnClientItemClicking of contextmenu of form i'm tring to store radwindowbounds(x,y,height,width) into radtextbox--- but it show error as  Object doesn't support this property or method

Code :-
  • Javascript Code
            function OnClientItemClicking(sender, eventArgs) {
           
                $find("<%= x.ClientID %>").SetValue(GetRadWindow().getWindowBounds().x);
                $find("<%= y.ClientID %>").SetValue(GetRadWindow().getWindowBounds().y);
                $find("<%= width.ClientID %>").SetValue(GetRadWindow().getWindowBounds().width);
                $find("<%= height.ClientID %>").SetValue(GetRadWindow().getWindowBounds().height);         
     
            }
            
  • ASP Code
 <telerik:RadTextBox ID="x" runat="server" visible="false"   />
 <telerik:RadTextBox ID="y" runat="server" visible="false"  />
 <telerik:RadTextBox ID="width" runat="server" visible="false"   />
 <telerik:RadTextBox ID="height" runat="server"  visible="trfalseue"  />

<Telerik:RadContextMenu id="SavePersonalSetting"  runat="server"  OnClientItemClicking="OnClientItemClicking">
             <Targets>
                    <Telerik:ContextMenuTagNameTarget TagName="form" />
             </Targets>
             <Items>
                 <Telerik:RadMenuItem Text="Save Personal Setting" Value="SPS" />
            </Items>
  </Telerik:RadContextMenu> 

Please help in this regard ,Any help will be greatly appreciated..............


           

Sunil
Top achievements
Rank 1
 answered on 21 Apr 2011
1 answer
50 views
Hi,
 We're currently on version 8.5.0.0 and have noticed a problem when enabling the Rad Editor for List Items feature. Specifically on a Wiki library, we can create the wiki article and save as normal. The problem we have is that any further editing of the wiki article results in the changes not being saved back to sharepoint whatsoever.

 Has this been experienced before and if so, what is the solution? This occurs on the default tools files as well as customised tools files. The editor works fine in any other area used.

Thanks,
Jason.
Stanimir
Telerik team
 answered on 21 Apr 2011
5 answers
558 views
In a typical situation where you have a "Delete" button on the toolbar and the user presses it, you would first want to prompt the user whether they really want to perform the delete. If the user declines, the deletion is canceled. If they choose to delete, code on the server-side needs to be executed to carry out the delete. The toolbar does support the ButtonClick event. Is it possible to call this method from within a javascript function (where my prompting is carried out). Until now I have used the ajaxRequest method to send commands back to the server but I find this kind of ugly. It would be nice to use the method that is associated with the toolbar because some toolbar buttons will cause this event to be executed without going through a javascript function.
Kate
Telerik team
 answered on 21 Apr 2011
2 answers
117 views
Hi I have a aspx page with a radGrid, i use edit mdoe to edit records.
when i click on a ButtobClumn of my grid i redirect user to another page "detailPage.aspx" and the page show the user detailed record.
I need to implement an EditButton in the "detailPage.aspx" to edit the current record. ? how can i do it ?

1) MainPage.aspx
     Grid -> Click on record with id 1 -> Redirect to detailPage.aspx (show detail of record 1)
2) detailPage.aspx (show detail for record 1)
     EditButton->redirect back to MainPage, with grid in edit mode for record with Id 1.

How can i implement edit button in detailPage ?
Francesco Vivaldi
Top achievements
Rank 1
 answered on 21 Apr 2011
2 answers
52 views
Hi,

First, let me explain the setup:
  • I am using the most recent 2011 version of Telerik Web.UI
  • The page is being developed for IE7 (though the same error occurs in Firefox 3.6).
  • In the code-behind, I am dynamically setting the OffsetY property of all GroupSettings objects so that all submenus fly-out at a consistent location (i.e., aligned with the top of the root menu, rather than lined up with the menu item that spawned them). 
  • I am dynamically setting the Height property as well, so that all submenus display at a consistent height. 
  • I have EnableAutoScroll and EnableScreenBoundaryDetection both set to false.

The problem occurs whenever a height is explicitly set for submenu groups.  It occurs both when it is set via each subgroup's GroupSettings.Height property (as I am doing), and when it is set via the DefaultGroupSettings-Height property. 

What happens is, whenever the browser is shrunk so that the menus would run off the page, the menus are automatically shrunk so as to fit on the page and scrollbars are added.  This is despite EnableAutoScroll and EnableScreenBoundaryDetection being false.  If a height is not explicitly set, this does not occur, and the menus simply go off the screen as expected.  What makes this issue worse is that if the browser is then enlarged so that the menus would no longer be going off the screen, the menus stay shrunk.

What's happening appears to be that, if and only if a height is explicitly assigned to a submenu group, some sort of screen boundary detection kicks in and resets the height of the menu so that it will fit on the screen.  Next, because the height of the menu is now too small to fit all of the items, scroll bars are automatically added.  When the browser window is then expanded, the height is never set back to what it originally was, and stays small with scroll bars.

I've attached a few images to show what I am talking about.

Is this indeed a bug?  It seems like it can't possibly be the intended functionality (edge boundary detection is occurring and scroll bars are automatically being added despite both being told not to do so).  Am I just missing some other parameter that would stop this from happening?

If this is a bug, is there any good way to work around this until it is fixed?  I have attempted, amongst other things, to reset the height of the submenu group on the client side in the OnClientItemOpening event using eventArgs.get_item().get_groupSettings().set_height(), but it appears as if altering this value does not have any affect once the menu has been rendered.  I've even gone so far as trying to work outside the API, using the eventArgs.get_item().get_element() function to access the actual DOM element, then using JavaScript to access the child DIV being used to represent the subgroup and manually setting its style element.  However, with the way that items are dynamically added and removed to the page, this has proven unreliable.

Lastly, is there anywhere where I can access a complete client-side API?  The best I've found in the help manuals is this page, which itself says it only has "the most important methods", and doesn't even contain things like item().get_groupSettings().  Further, I've seen in these help forums the use of other attributes, like item._slide, which as far as I can tell are undocumented.

I really appreciate any help you can provide!

Thanks,
Kevin
Kate
Telerik team
 answered on 21 Apr 2011
1 answer
91 views
Hello Telerik,

I want to set a margin between two docks, now the first dock's bottom is too close to the second dock's top.I try to get it with css like this:

.RadDock .rdBottom{border-bottom:10px solid #fff; }

,but it doesn't work well, after collapse/expand it, the magin size was changed.How should I do? thanks
Big Q
Top achievements
Rank 1
 answered on 21 Apr 2011
2 answers
92 views
I have a situation similat to that in the "Copy A Record" post where I want to duplicate a records. But here is the hook, I want to take the selected record's data and populate the EditFormSettings FormTemplate without creating a new record until the user adds it. For example, I have a table with flight information for multiple users and instead of having to retpye each record I want to use the previous record data.

My initial thought was to add a button to the row and on the click expand the FormTemplate and populate the data. Is that the only way or is there an easier way. Really don't feel like wasting time on a Friday afternoon!
Mira
Telerik team
 answered on 21 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?