public class MyGenericFilter : GridBoundColumn { //RadGrid will call this method when it initializes the controls inside the filtering item cells protected override void SetupFilterControls(TableCell cell) { base.SetupFilterControls(cell); cell.Controls.RemoveAt(0); RadComboBox combo = new RadComboBox(); combo.ID = ("RadComboBox1" + this.UniqueName); combo.ShowToggleImage = false; combo.Skin = "Office2007"; combo.EnableLoadOnDemand = true; combo.AllowCustomText = true; combo.AutoPostBack = true; //combo.MarkFirstMatch = true; combo.Height = Unit.Pixel(100); combo.Width = Unit.Pixel(100); combo.ItemsRequested += this.list_ItemsRequested; combo.SelectedIndexChanged += this.list_SelectedIndexChanged; combo.DropDownWidth = Unit.Pixel(150); cell.Controls.AddAt(0, combo); //cell.Controls.RemoveAt(1); } //RadGrid will cal this method when the value should be set to the filtering input control(s) protected override void SetCurrentFilterValueToControl(TableCell cell) { base.SetCurrentFilterValueToControl(cell); RadComboBox combo = (RadComboBox)cell.Controls[0]; if ((this.CurrentFilterValue != string.Empty)) { combo.Text = this.CurrentFilterValue; } } //RadGrid will cal this method when the filtering value should be extracted from the filtering input control(s) protected override string GetCurrentFilterValueFromControl(TableCell cell) { RadComboBox combo = (RadComboBox)cell.Controls[0]; return combo.Text; } private void list_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e) { ((RadComboBox)o).DataTextField = this.DataField; ((RadComboBox)o).DataValueField = this.DataField; RadGrid MyGrid = ((RadGrid)((RadComboBox)o).Parent.Parent.Parent.Parent.Parent.Parent); MyGrid.AllowPaging = false; MyGrid.Rebind(); DataTable NewDT = new DataTable(this.DataField); NewDT.Columns.Add(new DataColumn(this.DataField)); foreach (GridDataItem GD in MyGrid.Items) { if (GD[this.DataField].Text.Contains(e.Text) && GD[this.DataField].Text != " ") { var foundAuthors = NewDT.Select(this.DataField + " = '" + GD[this.DataField].Text + "'"); if (foundAuthors.Length == 0) { DataRow DR = NewDT.NewRow(); DR[this.DataField] = GD[this.DataField].Text; NewDT.Rows.Add(DR); } } } MyGrid.AllowPaging = true; MyGrid.Rebind(); NewDT.DefaultView.Sort = this.DataField + " ASC"; ((RadComboBox)o).DataSource = NewDT; ((RadComboBox)o).DataBind(); } private void list_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) { GridFilteringItem filterItem = (GridFilteringItem)((RadComboBox)o).NamingContainer; if ((this.UniqueName == "Index")) { //this is filtering for integer column type filterItem.FireCommandEvent("Filter", new Pair("EqualTo", this.UniqueName)); } //filtering for string column type filterItem.FireCommandEvent("Filter", new Pair("Contains", this.UniqueName)); } }GridExcelExportFormat
.ExcelML format the excel opens and shows a message:
Problems During Load(see attached screenshot) .If I donot set the "UseAllDataFields" property of the MasterTableView,I do not get this message,but the excel is blank.Please help.
<script type="text/javascript">function pageLoad() {var pager = $find('<%=RadListView1.FindControl("RadDataPager1").ClientID %>').get_element();$telerik.$(pager).find(".rdpWrap a img")[0].src = "PagingFirst.gif";$telerik.$(pager).find(".rdpWrap a img")[1].src = "PagingPrev.gif";$telerik.$(pager).find(".rdpWrap a img")[2].src = "PagingNext.gif";$telerik.$(pager).find(".rdpWrap a img")[3].src = "PagingLast.gif";}</script>Hello,
I am using the rad window for the first time. Here is the code, how I have declared rad window.
<telerik:RadWindowManager ID="RadWindowMyImage" runat="server" EnableShadow="true">
<Windows>
<telerik:RadWindow ID="RadWindow1" runat="server" Modal="true">
<ContentTemplate>
<placeholder id="iframe1" runat="server" width="400px" height="400px">
</placeholder>
</ContentTemplate>
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
and I am loading an image and launching the window like this.
PlaceHolder mybox = RadWindow1.ContentContainer.FindControl("iframe1") as PlaceHolder;
System.Web.UI.WebControls.
Image appImage = new System.Web.UI.WebControls.Image();
string base64String = Convert.ToBase64String(myimage, 0, myimage.Length); //myimage is byte array
appImage.ImageUrl = "data:image/png;base64," + base64String;
appImage.Width = Unit.Pixel(100);
appImage.Height = Unit.Pixel(100);
iframe1.Controls.Add(appImage);
RadWindow1.Visible = true;
Am I doing correctly?? My rad window is not getting poped up when I click the button. Can any one help me out in this? Where I am doing wrong?
Thanks in Advance.
Thanks,
Geetha Rani.