or
Hello,
I have a RadGrid with 4 template columns.
1. ASP:TextBox
2. RadEditor
3. ASP:LinkButton (ADD)
4. ASP:LinkButton. (DELETE)
When we click on "ADD" button we are adding a new row next to the selected row. Same way we are deleting the selected row on click of "DELETE" button. This we are doing in postback by rebinding the RadGrid. We need to avoid the postback and Add/Delete rows dynamically in javascript. Please provide the solution. Please find herewith the sample code that we are doing in code behind.
FYI: we are using net framework 4.0 and the Telerik.Web.UI.dll version is v. 2011.2.915.40
I am not able to add the code here.
| <paragraph name="<code>Code</code>" value="<code>" /> |
| <paragraph name="<p class='tipp'>Tipp<</p>" value="<p class='tipp'>" /> |
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" EnableAJAX="True" GridLines="None" OnRowDataBound="NamesGridView_RowDataBound" PageSize="14" DataKeyNames="OrderId" ShowGroupPanel="True" CellSpacing="0"> <GroupingSettings ShowUnGroupButton="True" /> <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True" ReorderColumnsOnClient="True"><Selecting AllowRowSelect="True"></Selecting> <ClientEvents OnRowMouseOver="RowMouseOver"></ClientEvents> </ClientSettings> <MasterTableView CommandItemDisplay="Top" ClientDataKeyNames="OrderID, Text" DataKeyNames="OrderID"><CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings> <RowIndicatorColumn Visible="False"> <HeaderStyle Width="20px" /> </RowIndicatorColumn> <ExpandCollapseColumn Resizable="False" Visible="False"> <HeaderStyle Width="20px" /> </ExpandCollapseColumn> <Columns> <telerik:GridTemplateColumn AllowFiltering="false" UniqueName="TemplateEditColumn"> <ItemTemplate> <asp:HyperLink ID="EditLink" runat="server" Text="Edit"></asp:HyperLink> </ItemTemplate> <FooterStyle Width="32px" /> <HeaderStyle Width="32px" /> <ItemStyle Width="32px" /> </telerik:GridTemplateColumn> <telerik:GridBoundColumn DataField="OrderId" GroupByExpression="OrderID" HeaderText="Order Ref" SortExpression="OrderId" UniqueName="OrderId" Visible="False"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="OrderNum" GroupByExpression="OrderNum" HeaderText="Order Number" SortExpression="OrderNum" UniqueName="OrderNum" Visible="False"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ProjectRef" HeaderText="Project" UniqueName="ProjectRef" SortExpression="ProjectRef" GroupByExpression="ProjectRef"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Location" HeaderText="Location" UniqueName="Location" SortExpression="Location" GroupByExpression="Location"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CostCentre" HeaderText="Cost Centre" UniqueName="CostCentre" SortExpression="CostCentre" GroupByExpression="CostCentre"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="AccountCode" HeaderText="Account Code" UniqueName="AccountCode" SortExpression="AccountCode" GroupByExpression="AccountCode"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="activityRef" HeaderText="Order Activity" UniqueName="activityRef" SortExpression="activityRef" GroupByExpression="activityRef"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CategoryRef" HeaderText="Type of Work" UniqueName="CategoryRef" SortExpression="CategoryRef" GroupByExpression="CategoryRef"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Order Date" HeaderText="Order Date" UniqueName="OrderDate" SortExpression="Order Date" GroupByExpression="Order Date"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Plan Date" HeaderText="Target Complete" UniqueName="TargetComplete" SortExpression="Plan Date" GroupByExpression="Plan Date"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Actual Date" HeaderText="Actual Complete" UniqueName="ActualComplete" SortExpression="Actual Date" GroupByExpression="Actual Date"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Amount" HeaderText="Estimated Cost" UniqueName="EstimatedCost" SortExpression="Amount" GroupByExpression="Amount"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ServiceProvider" HeaderText="Service Provider" UniqueName="ServiceProvider" SortExpression="ServiceProvider" GroupByExpression="ServiceProvider" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Text" HeaderText="Text" UniqueName="Text" Display="false"> </telerik:GridBoundColumn> </Columns><EditFormSettings><EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn></EditFormSettings> <CommandItemTemplate> <table style="width: 100%;"> <tr> <td style="width: 50%;"> <a href="#" onclick="return ShowInsertForm();"> <img alt="Insert" border="0" height="20" src="App_Images/AddRecord.gif" width="20" /> Add New Record</a> </td> <td align="right" style="width: 50%"> <asp:CheckBox ID="chkArchived" runat="server" AutoPostBack="True" OnCheckedChanged="chkShowArchived_CheckChanged" Text="Show Archived" Width="163px" /> </td> <td align="right" style="width: 50%"> <asp:CheckBox ID="chkComplete" runat="server" AutoPostBack="True" OnCheckedChanged="chkShowComplete_CheckChanged" Text="Show Completed" Width="163px" /> </td> </tr> </table> </CommandItemTemplate> </MasterTableView> <GroupPanel Visible="True"> </GroupPanel> <ClientSettings AllowDragToGroup="True" Selecting-AllowRowSelect="true"> </ClientSettings> <PagerStyle Mode="NextPrevNumericAndAdvanced" /><FilterMenu EnableImageSprites="False"></FilterMenu> </telerik:RadGrid> <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Animation="None" Behaviors="Default" InitialBehaviors="None" Left="" Top="" ReloadOnShow="True" VisibleStatusbar="false"> </telerik:RadWindowManager> </div> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadSlider1" /> <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> </form></body></html>rlbAssigned.Items.Add(new RadListBoxItem(rlbAvailable.Items[rlbAvailable.SelectedIndex].Text, rlbAvailable.Items[rlbAvailable.SelectedIndex].Value));<telerik:RadListBox ID="rlbAvailable" runat="server" Height="320px" Width="200px"> </telerik:RadListBox><div class="qsf-demo-canvas" align="center"> <telerik:RadMenu runat="server" ID="RadMenu1" EnableRoundedCorners="true" OnItemClick="RadMenu1_ItemClick" EnableShadows="true" Width="100%"> <Items> </Items> </telerik:RadMenu>
The stylesheet is as below:
.qsf-demo-canvas {
width: 100%;
margin-top:100px;
position:static;
}
.qsf-demo-canvas .RadMenu_Default .rmLink{
color:White !important;
background-color:#0099FF !important;
}
.qsf-demo-canvas .RadMenu_Default .rmRootGroup .MyItem {
float: none;
background-color:#0099FF !important;
text-align:left;
}
I have 2 menu items in my radmenu.The color I give in the stylesheet applies only for the length of radmenu
item,not till the full length of radmenu.
How can I have the custom color for the whole length of radmenu?