Telerik Forums
UI for ASP.NET AJAX Forum
15 answers
569 views
Hi,

I have a radGrid on my aspx page, where filters on columns should have default function as "Contains". I am able to do this in grid's itemdatabound event. when the user searches from filter box it should check for "Contains", but he can use other filter functions like "starts with" and "ends with' by clicking on filter icon. But after typing search value, he chooses say for ex. "Ends with" from filter menu, the results should be bound with items matching "ends with" search text. Soon after the results are bound, filter function should change to "Contains". Help me with this



Thanks,
Farjana
Princy
Top achievements
Rank 2
 answered on 29 Jul 2014
6 answers
529 views

I have a rad panel bar.
In its item click i want the selected value.

I'm binding the panel bar using:

RadPanelBar_MenuLeft.DataSource = _dtFunctions;  
            RadPanelBar_MenuLeft.DataFieldID = "FunctionID";  
            RadPanelBar_MenuLeft.DataTextField = "FunctionName";  
            RadPanelBar_MenuLeft.DataValueField = "FunctionID";  
            RadPanelBar_MenuLeft.DataNavigateUrlField = "PageName";  
            RadPanelBar_MenuLeft.DataBind();  

private void RadPanelBar_MenuLeft_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)  
    {  
        if (e.Item.Items.Count > 0)  
        {  
            if (e.Item.Expanded == false)  
            {  
                _Val = "Collapsed panel item - " + e.Item.Value;  
            }  
           else  
            {  
                _Val = "Expanded panel item - " + e.Item.Value;  
            }  
        }  
        else  
        {  
             _Val = "Clicked panel item - " + e.Item.Value;  
       }  
    } 
 
 
 
 
The Panel item click will work if the DataNavigateUrlField is not given. 
How to get the selected items value even if the DataNavigateUrlField is given. 
Plz help  




and on init
this.RadPanelBar_MenuLeft.ItemClick += new Telerik.Web.UI.RadPanelBarEventHandler(this.RadPanelBar_MenuLeft_ItemClick); 

Shinu
Top achievements
Rank 2
 answered on 29 Jul 2014
3 answers
181 views
I have a grid named gvTabList which in inside the usercontrol . I load this usercontrol at runtime from Default.aspx when an image button is clicked.

<telerik:RadAjaxManager ID="radAjaxManagerTab" runat="server">
                               <AjaxSettings>
                                   <telerik:AjaxSetting AjaxControlID="gvTabList">
                                       <UpdatedControls>
                                           <telerik:AjaxUpdatedControl ControlID="gvTabList" LoadingPanelID="ajaxLoadingPanel"  />
                                                                             
                                       </UpdatedControls>
                                   </telerik:AjaxSetting>
                               </AjaxSettings>
                           </telerik:RadAjaxManager>
                            <telerik:RadAjaxLoadingPanel ID="ajaxLoadingPanel" runat="server" IsSticky="true"
                       Skin="Default" Style="position: absolute; z-index: 101; top: 0; left: 0;">
                       <img alt="Loading" src="../Images/Loading.gif" />
                   </telerik:RadAjaxLoadingPanel>
                           <telerik:RadGrid ID="gvTabList" runat="server" Skin="WebBlue" AllowFilteringByColumn="True"
                               AllowPaging="True" PageSize="5" AllowSorting="True"
                                OnNeedDataSource="gvTabList_NeedDataSource"
                                OnInit="gvTabList_Init"
                                AutoGenerateColumns="False" GridLines="None" OnSortCommand="gvTabList_SortCommand" EnableAJAX="True" >                             
                               <GroupingSettings CaseSensitive="false" />
                               <MasterTableView AllowFilteringByColumn="true" AllowMultiColumnSorting="false" AllowCustomSorting="true">
                                   <RowIndicatorColumn Visible="False">
                                       <HeaderStyle Width="20px"></HeaderStyle>
                                   </RowIndicatorColumn>
                                   <ExpandCollapseColumn Visible="False">
                                       <HeaderStyle Width="19px"></HeaderStyle>
                                   </ExpandCollapseColumn>
                                   <CommandItemSettings ExportToPdfText="Export to Pdf" />
                                   <Columns>
                                       <telerik:GridBoundColumn AllowFiltering="False" DataField="ID" HeaderText="HEDIS #"
                                           UniqueName="HedisID">
                                           <HeaderStyle HorizontalAlign="Center" Width="140" />
                                           <ItemStyle HorizontalAlign="Center" />
                                       </telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn AllowFiltering="False" DataField="HedisSubMeasure" HeaderText="HEDIS Domain"
                                           UniqueName="HedisDomain">
                                           <HeaderStyle HorizontalAlign="Center" Width="150" />
                                           <ItemStyle HorizontalAlign="Center" />
                                       </telerik:GridBoundColumn>
                                          
                                   </Columns>
                               </MasterTableView>
                                <PagerStyle Mode="NumericPages" />
                           </telerik:RadGrid>


