Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
45 views
Hello,
I ve a listview with a datapager. 
Each item link to a page. How can I keep the page of the item when I click back (because now it only return to the first page... )
Blop
Top achievements
Rank 1
 asked on 03 Sep 2012
0 answers
65 views
hi ,

not sure if this is the right place to post this but i thought it might be useful for people , i implemented the custom Google Style filter , as per the example given , but i have found a way to extend it , so the filter options are based on the current visible results in the grid , i.e if you have allready put another filter in place , it limits the filter results in the other columns based on the results on the previous filters.

here is the code for it.
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));
        }
    }

Peter
Top achievements
Rank 1
 asked on 03 Sep 2012
1 answer
70 views
Hi,
I am able to export the grid in HTML and PDF formats.However when I use

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.


Thanks,
Asha
Andrey
Telerik team
 answered on 03 Sep 2012
2 answers
193 views
Hi,

I want to change the style of browse button of RadUpload. I want to change its background image and size. Please help me to achieve this.

Thanks in advance.
Sigma
Ivan Zhekov
Telerik team
 answered on 03 Sep 2012
1 answer
52 views

Hi,

I have a char bind from database and i want % sing with my chart result. Please see attachment for detail.
Petar Marchev
Telerik team
 answered on 03 Sep 2012
6 answers
374 views
Hello,

I have a scenario that requires me to change the image on a particular RadButton from javascript.  Is this possible?  It is easy to change the text using the "set_text" function but changing the Image doesn't seem to be possible directly using the api.

Any help would be appreciated.

Thanks,
Ben
Slav
Telerik team
 answered on 03 Sep 2012
0 answers
50 views
Hi!
I've a listview (with dropdownlists used as filters). Everything is working fine until SeoPaging is integrated.

First the "prev - next, ..." buttons dissapears (image not found logo replace the initial buttons images) even if I set : NextPageImageUrl="\Images\buttons\next.jpg" LastPageImageUrl="\Images\buttons\last.jpg"  in radatapager properties.


I tried doing that as explain in this forum: 
<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>

But is says Cannot call method 'get_element' of null 
...


Second: When SeoPaging is enabled, I lost the filters on page change. For instance I have my listview with all data, when I apply a filter, it will do it correctly but when I click on page 2, it will go page 2 but all data will be back and the filter is forget...

Any idea how to solve this?

Thanx in advance
Blop
Top achievements
Rank 1
 asked on 03 Sep 2012
5 answers
193 views
Hi,

I have a RadGrid bound server-side to a DataTable and in a RadAjaxManager and a filter on a GridBoundColumn with string values. 
The filter works fine except when I search for a backslash '\'. When escaped "\\" the filter works.
and it seems this filter doesn't work there either.
Is there a workaround this? 

Thank you
Nikoleta
Andrey
Telerik team
 answered on 03 Sep 2012
7 answers
162 views
Hi all,
I want to set focus on a checkbox in header row of a radgrid after showing a warning. I want o achieve this in callback function. Please help me.
Thanks
abhi
Abhi
Top achievements
Rank 1
 answered on 03 Sep 2012
5 answers
101 views
Hello.
We use RadCombobox with EnableLoadOnDemand="True".
When user type 3 or more characters  in combbox it starts loading data from server. During this action it shows "Loading..." message box. If user press Tab during this action ClientSelectionTextChanged doesn't not fire.
Genady Sergeev
Telerik team
 answered on 03 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?