This is a migrated thread and some comments may be shown as answers.

RadAjaxManager stops linkbuttons in grid from opening RadWindow

1 Answer 105 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Acadia
Top achievements
Rank 1
Iron
Acadia asked on 28 Aug 2008, 04:47 PM

This one really has me fuming.  I have a rad Grid that has a couple of linkbutton template columns which when clicked open up RadWindows.  Everything was working fine until I added a RadAjaxManager.  Then suddenly the linkbuttons no longer open the Rad Windows.  What could possibly cause this?  Do I need to add a  sepcific setting to the ajax manager for the linkbuttons to open the rad windows?

Here is my Grid:

<telerik:RadGrid ID="rgT" runat="server" Skin="WebBlue" AutoGenerateColumns="False"

GridLines="None" AllowFilteringByColumn="True" AllowMultiRowEdit="true" AllowMultiRowSelection="true"

OnItemDataBound="rgT_ItemDataBound" OnItemCommand="rgT_ItemCommand" Width="98%">

<MasterTableView CommandItemDisplay="Top" EditMode="InPlace">

<Columns>

<telerik:GridEditCommandColumn EditImageUrl="../images/edit.gif" CancelImageUrl="../images/tb_cancel.gif"

Resizable="False" ButtonType="ImageButton" Reorderable="False" UniqueName="CommandEditButton">

<ItemStyle HorizontalAlign="Left" Width="20px" />

<HeaderStyle HorizontalAlign="Left" Width="20px" />

</telerik:GridEditCommandColumn>

<telerik:GridTemplateColumn DataField="TRANS_SEQ" HeaderText="" UniqueName="TRANS_SEQ"

Display="false">

<ItemTemplate>

<asp:Label runat="server" ID="lblTransSeq" CssClass="Normal" Width="1px" Text='<%#DataBinder.Eval(Container, "DataItem.TRANS_SEQ") %>'></asp:Label>

</ItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridBoundColumn DataField="TRANS_DTE" HeaderText="Trans Date" UniqueName="TRANS_DTE"

ReadOnly="True">

<HeaderStyle HorizontalAlign="Left" Width="100px" Wrap="False" />

<ItemStyle HorizontalAlign="Center" Width="100px" Wrap="False" />

</telerik:GridBoundColumn>

<telerik:GridTemplateColumn DataField="RECEIPT" HeaderText="Receipt" UniqueName="RECEIPT"

AllowFiltering="False">

<HeaderStyle HorizontalAlign="Left" Width="60px" Wrap="False" />

<ItemStyle HorizontalAlign="Left" Width="20px" Wrap="False" />

<ItemTemplate>

<asp:LinkButton ID="lbDoc" runat="server" Width="15px" CssClass="Normal" ToolTip="Click to open receipt PDF"

Text='<%#DataBinder.Eval(Container, "DataItem.RECEIPT") %>'></asp:LinkButton>

</ItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridTemplateColumn DataField="JOBNUM" HeaderText="Job" UniqueName="JOBNUM">

<HeaderStyle HorizontalAlign="Left" Width="100px" Wrap="False" />

<ItemStyle HorizontalAlign="Left" Width="100px" Wrap="False" />

<ItemTemplate>

<asp:Label runat="server" ID="lblJobNum" CssClass="Normal" Width="60px" Text='<%#DataBinder.Eval(Container, "DataItem.JOBNUM") %>'></asp:Label>

</ItemTemplate>

<EditItemTemplate>

<asp:TextBox ID="tbJobNum" runat="server" CssClass="Normal" Width="60px" Text='<%#DataBinder.Eval(Container, "DataItem.JOBNUM") %>'></asp:TextBox>

</EditItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridTemplateColumn DataField="PHASE" HeaderText="Phase" UniqueName="PHASE">

<HeaderStyle HorizontalAlign="Left" Width="100px" Wrap="False" />

<ItemStyle HorizontalAlign="Left" Width="100px" Wrap="False" />

<ItemTemplate>

<asp:Label runat="server" ID="lblPhase" CssClass="Normal" Width="60px" Text='<%#DataBinder.Eval(Container, "DataItem.PHASE") %>'></asp:Label>

</ItemTemplate>

<EditItemTemplate>

<asp:TextBox ID="tbPhase" runat="server" CssClass="Normal" Width="60px" Text='<%#DataBinder.Eval(Container, "DataItem.PHASE") %>'></asp:TextBox>

</EditItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridTemplateColumn DataField="CATEGORY" HeaderText="Category" UniqueName="CATEGORY">

<HeaderStyle HorizontalAlign="Left" Width="100px" Wrap="False" />

<ItemStyle HorizontalAlign="Left" Width="100px" Wrap="False" />

<ItemTemplate>

