I have a RadGrid inside a WebUserControl that allows filtering. The textboxes and filter images show up just fine but nothing happens when clicking on the little filter image, there are no options for any of them. Here is my grid:
| <telerik:RadGrid ID="RadGridEmployeeTransactions" runat="server" |
| AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" |
| AutoGenerateColumns="False" GridLines="None" ShowGroupPanel="True" Width="430px"> |
| <HeaderContextMenu> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| </HeaderContextMenu> |
| <MasterTableView> |
| <Columns> |
| <telerik:GridBoundColumn DataField="TransactionID" Groupable="False" |
| HeaderText="ID" ReadOnly="True" SortExpression="TransactionID" |
| UniqueName="TransactionID" FilterListOptions="VaryByDataType" |
| DataType="System.Int64" FilterControlWidth="50px"> |
| <HeaderStyle HorizontalAlign="Center" Width="70px" /> |
| <ItemStyle HorizontalAlign="Center" Width="70px" /> |
| </telerik:gridboundcolumn> |
| <telerik:GridBoundColumn DataField="DateSubmitted" Groupable="True" |
| HeaderText="Date Submitted" ReadOnly="True" SortExpression="DateSubmitted" |
| UniqueName="DateSubmitted" GroupByExpression="DateSubmitted" |
| DataFormatString="{0:d}" FilterListOptions="VaryByDataType"> |
| <HeaderStyle HorizontalAlign="Center" Width="90px" /> |
| <ItemStyle HorizontalAlign="Center" Width="90px" /> |
| </telerik:gridboundcolumn> |
| <telerik:GridBoundColumn DataField="Tooltip" Groupable="True" |
| HeaderText="Transaction Type" ReadOnly="True" SortExpression="Tooltip" |
| UniqueName="Tooltip" GroupByExpression="Tooltip" |
| FilterListOptions="VaryByDataType" FilterControlWidth="200px"> |
| <HeaderStyle HorizontalAlign="Left" Width="250px" /> |
| <ItemStyle HorizontalAlign="Left" Width="250px" /> |
| </telerik:gridboundcolumn> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings AllowDragToGroup="True"> |
| </ClientSettings> |
| <FilterMenu> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| </FilterMenu> |
| </telerik:RadGrid> |
| <% using (Html.BeginForm()) {%> | |
| <div style="width: 100%;"> | |
| <div style="float: left;"> | |
| <input type="submit" value="Save Queue Changes" /></div> | |
| <div style="float: right; text-align: right;"> | |
| <%= String.Format("{0} Tickets in Queue", Model.Rows.Count) %></div> | |
| </div> | |
| <telerik:RadGrid ID="rgTickets" runat="server" AutoGenerateColumns="false" Style="clear: both;"> | |
| <MasterTableView DataKeyNames="CallId" EditMode="InPlace"> | |
| <Columns> | |
| <telerik:GridTemplateColumn> | |
| <HeaderStyle Width="50px" /> | |
| <ItemStyle Width="50px" /> | |
| <ItemTemplate> | |
| <%# Html.TextBox("Precedence", Eval("Precedence"), new { width = "25px" })%> | |
| <%# Html.ActionLink("Move To Top", "MoveToTop", new { ticketId = ((System.Data.DataRowView)Container.DataItem)["CallId"], queueId = ((QueueDefEntity)ViewData["QueueDef"]).QueueId })%> | |
| <br /> | |
| <%# Eval("InsertDate").ToString().Length > 0 ? string.Format("Prioritized by {0} <br />{1}",Eval("InsertUser"),Eval("InsertDate")) : "" %> | |
| </ItemTemplate> | |
| </telerik:GridTemplateColumn> | |
| <telerik:GridBoundColumn DataField="CallId" UniqueName="CallId" HeaderText="Ticket Number" /> | |
| <telerik:GridBoundColumn DataField="CallDesc" UniqueName="CallDesc" HeaderText="Problem Description" /> | |
| <telerik:GridBoundColumn DataField="ReceivedTimestamp" UniqueName="ReceivedTimestamp" | |
| HeaderText="Received" DataFormatString="{0:dd MMM yyyy h:mm tt}" /> | |
| </Columns> | |
| </MasterTableView> | |
| </telerik:RadGrid> | |
| <% } %> |
| <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<System.Data.DataTable>" %> |
| <telerik:RadGrid ID="rgProducts" runat="server" AllowFilteringByColumn="True" | |
| AllowPaging="True" AllowSorting="True" AutoGenerateDeleteColumn="True" | |
| AutoGenerateEditColumn="True" GridLines="None" Skin="Vista" | |
| ClientSettings-Selecting-AllowRowSelect="true" | |
| OnNeedDataSource="rgProducts_NeedDataSource" AutoPostBackOnFilter="true"><mastertableview><rowindicatorcolumn | |
| visible="False"><HeaderStyle Width="20px" /></rowindicatorcolumn><expandcollapsecolumn resizable="False" visible="False"><HeaderStyle Width="20px" /></expandcollapsecolumn><editformsettings><popupsettings scrollbars="None" /></editformsettings></mastertableview><clientsettings><selecting | |
| allowrowselect="True" /> | |
| </clientsettings> | |
| </telerik:RadGrid> |
| protected void rgProducts_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) |
| { |
| MyDataContext db = new MyDataContext(); |
| rgProducts.DataSource = |
| from products in db.Product_GetByProductTypeId(1) |
| select products; |
| } |
In case it matters, this is code contained within a module for DotNetNuke.
Thanks!
Michael
I have a grid which loads 10 columns * 30 rows by default.
Based on a tabstrip selection, I want to rebind the grid with data fetched using JSON serialization. Everything is OK until the OnSuccess method where the correct result is returned.
Do note that the result can bring in variable number of columns (either a subset of default or totally new columns) -- say for my first tab click, 6 totally new columns are returned along with 30 rows.
In this case the following does *NOT* work -- basically it does not reset the state of the grid & its underlying master table view on the client side. And I'm unable to manually set the .innerHTML of the cells since iterating through the columns of the master view accessed by get_masterTableView() contains the column collection loaded by default.
function updateGrid(result, userContext, methodName)
{
tableView.set_dataSource(result);
tableView.dataBind();
}
Please suggest a workaround as to how I can reset the state to 6 cols * 30 rows ?
Thanks a lot
- Arun
| <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" |
| AllowSorting="True" AutoGenerateColumns="False" DataSourceID="SqlDataRamps" GridLines="None"> |
| <PagerStyle Mode="NextPrevNumericAndAdvanced" ShowPagerText="true" /> |
| <MasterTableView DataSourceID="SqlDataRamps" PageSize="15"> |
| <RowIndicatorColumn Visible="False"> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn Visible="False" Resizable="False"> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn DataField="TRANSFER_POINT_ID" HeaderText="Ramp ID" SortExpression="TRANSFER_POINT_ID" |
| UniqueName="TRANSFER_POINT_ID" Display="False" Resizable="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="NAME" HeaderText="Ramp Name" SortExpression="NAME" |
| UniqueName="NAME"> |
| <FooterStyle Width="225px" /> |
| <HeaderStyle Width="225px" /> |
| <ItemStyle Width="225px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="CITY" HeaderText="City" SortExpression="CITY" |
| UniqueName="CITY"> |
| <FooterStyle Width="100px" /> |
| <HeaderStyle Width="100px" /> |
| <ItemStyle Width="100px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="STATE" HeaderText="State" SortExpression="STATE" |
| UniqueName="STATE"> |
| <FooterStyle Width="50px" /> |
| <HeaderStyle Width="50px" /> |
| <ItemStyle Width="50px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="STATION_CODE" HeaderText="Station" SortExpression="STATION_CODE" |
| UniqueName="STATION_CODE"> |
| <FooterStyle Width="50px" /> |
| <HeaderStyle Width="50px" /> |
| <ItemStyle Width="50px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="CARRIER_NAME" HeaderText="Carrier" SortExpression="CARRIER_NAME" |
| UniqueName="CARRIER_NAME"> |
| <FooterStyle Width="225px" /> |
| <HeaderStyle Width="225px" /> |
| <ItemStyle Width="225px" /> |
| </telerik:GridBoundColumn> |
| </Columns> |
| <EditFormSettings> |
| <PopUpSettings ScrollBars="None"></PopUpSettings> |
| </EditFormSettings> |
| </MasterTableView> |
| <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True"> |
| <Selecting AllowRowSelect="True" /> |
| <ClientEvents OnRowSelected="RowSelected" OnRowDblClick="RowDblClick" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
Hi,
I have a pivot data which is exactly in the radgrid example of displaying pivot data. (Grid/Examples/Programming/Pivot/DefaultCS.aspx)
1. How can I change the font of row 3, column 2 and 3 in the pivot data?
2. How can I insert a button in row 4 of the pivot data?
Can anyone suggest me a way to do so in vb?
Thank you for your help.