This is a migrated thread and some comments may be shown as answers.
Proper use of rad ajax manager
8 Answers 17 Views
This is a migrated thread and some comments may be shown as answers.
Swapnil
Top achievements
Rank 1
Swapnil asked on 06 Aug 2014, 12:59 PM
hi,
i am having
1] three dropdown populates based on each other.
2] grid populates on the 3 dropdown combination
3] i can edit record or add new record.

given code till i manageble, it works for 3 dropdown and shows grid but i am not able to click on edit or add new activity.

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
 
    var column = null;
    function MenuShowing(sender, args) {
            }
 
    function filterMenuShowing(sender, eventArgs) {
        
    }
 
    function RowSelected(sender, eventArgs) {
    }
 
    function CheckSelected() {
 
    }
 
    function validateCombo(source, args) {
     
        }
 
    }
 
</script>
</telerik:RadCodeBlock>
<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
<script type="text/javascript" id="telerikClientEvents1">
//<![CDATA[
 
    function radtxtClient_OnValueChanged(sender, args) {
        //Add JavaScript handler code here
    }
//]]>
</script>
</telerik:RadCodeBlock>
 
 
 
 
 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="PanelLabel">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="FY"/>
               <telerik:AjaxUpdatedControl ControlID="lblFY"/>
               <telerik:AjaxUpdatedControl ControlID="Asg"/>
               <telerik:AjaxUpdatedControl ControlID="lblAsg"/>
               <telerik:AjaxUpdatedControl ControlID="Task" />
               <telerik:AjaxUpdatedControl ControlID="lblTask" />
               <telerik:AjaxUpdatedControl ControlID="PanelGrid" />
            </UpdatedControls>
        </telerik:AjaxSetting>
 
 
        <telerik:AjaxSetting>
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="PanelGrid"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
 
 
<asp:panel ID="PanelLabel" runat="server">
    <table ">
        <tr>
            <td>
                <telerik:RadComboBox ID="FY" runat="server" AutoPostBack="True" OnSelectedIndexChanged="FY_SelectedIndexChanged"
                    EnableLoadOnDemand="true" OnItemsRequested="FY_ItemsRequested"
                   >
                </telerik:RadComboBox>
            </td>
            <td >
                <telerik:RadComboBox ID="Asg" runat="server" AutoPostBack="True"  OnSelectedIndexChanged="Asg_SelectedIndexChanged"
                    EnableLoadOnDemand="true" EnableVirtualScrolling="true" OnItemsRequested="Asg_ItemsRequested"
                  >
                </telerik:RadComboBox>
            </td>
            <td >
                <telerik:RadComboBox ID="Task" runat="server" AutoPostBack="True" OnSelectedIndexChanged="Task_SelectedIndexChanged"
                    EnableLoadOnDemand="true" EnableVirtualScrolling="true" OnItemsRequested="Task_ItemsRequested"
                  >
                </telerik:RadComboBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblFY" runat="server" Text="Label" Visible="False"></asp:Label>
            </td>
            <td >
                <asp:Label ID="lblAsg" runat="server" Text="Label" Visible="False"></asp:Label>
            </td>
            <td >
                <asp:Label ID="lblTask" runat="server" Text="Label" Visible="False" ></asp:Label>
            </td>
        </tr>
        
    </table>