<asp:Label runat="server" ID="lblCategory" CssClass="Normal" Width="60px" Text='<%#DataBinder.Eval(Container, "DataItem.CATEGORY") %>'></asp:Label>

</ItemTemplate>

<EditItemTemplate>

<asp:TextBox ID="tbCategory" runat="server" CssClass="Normal" Width="60px" Text='<%#DataBinder.Eval(Container, "DataItem.CATEGORY") %>'></asp:TextBox>

</EditItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridTemplateColumn DataField="DEPT" HeaderText="Dept" UniqueName="DEPT">

<HeaderStyle HorizontalAlign="Left" Width="100px" Wrap="False" />

<ItemStyle HorizontalAlign="Left" Width="100px" Wrap="False" />

<ItemTemplate>

<asp:Label runat="server" ID="lblDept" CssClass="Normal" Width="60px" Text='<%#DataBinder.Eval(Container, "DataItem.DEPT") %>'></asp:Label>

</ItemTemplate>

<EditItemTemplate>

<asp:TextBox ID="tbDept" runat="server" CssClass="Normal" Width="60px" Text='<%#DataBinder.Eval(Container, "DataItem.DEPT") %>'></asp:TextBox>

</EditItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridTemplateColumn DataField="ACCT" HeaderText="GL Acct" UniqueName="ACCT">

<HeaderStyle HorizontalAlign="Left" Width="100px" Wrap="False" />

<ItemStyle HorizontalAlign="Left" Width="100px" Wrap="False" />

<ItemTemplate>

<asp:Label runat="server" ID="lblAcct" CssClass="Normal" Width="60px" Text='<%#DataBinder.Eval(Container, "DataItem.ACCT") %>'></asp:Label>

</ItemTemplate>

<EditItemTemplate>

<asp:TextBox ID="tbAcct" runat="server" CssClass="Normal" Width="60px" Text='<%#DataBinder.Eval(Container, "DataItem.ACCT") %>'></asp:TextBox>

</EditItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridTemplateColumn DataField="LINE_TYPE" HeaderText="Line Type" UniqueName="LINE_TYPE"

AllowFiltering="false">

<HeaderStyle HorizontalAlign="Left" Width="60px" Wrap="False" />

<ItemStyle HorizontalAlign="Left" Width="60px" Wrap="False" />

<ItemTemplate>

<asp:Label runat="server" ID="lblLineType" CssClass="Normal" Width="60px" Text='<%#DataBinder.Eval(Container, "DataItem.LINE_TYPE") %>'></asp:Label>

</ItemTemplate>

<EditItemTemplate>

<telerik:RadComboBox ID="rcLt" runat="server" Skin="WebBlue" AutoPostBack="True"

Width="40px" AllowCustomText="false" OnSelectedIndexChanged="lineTypeChange">

<Items>

<telerik:RadComboBoxItem runat="server" Text="J" Value="J" />

<telerik:RadComboBoxItem runat="server" Text="G" Value="G" />

</Items>

</telerik:RadComboBox>

<asp:Label ID="lblLT" runat="server" Visible="false" Text='<%#DataBinder.Eval(Container, "DataItem.LINE_TYPE") %>'></asp:Label>

</EditItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridBoundColumn DataField="MERCHANT_NAME" HeaderText="Merchant" UniqueName="MERCHANT_NAME"

ReadOnly="True">

<HeaderStyle HorizontalAlign="Left" Width="100px" Wrap="False" />

<ItemStyle HorizontalAlign="Center" Width="100px" Wrap="True" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="TRANS_AMOUNT" HeaderText="Amount" UniqueName="TRANS_AMOUNT"

ReadOnly="True">

<HeaderStyle HorizontalAlign="Left" Width="100px" Wrap="False" />

<ItemStyle HorizontalAlign="Right" Width="100px" Wrap="False" />

</telerik:GridBoundColumn>

<telerik:GridTemplateColumn DataField="SUBS" HeaderText="Subs" UniqueName="SUBS"

AllowFiltering="False">

<HeaderStyle HorizontalAlign="Left" Width="36px" Wrap="False" />

<ItemStyle HorizontalAlign="Right" Width="36px" Wrap="False" />

<ItemTemplate>

<asp:LinkButton ID="lbSubs" runat="server" Width="36px" CssClass="Normal" OnClick="subsClick"

CommandName="Subs" ToolTip="Click to edit sub transactions" Text='<%#IIF(DataBinder.Eval(Container, "DataItem.SUBSCOUNT") is Nothing, "0", DataBinder.Eval(Container, "DataItem.SUBSCOUNT")) %>'></asp:LinkButton>

</ItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridTemplateColumn DataField="USE_TAX_AMT" HeaderText="Use Tax" UniqueName="USE_TAX_AMT"

