public
class MyObject
{
private int id; private int pId; private string name;
public MyObject(int id, int pId, string name)
{
this.id = id; this.pId = pId; this.name = name;}
public int ID { get { return id; } set { id=value;} }
public int PId { get { return pId; } set { pId=value; } }
public string Name { get { return name; } set { name = value; } }
}
/////////////////////////////////////////// Collection
public
class MyObjectCollection : IEnumerable, IEnumerator
{
private List<MyObject> obCollection = new List<MyObject>();
int position = -1;
public MyObjectCollection()
{
}
public MyObjectCollection(List<MyObject> list)
{
obCollection = list;
}
public IEnumerator GetEnumerator()
{
return new MyObjectCollection(obCollection);
}
public MyObject this[int indexer]
{
get { return obCollection[indexer]; }
set { obCollection[indexer] = value; }
}
public bool MoveNext()
{
position++;
return (position < obCollection.Count);
}
public void Reset()
{
position = -1;
}
public object Current
{
get
{
try
{
return obCollection[position];}
catch (IndexOutOfRangeException)
{
throw new InvalidOperationException();}
}
}
public MyObjectCollection GetObjects()
{
return new MyObjectCollection(obCollection);}
}
Hi,
I have a scenario about opening a Ajax modal window on a menu item click,Is it possible to open a Ajax modal window annd grey out the parent page and and show focus on modal window using RadMenu.
Normally we do have a aspx page with a button or link button to open a Ajax Model window which is a usercontrol.
Suggest me any ideas.
Thanks
hk
window.radalert=
function(_1,_2,_3,_4){
var
_5=GetRadWindowManager();
var
_6=_5._getStandardPopup("alert",_1);
Any help would be great.
BTW, I have both a window manager and a ajaxmanager on the page.
Thanks ... Ed
Any pointers / thoughts welcome
Cheers
Simon

I have a grid which has AllowAutomaticUpdates=true. The grid have a telerik:GridDropDownColumn for edit record and a GridBoundColumn to show data. When click Edit, the GridBoundColumn is hidden and the GridDropDownColumn is shown. I like to hide the dropdownlist on the rows that are not in edit. May you give me some hints.
Thanks in advance.
Regards,
d-cpt
| <%@ Page Language="vb" AutoEventWireup="false" codefile="testform.aspx.vb" Inherits="testform" %> |
| <%@ Register src="radgrid.ascx" tagname="radgrid" tagprefix="uc1" %> |
| <%@ 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>Untitled Page</title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <asp:ScriptManager runat="server" ID="scritpManager"></asp:ScriptManager> |
| <telerik:RadAjaxLoadingPanel ID="LoadingPanel" runat="server" |
| Style="width: 320px; padding-top: 125px;" Height="75px" Width="75px" > |
| <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading7.gif") %>' style="border:0;" /> |
| </telerik:RadAjaxLoadingPanel> |
| <telerik:RadAjaxManager ID="mainAjaxManager" runat="server" DefaultLoadingPanelID="LoadingPanel"> |
| <AjaxSettings > |
| <telerik:AjaxSetting AjaxControlID="btn"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="radgrid1" LoadingPanelID ="LoadingPanel"/> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="radgrid1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="radgrid1" LoadingPanelID ="LoadingPanel"/> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <asp:button ID="btn" runat="server" Text="clickMe to show/PopulateGrid" value="0" OnClick="doClick"/> |
| <br/> |
| <uc1:radgrid ID="radgrid1" runat="server" /> </form> |
| </body> |
| </html> |
| Partial Public Class testform |
| Inherits System.Web.UI.Page |
| Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
| End Sub |
| Public Sub doCLick(ByVal sender As Object, ByVal e As System.EventArgs) |
| radgrid1.populateGrid("BTN Click") |
| End Sub |
| End Class |
| <%@ Control Language="vb" AutoEventWireup="false" codefile="radgrid.ascx.vb" Inherits="radgrid_test" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <script language="javascript" type="text/javascript"> |
| function doSomething(){ |
| alert("Row_click"); |
| } |
| </script> |
| Grid begins here |
| <telerik:RadGrid id="list" AutoGenerateColumns="False" AllowPaging="True" |
| PageSize="12" GridLines="None" Skin="Default" runat="server" BorderStyle="None" > |
| <MasterTableView PageSize="12" AllowSorting="false" AllowPaging="true" GridLines="None" DataKeyNames="id" > |
| <PagerStyle AlwaysVisible="True" Mode="NextPrevAndNumeric" PagerTextFormat="{2} to {3} of {5} records | {4}"></PagerStyle> |
| <AlternatingItemStyle BackColor="LightGray"/> |
| <Columns > |
| <telerik:GridBoundColumn DataField="ref" HeaderText="ref" |
| UniqueName="ref" Visible="true" > |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="desc" HeaderText="desc" |
| UniqueName="desc" Visible="true"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="id" Visible="true" UniqueName="id" HeaderText="ID"></telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings EnablePostBackOnRowClick="true" > |
| <Selecting AllowRowSelect="True" ></Selecting> |
| <ClientEvents OnRowClick="doSomething"/> |
| <ClientEvents/> |
| </ClientSettings> |
| </telerik:RadGrid> |
| Grid Ends here |
| <br /> |
| Trace Events: |
| <asp:TextBox runat="server" ID="debug" TextMode="MultiLine" Rows="10" Columns="60" EnableViewState="false" ></asp:TextBox> |
| Imports System.Data |
| Partial Public Class radgrid_test |
| Inherits System.Web.UI.UserControl |
| Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
| If Not Page.IsPostBack And Not Page.IsAsync And Not Page.IsCallback Then |
| debug.Text = "" |
| End If |
| End Sub |
| Public Sub populateGrid(ByVal lvDebugString As String) |
| debug.Text &= Chr(10) & lvDebugString |
| Dim lvDataView As New DataView() |
| Dim lvDataTable As New DataTable() |
| Dim lvDataRow As DataRowView |
| lvDataTable.TableName = "testing" |
| lvDataTable.Columns.Add("ref") |
| lvDataTable.Columns.Add("desc") |
| lvDataTable.Columns.Add("id") |
| lvDataView.Table = lvDataTable |
| For lvI = 1 To 40 |
| lvDataRow = lvDataView.AddNew() |
| lvDataRow.Item("ref") = "test ref" |
| lvDataRow.Item("desc") = "test desc" |
| lvDataRow.Item("id") = lvI |
| Next |
| list.VirtualItemCount = 40 |
| list.DataSource = lvDataView |
| list.DataBind() |
| End Sub |
| Private Sub list_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles list.ItemCommand |
| If (e.CommandName = "RowClick" AndAlso TypeOf e.Item Is Telerik.Web.UI.GridDataItem) Then |
| e.Item.Selected = True |
| debug.Text &= Chr(10) & "ItemCommand=" & e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("id") |
| list.ClientSettings.EnablePostBackOnRowClick = True |
| End If |
| End Sub |
| Private Sub list_PageIndexChanged(ByVal source As Object, ByVal e As Telerik.Web.UI.GridPageChangedEventArgs) Handles list.PageIndexChanged |
| list.CurrentPageIndex = e.NewPageIndex |
| populateGrid("PageIndexChanged") |
| End Sub |
| End Class |