or
| <telerik:RadGrid ID="RGViewMEdia" Skin="someSkin" EnableEmbeddedSkins="false" |
| runat="server" CssClass="list_one" AutoGenerateColumns="False" AllowPaging="True" |
| GridLines="None" Width="800px" DataKeyNames="somefield" AllowAutomaticDeletes="True" |
| AllowSorting="True" ShowStatusBar="True" AllowFilteringByColumn="true" DefaultSortDirection="Descending" |
| DefaultSortExpression="somefield" BorderStyle="None" PageSize="10" AllowCustomPaging="true" OnInit="RGViewMEdia_Init" |
| OnItemCommand="RGViewMEdia_ItemCommand" OnNeedDataSource="RGViewMEdia_NeedDataSource" OnItemDataBound="RGViewMEdia_ItemDataBound" |
| OnSortCommand="RGViewMEdia_ItemSortCommand" OnPageIndexChanged="RGViewMEdia_PageChangeCommand"> |
| ...... |
| ...... |
| <telerik:GridDateTimeColumn DataField="somedatefield" HeaderText="DateTime" ReadOnly="True" UniqueName="PublishDate" DataType="System.DateTime" |
| SortExpression="somedatefield" DataFormatString="{0:dd.MM.yyyy}" ItemStyle-Width="80px" FilterListOptions="VaryByDataType" |
| PickerType="DatePicker" FilterControlWidth="60px"/> |
| ...... |
| protected void RGViewMEdia_ItemCommand(object sender, GridCommandEventArgs e) |
| { |
| if (e.CommandName == RadGrid.FilterCommandName) |
| { |
| ... |
| } |
| RGViewMEdia.CurrentPageIndex = 0; |
| RGViewMEdia.Rebind(); |
| e.Canceled = true; |
| } |
| protected void RGViewMEdia_Init(object sender, EventArgs e) |
| { |
| GridFilterMenu menu = RGViewMEdia.FilterMenu; |
| // Iterate through the items backwards |
| // so that the indexing is not thrown off |
| // when items are removed! |
| for (int i = menu.Items.Count - 1; i >= 0; i--) |
| { |
| if (menu.Items[i].Text.IndexOf("Null")>=0) |
| { |
| menu.Items.RemoveAt(i); |
| } |
| else if (menu.Items[i].Text.IndexOf("EqualTo") >= 0 && menu.Items[i].Text.IndexOf("Than") < 0) |
| { |
| menu.Items.RemoveAt(i); |
| } |
| } |
| if (Expression!=null&&Expression.PublicationDateOperate != DateOperate.NoFilter) |
| { |
| string operate; |
| switch (Expression.PublicationDateOperate) |
| { |
| case DateOperate.GreaterThan: |
| operate = "GreaterThan"; |
| break; |
| case DateOperate.GreaterThanOrEqualTo: |
| operate = "GreaterThanOrEqualTo"; |
| break; |
| case DateOperate.LessThan: |
| operate = "LessThan"; |
| break; |
| case DateOperate.LessThanOrEqualTo: |
| operate = "LessThanOrEqualTo"; |
| break; |
| default: |
| operate = "NoFilter"; |
| break; |
| } |
| RadMenuItem item = menu.Items.FindItem(i => i.Text == operate); |
| if(item!=null) |
| item.Selected = true; |
| } |
| } |

| protected void cboContactDB_ItemDataBound(object sender, Telerik.Web.UI.RadComboBoxItemEventArgs e) |
| { |
| try |
| { |
| Heron.PersistentClasses.Entity loEntity = (Heron.PersistentClasses.Entity)e.Item.DataItem; |
| ((Label)e.Item.FindControl("lblID")).Text = loEntity.ENTSID; |
| ((Label)e.Item.FindControl("lblName")).Text = loEntity.ENTSName; |
| } |
| catch (Exception loException) |
| { |
| Heron.App_Code.L.Exception("ContactReminder.ascx.cs: Error! cboContactDB_ItemDataBound.", loException); |
| } |
| } |
| function ConfirmUpdate(sender, eventArgs) { |
| var oldvalue = eventArgs.get_oldValue() |
| if (confirm('Are you want to Continue? ') != true) |
| eventArgs.set_newValue(oldvalue) |
| } |
Hello,
I am pretty much how to populate the asp:menu from xml directly. But my issue is to do everything from server side. I am using dom model in my dev and so I have to get the nodes from xml dynamically and populate into the Menu and create a flyout with 2 columns on hover of each menu item. Would be great if someone can provide with a custom code to achieve this.
Pls find the screenshot here: http://www.imgplace.com/viewimg80/1153/812col.jpg
| <NestedViewSettings DataSourceID="odsContactDetails"> |
| <ParentTableRelation> |
| <telerik:GridRelationFields DetailKeyField="CrmEntityId" MasterKeyField="CrmEntityId" /> |
| </ParentTableRelation> |
| </NestedViewSettings> |
| <NestedViewTemplate> |
| <asp:Panel ID="pnlContactInfo" runat="server"> |
| <asp:DropDownList ID="ddlPhones" runat="server" DataTextField="Phone" DataValueField="Phone"/> |
| <asp:DropDownList ID="ddlEmails" runat="server" DataTextField="Email" DataValueField="Email"/> |
| </asp:Panel> |
| </NestedViewTemplate> |
| ..... |
| <asp:ObjectDataSource ID="odsContactDetails" runat="server" |
| SelectMethod="GetContactInfo" TypeName="FVS.ControllerCRM.CRMDataControl"> |
| <SelectParameters> |
| <asp:Parameter Name="crmEntityId" Type="String" /> |
| </SelectParameters> |
| </asp:ObjectDataSource> |
| uncaught exception: [Exception... "Not enough arguments [nsIDOMRange.collapse]" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: http://localhost/webber/admin/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a3bbfe379-348b-450d-86a7-bb22e53c1978%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.3.1314.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a603d133a-f943-435d-a80d-57457cc55f4a%3a16e4e7cd%3af7645509%3a24ee1bba%3a1e771326%3aa7e79140%3a11a04f7e%3ae330518b%3a8e6f0d33%3a6a6d718d%3ae524c98b%3ac8618e41%3ae4f8f289%3ab7778d6c%3ae085fe68%3a58366029%3aed16cbdc%3aaa288e2d%3ac08e9f8a%3a1bb784d4%3a19620875%3a874f8ea2%3a33108d14%3abd8f85e4%3bAjaxControlToolkit%2c+Version%3d3.0.20229.20843%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3a3b7d1b28-161f-426a-ab77-b345f2c428f5%3ab14bb7d5%3a13f47f54%3a3c55b13e%3adc2d6e36%3ade51bc8f%3a1d056c78%3aa3e10fa2%3a701e375f%3aa4313c7a :: anonymous :: line 18549" data: no] |