Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
103 views
I have an issue that hopefully you can help me with.  I have a search page for users.  Do a search and a user or list of users is returned.
Double click and a control is opened in a modal window.

In this control I have a formview and a radgrid:

<FormView>
    Details on the user which was selected (name, email, etc)
</FormView>
<RadGrid>
    A list of security groups in which the user can be added/removed from
</RadGrid>

Note:  two different datasources are used to populate the formview and radgrid.
           the radgrid is in "editAllMode"

My issue is when I perform an update.  The "update" button is in the formview, and triggers an event in which I can update the personal info of the user based on this method firing...."FormView_Updating".  Args are (object sender, WLPItemUpdatingEventArgs e).  I am using "e" to get the updated data for the formview.  Now after the personal data is updated (which works fine), I want to make a call to update the user's security groups by
triggering in code the RadGrid's "nameOfGrid_UpdateAllCommand(object sender, UpdateAllCommandEventArgs e)" from inside the "Formview_Updating" event.

Here is my issue. I am not sure how fire the event appropriately.  I can use "Grid.OnUpdateAllCommand"(takes 2 args, sender and UpdateAllCommandEventArgs) however I am unable to pass anything valid for the "UpdateAllCommandEventArgs" argument, which I need to see what groups have been selected for the user.  Any ideas how i can ?

Thanks.
Marin
Telerik team
 answered on 05 Mar 2012
1 answer
200 views

Hi,

Below I have given code of user control which I used multiple times on single page.But my problem is that I got null values in HandleScrolling() function when I moved grid scroll down to bottom.
I have placed Radscriptmanager on main .aspx page.
And one more important thing is I have made this user control's DLL and used in other project by adding reference of that usercontrol's dll.




<%@ Control Language="C#" ClassName="Acme.MyTestUC" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace=" System.Reflection" %>

<script runat="server">
   
    protected void Page_Load(object sender, EventArgs e)
    {
        manager1 = RadAjaxManager.GetCurrent(this.Page);
        manager1.AjaxSettings.AddAjaxSetting(manager1, RadGrid2);
        manager1.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(manager1_AjaxRequest);
        
 

    }

    void manager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
    {
        RadGrid2.PageSize += 15;
        RadGrid2.Rebind();
    }
    RadAjaxManager manager1;
   
   
</script>

<!-- content start -->
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
            <!--
        function HandleScrolling(e) {
          
            var grid = $find("<%=RadGrid2.ClientID %>");

            //alert(grid.hasOwnProperty());

                        var scrollArea = document.getElementById("<%= RadGrid2.ClientID %>" + "_GridData");

            if (IsScrolledToBottom(scrollArea)) {
                var currentlyDisplayedRecords = grid.get_masterTableView().get_pageSize() * (grid.get_masterTableView().get_currentPageIndex() + 1);

                //if the presently visible items are less than the entire source records count
                //trigger an ajax request to increase them
                if (currentlyDisplayedRecords < 100) {
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("LoadMoreRecords");
                }
            }
        }
        //this method calculates whether you have reached the bottom when dragging the vertical grid scroll
        function IsScrolledToBottom(scrollArea) {
            var currentPosition = scrollArea.scrollTop + scrollArea.clientHeight;
            return currentPosition == scrollArea.scrollHeight;
        }
            -->
    </script>
</telerik:RadCodeBlock>

 

<telerik:RadAjaxManagerProxy  id="RadAjaxManager1" runat="server"> 
        <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> 
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel2"></telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
        </AjaxSettings>
</telerik:RadAjaxManagerProxy >

<telerik:RadGrid ID="RadGrid2" AllowSorting="True"
    runat="server" AllowPaging="true" Width="97%" PageSize="15" GridLines="Vertical">
    <PagerStyle Visible="false" />
    <MasterTableView TableLayout="Fixed" />
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
        <ClientEvents OnScroll="HandleScrolling" />
    </ClientSettings>
</telerik:RadGrid>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
</telerik:RadAjaxLoadingPanel>
<br />


Thanks in advance for any help.
Regards,
Satyajit Kadam.

Andrey
Telerik team
 answered on 05 Mar 2012
1 answer
189 views
Hi all,

How do I create a ToggleStates collection for a dynamic created ToggleButton?

I want these 2  comined from codebehind:

        Dim radButton1 As New RadButton()
        radButton1.ButtonType = RadButtonType.ToggleButton
        radButton1.ToggleType = ButtonToggleType.CheckBox
        radButton1.AutoPostback = False
        
        '<ToggleStates>
                        '<telerik:RadButtonToggleState ImageUrl="img/play/play.png" HoveredImageUrl="img/play/playHov.png"
                           'Text="Play" Selected="true" />
                        '<telerik:RadButtonToggleState ImageUrl="img/play/pause.png" HoveredImageUrl="img/play/pauseHov.png"
                            'Text="Pause" />
                    '</ToggleStates>

Thanks,
Marc
Kevin
Top achievements
Rank 2
 answered on 05 Mar 2012
8 answers
356 views
Hi,

I have a radgrid with some columns, In the code-behind i want to add another header on top of the existing header with column spans.
Where should i add this functionality, in prerender or itemcreated?
How to add the desired header.

