| <telerik:RadGrid ID="users_grid" runat="server" OnNeedDataSource="users_grid_needData" AutoGenerateColumns="false"> |
| <ClientSettings> |
| <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" /> |
| </ClientSettings> |
| <MasterTableView> |
| <Columns> |
| <telerik:GridClientSelectColumn> |
| </telerik:GridClientSelectColumn> |
| <telerik:GridBoundColumn DataField="ps_userid" HeaderText="User ID" UniqueName="User ID" |
| ColumnEditorID="usr_id"> |
| <HeaderStyle HorizontalAlign=center /> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
protected void RadGridItems_OnItemCreated(object sender, GridItemEventArgs e)
{
string columnName = "Items_ImageURI";
ControlCollection cCol = (ControlCollection)e.Item.Controls;
for (int x = 0; x < cCol.Count; x++)
{
Type curType = cCol[x].GetType();
string undertype = curType.UnderlyingSystemType.Name;
if (undertype == "GridTableCell")
{
ControlCollection z = (ControlCollection)cCol[x].Controls;
for (int y = 0; y < z.Count; y++)
{
if (z[y].UniqueID.Contains(columnName))
{
Control filterControl = (Control)z[y];
filterControl.Visible = false;
}
}
}
}
}
| Error 10 The type 'System.Web.UI.UpdatePanelTriggerCollection' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll' c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website\33da4fb4\5b6f38ba\App_Web_wqcx3cr8.0.cs 2182 |
| <rad:RadGrid ID="rgCustomer" runat="server" AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false" | |
| OnItemCreated="rgCustomer_ItemCreated" OnItemCommand="rgCustomer_ItemCommand" Skin="Telerik" DataSourceID="odsCustomer"> | |
| <PagerStyle Mode="NextPrevAndNumeric" /> | |
| <ClientSettings EnableRowHoverStyle="true"> | |
| <Selecting AllowRowSelect="true" /> | |
| </ClientSettings> | |
| <MasterTableView Width="100%" ShowFooter="false" DataKeyNames="CustomerId" CommandItemDisplay="Top"> | |
| <CommandItemTemplate> | |
| <div style="width:100%; margin:5px 5px 5px 5px;"> | |
| <div style="width:10%; float:left; vertical-align:top; text-align:center;"> | |
| Customer: | |
| </div> | |
| <div style="width:40%; float:left; vertical-align:top; text-align:center;"> | |
| <div style="width:100%; text-align:center;"> | |
| <rad:RadComboBox ID="rcbLocation" runat="server" Width="400px" Height="300px" MarkFirstMatch="true" | |
| EnableLoadOnDemand="true" Skin="Telerik" AutoPostBack="true" OnSelectedIndexChanged="rcbLocation_SelectedIndexChanged" /> | |
| <asp:RequiredFieldValidator ID="rfvLocation" runat="server" ControlToValidate="rcbLocation" Display="Dynamic" | |
| SetFocusOnError="true" EnableClientScript="true" ErrorMessage="Required" InitialValue="0" ValidationGroup="save" /> | |
| <rad:RadToolTip ID="rttLocation" runat="server" TargetControlID="rcbLocation" Sticky="true" Animation="Fade" | |
| Position="MiddleRight" RelativeTo="Element" Skin="Telerik"> | |
| <asp:Label ID="lblRttLocation" runat="server" /> | |
| </rad:RadToolTip> | |
| </div> | |
| </div> | |
| <div style="width:40%; float:left; vertical-align:top; text-align:center;"> | |
| <rad:RadTextBox" ID="rtbCustomer" runat="server" Width="400px" Skin="Telerik" /> | |
| <asp:RequiredFieldValidator ID="rfvCustomer" runat="server" ControlToVaidate"="rtbCustomer" Display="Dynamic" | |
| SetFocusOnError="true" EnableClientScript="true" ErrorMessage="Required" ValidationGroup="save" /> | |
| </div> | |
| <div style="width:10%; float:left; vertical-align:top; text-align:center;"> | |
| <asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="btnAdd_Click" ValidationGroup="save" /> | |
| </div> | |
| </div> | |
| </CommandItemTemplate> | |
| <Columns> | |
| <rad:GridBoundColumn HeaderText="Id" DataField="CustomerId" SortExpression="CustomerId" /> | |
| <rad:GridBoundColumn HeaderText="Location" DataField="Location" SortExpresstion="Location" /> | |
| <rad:GridBoundColumn HeaderText="Name" DataField="CustomerName" SortExpresstion="CustomerName" /> | |
| </Columns> | |
| </MasterTableView> | |
| </rad:RadGrid> |
| private Table gTable; |
| private GridTHead gHead; |
| private GridCommandItem gItem; |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!IsPostBack) |
| { |
| rgCustomer.DataBind(); |
| gTable = (Table)rgCustomer.MasterTableView.Controls[0]; |
| gHead = (GridTHead)gTable.Controls[0]; |
| gItem = (GridCommandItem)gHead.Controls[0]; |
| RadComboBox rcb = (RadComboBox)gItem.FindControl("rcbLocation"); |
| rcb.Items.Clear(); |
| rcb.DataSource = LocationList.Search(null, null, null, null, null, null, null, null, null); |
| rcb.DataTextField = "LocationName"; |
| rcb.DataValueField = "LocationId"; |
| rcb.DataBind(); |
| rcb.Items.Insert(0, new RadComboBoxItem("Select", "0")); |
| } |
| } |
| protected void rcbLocation_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e) |
| { |
| Label lbl = (Label)gItem.FindControl("lblRttLocation"); |
| if (e.Value == "0") |
| lbl.Text = "Select a Location"; |
| else |
| { |
| LocationList oLocation = LocationList.Get(Convert.ToInt32(e.Value)); |
| lbl.Text = LocationList.LocationDetails; |
| oLocation = null; |
| } |
| } |