or
| <telerik:RadGrid ID="LocationGrid" runat="server" Skin="Web20" OnDeleteCommand="OnLocationDelete" |
| OnInsertCommand="OnLocationInsert" OnItemDeleted="OnLocationItemDeleted" OnItemInserted="OnLocationItemInserted" |
| OnItemUpdated="OnLocationItemUpdated" OnNeedDataSource="OnNeedDataSource" |
| OnUpdateCommand="OnLocationUpdate" ShowStatusBar="True" |
| AutoGenerateColumns="False" GridLines="None" onitemcommand="OnItemCommand"> |
| <PagerStyle Mode="NextPrevAndNumeric" /> |
| <MasterTableView EditMode="PopUp" CommandItemDisplay="Top"> |
| <Columns> |
| <telerik:GridBoundColumn DataField="ID" UniqueName="colID" Visible="false" DataType="System.Int32"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Description" UniqueName="colDescription" HeaderText="Description"> |
| </telerik:GridBoundColumn> |
| <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="colDelete" HeaderText="Delete"> |
| </telerik:GridButtonColumn> |
| <telerik:GridButtonColumn CommandName="Edit" Text="Edit" UniqueName="colEdit" HeaderText="Edit"> |
| </telerik:GridButtonColumn> |
| </Columns> |
| <EditFormSettings CaptionFormatString="Edit Location" /> |
| </MasterTableView> |
| </telerik:RadGrid> |
| private List<Location> LocationList |
| { |
| get |
| { |
| return Session["LocationList"] as List<Location>; |
| } |
| set |
| { |
| Session["LocationList"] = value; |
| } |
| } |
| private void BuildInitialList() |
| { |
| LocationList = new List<Location> |
| { |
| new Location() {ID = 1, Description = "Some Location"}, |
| new Location() {ID = 2, Description = "Some Other Location"}, |
| }; |
| } |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!Page.IsPostBack) |
| BuildInitialList(); |
| LocationGrid.DataSource = LocationList; |
| LocationGrid.DataBind(); |
| } |
| protected void OnLocationUpdate(object source, Telerik.Web.UI.GridCommandEventArgs e) |
| { |
| GridEditableItem item = e.Item as GridEditableItem; |
| // Description is the old value |
| string Description = (item["colDescription"].Controls[0] as TextBox).Text; |
| // values["Description"] is the old value |
| Dictionary<string, string> values = new Dictionary<string, string>(); |
| item.ExtractValues(values); |
| } |
Hi there,
I'm testing ASP.NET AJAX UI Controls and specially the DatePicker. I have two Date Pickers in a web user control. Then I have a content page onto which I place the aforementioned web user control. As you might guess this last content page has its master page. So the hierarchy is as follows
master page
content page
web user control (this one has the 2 date pickers)
Question:
Why when I want to access my web page, I see both date pickers rendered but as soon as I clic on the date icon a JavaScript error shows in the left-lower browser's corner. I've been investigating the reason for this with no success :-(..
Please if some one could shed some light on this (show some code example).
Felix