Thanks
Babu
Veli
Telerik team
 answered on 05 Mar 2012
3 answers
249 views

I have a radgrid with <Selecting AllowRowSelect="True" />. the radgrid is inside a radwindow. The radwindow contain a two buttons ("Select" and "Cancel") other than this radgrid. What we do is select a row in the radgrid and either click "Select" or "Cancel" button. Am sharing my radwindow here...

 

<div class="RadModalMainDiv">
    <div>
          <p> Help text to go here....</p>
       </div>
        <div class="divStandardTextButtonList">
       <asp:Button ID="btnObservationsTextSelect" runat="server" Text="Select" CssClass="btnStandardText"
                                                            OnClientClick="return ObservationStandardText_Confirm()" />
        <asp:Button ID="btnObservationsTextCancel" runat="server" Text="Cancel" CssClass="btnStandardText" />
        </div>
         <asp:Panel ID="pnl1" runat="server">
              <div>
                    <telerik:RadGrid ID="radGdObservationsText" runat="server" AllowPaging="True" AllowSorting="False"
                                                                AutoGenerateColumns="False" EnableEmbeddedSkins="false" GridLines="None" PageSize="10" Width="100%">
                            <MasterTableView CommandItemDisplay="None" Name="ParentGrid">
                                 <Columns>
                                            <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn">
                                              <HeaderStyle HorizontalAlign="Center" Width="23px" />
                                               </telerik:GridClientSelectColumn>
                                                <telerik:GridBoundColumn DataField="description" HeaderText="Observation description"
                                                   Visible="true">
                                                 </telerik:GridBoundColumn>
                                  </Columns>
                             </MasterTableView>
                             <PagerStyle Mode="NextPrevAndNumeric" />
                              <ClientSettings>
                                   <Selecting AllowRowSelect="True" />
                                    <ClientEvents OnRowSelected="SetObservationStandardText" OnRowDeselected="SetObservationStandardText" />
                                   </ClientSettings>
                </telerik:RadGrid>
    </div>
     </asp:Panel>
</div>

 

My issue is when i select a row from the radgrid, click 'select/cancel' the reopens the radwindow, the row in the radgrid remains selected. I need to de-select all the rows while reopening the radwindow. Binding of the grid is done in server side in the radGdObservationsText_NeedDataSource event. Can this be invoked using javascript? Or can you suggest any client side event of radgrid where i can de-select the rows?
Thanks for all help in prior.

 

 


Casey
Top achievements
Rank 1
 answered on 05 Mar 2012
1 answer
135 views
Is it possible to set the Indeterminate state of the node from the client side, when the TriStateCheckBoxes=false. I tried setting it using the solution provided in the below link : 

http://www.telerik.com/community/forums/aspnet-ajax/treeview/setting-indeterminate-check-state-on-client-side.aspx 

but it works only when we set the TriStateCheckBoxes=true.
Is this a limitation or there is any workaround.

Regards,
Mirang
Kevin
Top achievements
Rank 2
 answered on 05 Mar 2012
6 answers
141 views
hello once again to all expert on telerik,

                       Good day! i would like to ask again for help on configuring the radgrid with a radcombobox on a specific columns on my grid coz i wont be able to put a radcombo inside it, and how can i load the data on that combobox inside the so the user can select and also how can i get the selected value of the radcombo inside the grid please help

sample codes is highly appreciated

thanks to all
asilioni
Top achievements
Rank 1
 answered on 05 Mar 2012
3 answers
148 views
Hello,

I am using RadFileExplorer and I attached a NodeDataBound to its RadTreeView. Let's say I have a root directory and multiple children nodes, my problem is that the event only is triggered for the root node. Is it a normal behavior? This event should not be triggered for all children nodes? I also noticed that when the event triggers for the root node, the node coming in the event has no children.

I am using a Custom content provider and I want to be able to change tree icon using image url and not css. How can I achieve that?


Thanks in advance,
Michael Pinheiro


Dobromir
Telerik team
 answered on 05 Mar 2012
3 answers
99 views
Hi,

I've implemented your sample DBContentProvider so I can store the files and directories in a database. However, I am having issues displaying the directory structure from the database and adding a new directory.

The first three rows are what I've manually set the database to contain
ItemID name ParentID MimeType IsDirectory Size Content
1 ROOT NULL NULL 1 NULL NULL
2 images 1 NULL 1 NULL NULL
3 flowers 2 NULL 1 NULL NULL
6 NewFolder -1  1 0 

How do I get the file explorer to display the first 3 rows of the table above? I've set the following but all it displays is "ROOT/":
RadEditor1.ImageManager.ViewPaths = New String() {"ROOT/"}

Also, when I try and add a new folder, it does, but it does it as it appears on the fourth row of my sample database above. Is that connected to my first issue?

Thanks
Tim Metcalfe
Dobromir
Telerik team
 answered on 05 Mar 2012
4 answers
199 views
I want the same property behavious set to false but On NOT Focus. If I have 100 it will show 100.00 on no focus and 100 on focus... I want 100 on both. Is that possible? But I want to show the 2 digits if it's not .00

Thanks
Vasil
Telerik team
 answered on 05 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?