I have two issues.
1. I have a RadEditor in a RadGrid which works fine, until I set the Grid to use Ajax. Then the Editor control becomes useless and its contents hidden. What is the work around for this?
2. Depending on user privileges I need different options to show in the grid. The grid is a grid of info, much like a forum. If the creator of a row is using the system I need a column to have an edit button that allows direct edit of the record (like my code has now). However, if it is not the creator, the 'Edit' button needs to be replaced by a 'Reply to' button that acts as an insert command prepopulating the edit box with "Reply to Comment X". So how do I code this so it determines which edit/insert button to show based on the row priveleges?
Heres my current code for the control:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="grdNotes">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="grdNotes" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<telerik:RadGrid ID="grdNotes" runat="server" GridLines="None" Skin="Windows7">
<MasterTableView ShowHeader="False" ShowHeadersWhenNoRecords="False"
TableLayout="Fixed" AutoGenerateColumns="False" DataKeyNames="ID" ClientDataKeyNames="ID" >
<Columns>
<telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID"
SortExpression="ID" UniqueName="ID" Visible="false" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="VisibleID" DataType="System.Int32"
HeaderText="ID" SortExpression="VisibleID" UniqueName="VisibleID" ReadOnly="true" >
<HeaderStyle Width="20px" />
</telerik:GridBoundColumn>
<telerik:GridButtonColumn CommandName="Edit" ButtonType="ImageButton" UniqueName="Edit" ImageUrl="~/Images/Edit.png">
<HeaderStyle Width="50px" />
</telerik:GridButtonColumn>
<telerik:GridTemplateColumn HeaderText="Notes" UniqueName="Notes" ReadOnly="false">
<EditItemTemplate>
<telerik:RadEditor ID="editNotes" ShowSubmitCancelButtons="False" runat="server"
Content='<%# Bind("Notes") %>' ToolsFile="~/ToolsFileLimited.xml" Height="200px" Width="1000px" EnableResize="false" />
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Notes") %>' />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="DateCreated" DataType="System.DateTime"
HeaderText="Date Created" SortExpression="DateCreated" UniqueName="DateCreated" ReadOnly="true">
<HeaderStyle Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CreatedBy" HeaderText="CreatedBy"
SortExpression="Created By" UniqueName="CreatedBy" ReadOnly="true">
<HeaderStyle Width="100px" />
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
</telerik:RadGrid>
1. I have a RadEditor in a RadGrid which works fine, until I set the Grid to use Ajax. Then the Editor control becomes useless and its contents hidden. What is the work around for this?
2. Depending on user privileges I need different options to show in the grid. The grid is a grid of info, much like a forum. If the creator of a row is using the system I need a column to have an edit button that allows direct edit of the record (like my code has now). However, if it is not the creator, the 'Edit' button needs to be replaced by a 'Reply to' button that acts as an insert command prepopulating the edit box with "Reply to Comment X". So how do I code this so it determines which edit/insert button to show based on the row priveleges?
Heres my current code for the control:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="grdNotes">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="grdNotes" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<telerik:RadGrid ID="grdNotes" runat="server" GridLines="None" Skin="Windows7">
<MasterTableView ShowHeader="False" ShowHeadersWhenNoRecords="False"
TableLayout="Fixed" AutoGenerateColumns="False" DataKeyNames="ID" ClientDataKeyNames="ID" >
<Columns>
<telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID"
SortExpression="ID" UniqueName="ID" Visible="false" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="VisibleID" DataType="System.Int32"
HeaderText="ID" SortExpression="VisibleID" UniqueName="VisibleID" ReadOnly="true" >
<HeaderStyle Width="20px" />
</telerik:GridBoundColumn>
<telerik:GridButtonColumn CommandName="Edit" ButtonType="ImageButton" UniqueName="Edit" ImageUrl="~/Images/Edit.png">
<HeaderStyle Width="50px" />
</telerik:GridButtonColumn>
<telerik:GridTemplateColumn HeaderText="Notes" UniqueName="Notes" ReadOnly="false">
<EditItemTemplate>
<telerik:RadEditor ID="editNotes" ShowSubmitCancelButtons="False" runat="server"
Content='<%# Bind("Notes") %>' ToolsFile="~/ToolsFileLimited.xml" Height="200px" Width="1000px" EnableResize="false" />
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Notes") %>' />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="DateCreated" DataType="System.DateTime"
HeaderText="Date Created" SortExpression="DateCreated" UniqueName="DateCreated" ReadOnly="true">
<HeaderStyle Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CreatedBy" HeaderText="CreatedBy"
SortExpression="Created By" UniqueName="CreatedBy" ReadOnly="true">
<HeaderStyle Width="100px" />
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
</telerik:RadGrid>