I need to display this control when the user clicks the image button that is why I have kept it inside btnLoadControl_Click event. But there are so many forums saying controls have to be loaded either during Page_Load or Init method. I am not sure how to do that.

protected void btnLoadControl_Click(object sender, ImageClickEventArgs e)
       {
             UserControl control = (UserControl)LoadControl("~/Controls/" + Usercontrolname + ".ascx");
 
       }


There is no problem loading the usercontrol when the condition is met. But the problem is when I click the heading of any column, the sortorder does not change. I have my funtion to handle the CustomSorting which is given below.

protected void gvTabList_SortCommand(object source, GridSortCommandEventArgs e)
       {          
            GridSortExpression sortExpr = new GridSortExpression();          
           switch (e.OldSortOrder)           
           {
               case GridSortOrder.None:
                   sortExpr.FieldName = e.SortExpression;
                   sortExpr.SortOrder = GridSortOrder.Descending;
                   e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);                   
                   break;
               case GridSortOrder.Ascending:
                   sortExpr.FieldName = "ID";
                   sortExpr.SortOrder = GridSortOrder.Ascending;
                   e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);
                     
                   break;
               case GridSortOrder.Descending:
                   sortExpr.FieldName = e.SortExpression;
                   sortExpr.SortOrder = GridSortOrder.Ascending;
                   e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);
                    
                   break;
           }
           e.Canceled = true;    
           gvTabList.Rebind();
  
       }

I checked by debugging, but " e.OldSortOrder" always gives "None" type.
Is this problem related with dynamically loading the usercontrol . As you can see I need this usercontrol only when the Image button is clicked. so I am not loading it in Init method.
If any one has faced this problem, please send me the solution. It will be a great help.












RB
Top achievements
Rank 1
 answered on 28 Jul 2014
2 answers
140 views
I have a problem with RadGrid, when I edit a record in the grid, this is dropped records showing others wrong.
The same behavior to Add Record

sending two attachments with pictures.
sending an attachment with the grid code

Telerik Versión: 2013.3.1015.45
David
Top achievements
Rank 1
 answered on 28 Jul 2014
1 answer
101 views
Hi,

I'm populating a Gallery from a datasource in code behind.  However, in some instance we want to put a static image before the retrieved results (eg. If there is a special offer on an item, the special offer image should be the first image in the gallery before the images from the datasource start the slideshow)

Can anyone please help with this?  I am struggling to both insert a static item from code behind and then ensure it is the first image in the slideshow.

Regards

Dale
Maria Ilieva
Telerik team
 answered on 28 Jul 2014
1 answer
127 views
For web users who don't have the fonts that I've specified in RadEditor, I'd like to be able to specify substitute fonts, like you can with font-family in CSS. Does RadEditor support this?
Ianko
Telerik team
 answered on 28 Jul 2014
3 answers
135 views
Hi,

I've an implementation of RadGrid, source for which is OData.I am getting error when I apply the "Contains" filter. I found that the filter expression generated by the radgrid is not resolved by the OData and I get the following error.
The expression (([1].ColumnName1 = 1234) And IIF(([1].ColumnName2 = null), "", [1].ColumnName2).Contains("abc")) is not supported.

This issue started occurring after I updated the RadGrid dll from version 2012.1.215.35 to version 2014.2.618.35.

In the old version the filter expression used to be:
ColumnName1 = 1234 &&(ColumnName2.Contains("abc"))
Whereas with the new dll this expression is generated as:
ColumnName1 = 1234 && (iif(ColumnName2== null,"", ColumnName2).Contains("abc"))

Please help as soon as possible.

Thanks
Vasil
Telerik team
 answered on 28 Jul 2014
1 answer
72 views
please see my pic ......... and help me T_T
Vessy
Telerik team
 answered on 28 Jul 2014
1 answer
64 views
I'm looking have a JS event occur when the month & year is cleared from a RadMonthYearPicker control. I don't see a way to do this in the telerik documentation currently. Does anyone have any code samples of how to do this?
Johnathan
Top achievements
Rank 1
 answered on 28 Jul 2014
6 answers
113 views
When i press the little triangle next to 'Today' in the header of the scheduler, the calendar is only partially shown.
The bottom row with dates has disappeared and i am missing a few icons left and right of the header text
The functionallity (go to prev month, next month, etc) is working, just no icons.

Any suggestions where to look ?
Aneliya Petkova
Telerik team
 answered on 28 Jul 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?