</asp:panel>
<asp:Panel runat="server" ID="PanelGrid" BackColor="#66CCFF" Visible="False" BorderStyle="Outset">
    <table >
        <tr>
            <td>
                <telerik:RadGrid ID="radgridTask" runat="server"
              OnPreRender="radgridTask_PreRender"
                    OnItemCreated="radgridTask_ItemCreated" OnNeedDataSource="radgridTask_NeedDataSource"
                    OnItemCommand="radgridTask_ItemCommand" OnItemDataBound="radgridTask_ItemDataBound"
                    AutoGenerateColumns="False">
                
                    <ClientSettings AllowColumnsReorder="true" Resizing-AllowResizeToFit="true" EnablePostBackOnRowClick="false"
                        ReorderColumnsOnClient="True">
                        <Selecting AllowRowSelect="True" UseClientSelectColumnOnly="True"></Selecting>
                        <Resizing AllowResizeToFit="True"></Resizing>
                    </ClientSettings>
                 
                    <MasterTableView CommandItemDisplay="Bottom" CommandItemSettings-ShowAddNewRecordButton="true"
                        EditMode="PopUp" DataKeyNames="ID" CommandItemSettings-ShowRefreshButton="false"
                        HierarchyLoadMode="Client" >
                        <CommandItemSettings AddNewRecordText="Add New Task-Activity" />
                        <EditFormSettings EditColumn-EditText="Change Acivity Name"
                        >
                            <EditColumn ButtonType="PushButton">
                           
                            
                        </EditFormSettings>
                        <Columns>
                            <telerik:GridClientSelectColumn UniqueName="GridClientSelectColumn" Visible="False">
                            </telerik:GridClientSelectColumn>
                            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ActivityName" MaxLength="50" FilterControlAltText="Filter column"
                                HeaderText="Task-Activities" UniqueName="ActivityName">
                                <HeaderStyle Font-Bold="True" Font-Size="Larger" HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            <telerik:GridEditCommandColumn ButtonType="PushButton" UniqueName="EditColumn" EditText="Edit"
                                InsertText="Save">
                            </telerik:GridEditCommandColumn>
                        
                    
                    </MasterTableView>
                </telerik:RadGrid>
            </td>
        </tr>
        <tr>
            <td valign="top" style="padding-top: 1px">
                <table width="100%" cellspacing="0">
                    <tr>
                        <td align="left">
                            <asp:Button ID="btnAddtask" runat="server" Text="Add Task-Activity"
                                Enabled="False" Visible="False" />
                        </td>
                        <td style="width: 25%">
                            <asp:Label ID="lblCreatedBy" runat="server" Text="CreatedBy :" Visible="False" ></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtCreatedBy" runat="server" ></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 25%">
                            <asp:Label ID="lblOwner" runat="server" Text="Owner :" Visible="False"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtOwner" runat="server" ></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Panel>
<tr>
    <td>
    </td>
</tr>

Thanks

8 Answers, 1 is accepted

Sort by
0
SANJAY
Top achievements
Rank 1
answered on 09 Aug 2014, 12:15 PM
Swapnil

I am not very sure, but I guess if you remove the panel and put the RadGrid directly, it might give you the desired result


Regards



Sanjay
0
Swapnil
Top achievements
Rank 1
answered on 11 Aug 2014, 07:26 AM
i cant do like this becuse i used panel in codebehind to visiblity and with flags
0
Maria Ilieva
Telerik team
answered on 11 Aug 2014, 07:26 AM
Hello Swapnil,

Please try modifying the Ajax settings on the page as follows:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="PanelLabel">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="PanelLabel" />
               <telerik:AjaxUpdatedControl ControlID="PanelGrid" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="PanelGrid">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="PanelGrid"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

Also i noticed that the Insert/Update/Delete Command event are handled in the RadGrid markup, therefore I suppose you intend to use automatic operations. In this case please set the AllowAutomaticInserts/Update/Delete portieres of the Grid control to "true"

Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Swapnil
Top achievements
Rank 1
answered on 11 Aug 2014, 12:09 PM
This also not working.
0
Swapnil
Top achievements
Rank 1
answered on 11 Aug 2014, 12:20 PM
Looks like button click event happens but popup ffor both insert & edit not working, is there any issue with popup.
0
Maria Ilieva
Telerik team
answered on 12 Aug 2014, 10:58 AM
Hello,

Have you tried to set the AllowAutomaticInserts/Update/Delete portieres of the RadGrid control to "true"? It appears that you are using automatic operations an din this case setting this properties is obligatory.

Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Swapnil
Top achievements
Rank 1
answered on 12 Aug 2014, 11:25 AM
i tried with it but not working
like i said it works with inplace edit mode but not working in popup mode
0
Maria Ilieva
Telerik team
answered on 14 Aug 2014, 02:28 PM
Hello Swapnil,

I suppose that some js error appear on the page and it prevents the PopUp form opening. Could you please inspect the server response in the browser console and  verify if any js errors occur?

Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Ajax
Asked by
Swapnil
Top achievements
Rank 1
Answers by
SANJAY
Top achievements
Rank 1
Swapnil
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or