AllowFiltering="False">

<HeaderStyle HorizontalAlign="Left" Width="45px" Wrap="False" />

<ItemStyle HorizontalAlign="Right" Width="45px" Wrap="False" />

<ItemTemplate>

<asp:LinkButton ID="lbUseTax" runat="server" CommandName="Taxes" Width="45px" CssClass="Normal"

ToolTip="Click to edit use Tax" Text='<%#DataBinder.Eval(Container, "DataItem.USE_TAX_AMT") %>'

OnClick="useTaxClick"></asp:LinkButton>

</ItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridBoundColumn DataField="TRANS_POST_DATE" HeaderText="Post Date" UniqueName="TRANS_POST_DATE"

ReadOnly="True">

<HeaderStyle HorizontalAlign="Left" Width="100px" Wrap="False" />

<ItemStyle HorizontalAlign="Center" Width="100px" Wrap="False" />

</telerik:GridBoundColumn>

<telerik:GridTemplateColumn DataField="ITEM_DESCR" HeaderText="Item Description"

UniqueName="ITEM_DESCR" AllowFiltering="False">

<ItemTemplate>

<asp:Label runat="server" ID="lblItemDescr" CssClass="Normal" Width="100px" Text='<%#DataBinder.Eval(Container, "DataItem.ITEM_DESCR") %>'></asp:Label>

</ItemTemplate>

<EditItemTemplate>

<asp:TextBox ID="tbItemDescr" runat="server" CssClass="Normal" Width="100px" Text='<%#DataBinder.Eval(Container, "DataItem.ITEM_DESCR") %>'></asp:TextBox>

</EditItemTemplate>

<HeaderStyle HorizontalAlign="Left" Wrap="False" />

<ItemStyle HorizontalAlign="Center" Wrap="True" />

</telerik:GridTemplateColumn>

<telerik:GridTemplateColumn HeaderText="Approved" Resizable="False" UniqueName="Approved"

Reorderable="False">

<HeaderStyle HorizontalAlign="Left" Width="100px" Wrap="False" />

<ItemStyle HorizontalAlign="Center" Width="100px" Wrap="False" />

<ItemTemplate>

<asp:CheckBox ID="chkApproved" runat="server" Checked='<%#DataBinder.Eval(Container, "DataItem.APPROVE_STATUS") %>'>

</asp:CheckBox>

</ItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridBoundColumn DataField="MERCHANT_STATE" HeaderText="" UniqueName="MERCHANT_STATE"

ReadOnly="True" Display="false">

</telerik:GridBoundColumn>

</Columns>

<CommandItemTemplate>

<asp:Button runat="server" ID="btnUA" Text="Update All" CommandName="UpdateAll" CssClass="CommandButton" /></CommandItemTemplate>

<ExpandCollapseColumn>

<HeaderStyle Width="20px" />

</ExpandCollapseColumn>

<RowIndicatorColumn>

<HeaderStyle Width="20px" />

</RowIndicatorColumn>

</MasterTableView>

<ClientSettings>

<Scrolling AllowScroll="True" UseStaticHeaders="True" />

<Selecting AllowRowSelect="True" />

</ClientSettings>

<FilterMenu EnableTheming="True" Skin="WebBlue">

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

</FilterMenu>

</telerik:RadGrid>



And here is my RadAjaxManager:

<telerik:RadAjaxManager ID="ram1" runat="server">

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="rcCn">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="rgT"></telerik:AjaxUpdatedControl>

</UpdatedControls>

</telerik:AjaxSetting>

<telerik:AjaxSetting AjaxControlID="btnUA">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="rgT"></telerik:AjaxUpdatedControl>

</UpdatedControls>

</telerik:AjaxSetting>

<telerik:AjaxSetting AjaxControlID="rcP">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="rcC"></telerik:AjaxUpdatedControl>

</UpdatedControls>

</telerik:AjaxSetting>

<telerik:AjaxSetting AjaxControlID="btnApplyJPC">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="rgT"></telerik:AjaxUpdatedControl>

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

</telerik:RadAjaxManager>


Thanks

1 Answer, 1 is accepted

Sort by
0
Acadia
Top achievements
Rank 1
Iron
answered on 28 Aug 2008, 04:56 PM
I figured it out.  I had to add a radwindowmanager and open my wi ndows through that, as well as add a 

<telerik:RadCodeBlock runat="server">

around my javascript on that page and now everything is ajaxified and the linkbuttons are bringing up my windows.

I struggled with this error for about two hours today.
Tags
Ajax
Asked by
Acadia
Top achievements
Rank 1
Iron
Answers by
Acadia
Top achievements
Rank 1
Iron
Share this question
or