function
updateChanges() {
ItemsService.AddNewItem(updateGrid());
}
function
updateGrid(result) {
var
masterTable = $find(
"<%= grdInvoiceItems.ClientID %>"
).get_masterTableView();
masterTable.fireCommand(
"RebindGrid"
);
// $find("<%= grdInvoiceItems.ClientID %>").get_masterTableView().rebind();
}
<
table
>
<
tr
>
<
td
style
=
"width: 590px"
>
<
asp:Panel
ID
=
"panelRateReport"
ScrollBars
=
"Horizontal"
Width
=
"99.8%"
runat
=
"server"
Height
=
"410"
>
<
telerik:RadGrid
runat
=
"server"
ID
=
"gridRate"
AutoGenerateColumns
=
"true"
Height
=
"99%"
Skin
=
"Hay"
GridLines
=
"Both"
OnPreRender
=
"gridRate_PreRender"
OnColumnCreated
=
"gridRate_ColumnCreated"
OnItemDataBound
=
"gridRate_ItemDataBound"
>
</
telerik:RadGrid
>
</
asp:Panel
>
</
td
>
<
td
style
=
"width: 20px"
>
</
td
>
<
td
>
<
asp:Panel
ID
=
"panel1"
runat
=
"server"
ScrollBars
=
"Horizontal"
Width
=
"99.8%"
Height
=
"410"
>
<
telerik:RadGrid
runat
=
"server"
ID
=
"gridRateAbove10k"
AutoGenerateColumns
=
"true"
Height
=
"99%"
GridLines
=
"Both"
Skin
=
"Hay"
OnPreRender
=
"gridRate_PreRender"
OnColumnCreated
=
"gridRate_ColumnCreated"
OnItemDataBound
=
"gridRate_ItemDataBound"
>
</
telerik:RadGrid
>
</
asp:Panel
>
</
td
>
</
tr
>
<
tr
>
....
</
tr
>
<
table
>
function
AsyncUploadRequiredValidation(cond) {
var
uploader = $find(cond.IDToEval);
return
(uploader.getUploadedFiles().length == 0) ? 0 : 1;
}
<system.webServer> |
<handlers> |
... |
<add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.1.415.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" |
name="Telerik.Web.UI.WebResource"/> |
</handlers> |
... |
</system.webServer> |
Hello Telerik Support Team,
Having some issues with RadMenu control. Please have a look on code block and attached screenshots.
Issue – RadMenu items are not displayed properly in RadGrid. No idea how it’s taking grid row’s height and width. I have tried to override RadMenu css but still same issues.
Regards,
Ajit Singh
---------------- ASPX and CSS CODE-----------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication6.WebForm1" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.MasterTable_Default caption {
color: red;
background-color:Black;
text-align:left;
}
.leftNavigatorstlye-Link
{
background-color:#0071bc;
font-size: 12px;
text-decoration: none;
font-family: Segoe UI, Helvetica, Garuda, Arial, sans-serif;
font-weight: bold;
color:White;
}
.RadGrid_Default .rgHeader,
.RadGrid_Default th.rgResizeCol
{
background:url('Grid/headers.gif') repeat-x #434343 !important;
font-size: 12px !important;
text-decoration: none !important;
font-family: Segoe UI, Helvetica, Garuda, Arial, sans-serif !important;
font-weight: bold !important;
color:White !important;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<table id="maintable" runat="server" style="width:100%;border-spacing:0;border-collapse:separate;">
<tr><td class="leftNavigatorstlye-Link">My Task</td></tr>
<tr>
<td>
<telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" AllowMultiRowSelection="True"
runat="server" AllowSorting="True" GridLines="None" AllowPaging="True" CellSpacing="0"
ShowGroupPanel="True" onitemcommand="RadGrid1_ItemCommand" >
<MasterTableView CommandItemDisplay="Top" CssClass="MasterTable_Default" HeaderStyle-CssClass="rgHeader" TableLayout="Fixed" >
<CommandItemTemplate>
<asp:LinkButton ID="LinkButton6" runat="server" CommandName="Rebind">
<img style="border:0px; height:22px;width:22px;" alt="" src="RefreshList.gif" />
</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server" CommandName="Rebind">
Global Actions
</asp:LinkButton>
<br />
</CommandItemTemplate>
<Columns>
<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn">
</telerik:GridClientSelectColumn>
<telerik:GridTemplateColumn>
<ItemTemplate>
<telerik:RadMenu ID="RadMenu1" runat="server" EnableRoundedCorners="true" EnableShadows="true"
ExpandAnimation-Type="None" CollapseAnimation-Type="None" ExpandDelay="0" CollapseDelay="0" >
<Items>
<telerik:RadMenuItem Text="Actions" Selected="false">
<GroupSettings ExpandDirection="Right" />
<Items >
<telerik:RadMenuItem Text="View Process" />
<telerik:RadMenuItem Text="Cancel Task" />
<telerik:RadMenuItem Text="Reassign task" />
<telerik:RadMenuItem Text="Create Linked Work Item" />
</Items>
</telerik:RadMenuItem>
</Items>
</telerik:RadMenu>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<ClientSettings EnableRowHoverStyle="true" AllowDragToGroup="True">
<Selecting AllowRowSelect="True"></Selecting>
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
</telerik:RadGrid>
</td>
</tr>
</table>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [USER_NAME],[FULL_NAME],[DEPARTMENT],[EMAIL_ADDRESS],[MANAGER],[GROUP_NAME] FROM [tUsers]"></asp:SqlDataSource>
<br /><br />
</div>
</form>
</body>
</html>
-------------------------------- CODE BEHIND------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
namespace WebApplication6
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
if (e.CommandName == "Rebind")
{
RadGrid1.Rebind();
}
}
}
}
I am using a RadGrid and want to be able to show row specific details in another item (such as a TextBox) when a row is clicked. This is similar to the example seen in this Grid Example. Since the Grid Example does not have details I am using the example in Grid Row Selection. I want the selection to work like the top example, not the bottom one. I am trying to have the JavaScript call a method in the aspx.cs page that then updates a text box, but the PageMethods.RowClick method in the code behind is static so it does not have access to TextBox1. Is it possible to have more control in the aspx.cs page? The first example looks to be using previously generated items that are then hidden or exposed using JavaScript. Is that what I need to be doing?
I basically want the user to be able to click on a row in the RadGrid and have other things on the page update immediately based on the selected row.
//radgrid.aspx
function RadGrid1_OnRowClick(sender,eventArgs)
{
var MasterTable = sender.get_masterTableView();
var Name = MasterTable.getCellByColumnUniqueName(row, "Server").innerHTML;
PageMethods.RowClick(Name);
}
// radgrid.aspx.cs
[System.Web.Services.WebMethod]
public static void RowClick(string item)
{
TextBox1.Text += item;
}