Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
237 views
We are modifying the RAD grid for Sharepoint and are running into a problem.   We need to change the default filter text box to a drop down combo box for some of the columns like you see in the demo: http://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultcs.aspx 

With the SharePoint control, you have to set the filter template in the GridFilteringItem class.   However, when we add the code below, the button is showing but the grid does not refresh and filter based on the combo box selection.   The filters for the other columns are working fine.   It appears that the event to filter the grid is not firing, but it is difficult to tell.

Does anyone have simple sample code or ideas that would help?

         if (e.Item is GridFilteringItem)
           {
               GridFilteringItem aSystemFilteringItem = e.Item as GridFilteringItem;
               //((Telerik.Web.UI.GridTableCell)(aSystemFilteringItem["System"])).Controls.Clear();

               Button btnTest = new Button();
               btnTest.Text ="CLick Me";
               btnTest.Click += btnTest_Click;
               ((Telerik.Web.UI.GridTableCell)(aSystemFilteringItem["System"])).Controls.Add(btnTest);

               RadComboBox aSystemFilterDropDown = new RadComboBox();
               aSystemFilterDropDown.ID = "ProcessFilterDropDown";
               aSystemFilterDropDown.Width = Unit.Pixel(150);
               aSystemFilterDropDown.Items.Add(new RadComboBoxItem("", ""));
               aSystemFilterDropDown.Items.Add(new RadComboBoxItem("CGE", "CGE"));
               //aSystemFilterDropDown.SelectedIndexChanged += aSystemFilterDropDown_SelectedIndexChanged;
               aSystemFilterDropDown.OnClientSelectedIndexChanged = "SystemIndexChanged";
               aSystemFilterDropDown.AutoPostBack = true;

               ((Telerik.Web.UI.GridTableCell)(aSystemFilteringItem["System"])).Controls.Add(aSystemFilterDropDown);

               string script = "<script type=\"text/javascript\">";
               script = script + "function SystemIndexChanged(sender, args) {alert('entered'); ";
               script = script + "var tableView = $find(\"" + ((GridItem)e.Item).OwnerTableView.ClientID + "\");";
               script = script + "tableView.filter(\"System\", args.get_item().get_value(), \"EqualTo\");";
               script = script+   "}";
               script = script + "</script>";

               LiteralControl scriptLtControl = new LiteralControl(script);
               RadScriptBlock radscript = new RadScriptBlock();
               radscript.Controls.Clear();
               radscript.Controls.Add(scriptLtControl);

               ((Telerik.Web.UI.GridTableCell)(aSystemFilteringItem["System"])).Controls.Add(radscript);

           }
Ted
Top achievements
Rank 1
 answered on 24 Sep 2014
3 answers
171 views
Hello forum

I hope you can help me out on this problem.

I have a radtextbox in which I want to select part of the text using client .selectText.

I build the client function and it works fine.

Now I want to fire the clientfunction from server-side , so i implement a "ScriptManager.RegisterStartupScript" and everything is still OK.

Then I wrap it all in radajaxpanel, whereafter my server functions fire ok , but now cant detect my radtextbox.
(  my clientbutton still runs fine.)


How do I call my clientscript correct from serverside, to be able to still detect my radtextbox?

Regards
Mark

my base code is: 

   <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager> 
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px">  
    <telerik:RadScriptBlock ID="myscriptblock" runat="server">      
        <script type="text/javascript">

     function test() {

         var tb = $find("mytxt");
         alert(tb);          
         tb.selectText(3, 6);
         return false;
      
     }
    
        </script>
    </telerik:RadScriptBlock>
         <telerik:RadTextBox ID="mytxt" ClientIDMode="Static" Runat="server"  Text="1 2 3 4 5 6 7 8 9" >
         </telerik:RadTextBox>
         <button runat="server" id="mybutton" onclick="test();return false;">findpos</button>         
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />   
    </telerik:RadAjaxPanel>
 </form>

cs:----------------------------------------------------------------------------------------
 protected void Button1_Click(object sender, EventArgs e)
    {
        ScriptManager.RegisterStartupScript(this, this.GetType(), "eScript", "test();", true); 
    }














Mark
Top achievements
Rank 1
 answered on 24 Sep 2014
3 answers
488 views
Hi,

I would like to use DataFormatString in my radgrid to convert numbers:
DataFormatString="{0:# ### ###}"
It's working perfectly with numbers like 54210 = 54 210.
But it's not working with zeros (0).

Also what can I do with negative numbers? Now it's like -54210 = - 54 210. I want it to be -54 210.

How can I fix this?

Thanks!
Konstantin Dikov
Telerik team
 answered on 24 Sep 2014
9 answers
880 views
First of all, pardon for my bad English, I'm using google translator.. =P

I have a question, Is it possible to give a design to a Radgrid caption header when exporting to Excel
For example, align to the left, size, bold, background-color, etc.          Not only to the MasterTableView, also the DetailTables.

I have tried to do this from the ItemCreated event, but unfortunately I could not do this.
Only worked for the header columns and data (GridHeaderItem, GridDataItem).

The caption header always appears centered and without background color.

How I can provide design to de caption header?
-----------------------------------------------------------------------
                        Caption Header
-----------------------------------------------------------------------
Header1    Header2    Header3    Header4
-----------------------------------------------------------------------
Data1        Data2        Data3        Data4
Kostadin
Telerik team
 answered on 24 Sep 2014
1 answer
191 views
As displayed in the attached image. I would like to know that how to display the root menu items in multiline. I want to display the text in two lines.
Magdalena
Telerik team
 answered on 24 Sep 2014
1 answer
88 views
Hi,
I want to customize my scheduler in a way that if two adjacent time slots have appointments then they should be shown in different color.
Attaching file for reference.

Thanks
Boyan Dimitrov
Telerik team
 answered on 24 Sep 2014
1 answer
407 views
Hi all:

I have a RadToolBar on an ASP.NET Ajax page and expanded the toolbar width to 1280, setting the 9 buttons to widths of 100 to spread them out. I selected the Office2010 silver skin, is there a way to set the button text to be centered? When I run now the text is left-aligned.

John
Magdalena
Telerik team
 answered on 24 Sep 2014
1 answer
100 views
Hello Telerik Team,

we have used the UI for ASP.NET AJAX Telerik toolkit in our application. Recently we have upgraded the Telerik version from older version “2012.2.724.35” to the new version “2014.1.403.45”. After upgrading the Telerik version we are facing some functionality issues. We need your help on identifying the fix for following mentioned issue. 

Following is the issue which we are facing after upgrading Telerik Version to“2014.1.403.45” i.e UI for ASP.NET AJAX Q1 2014 

Issue : If the Radcombobox is present inside the Ajax panel. In this case when we perform any search within the Radcombobox and press enter key from keyboard to select that option, then page does a full postback instead of partial postback. It seems it is executing the partial postback and then doing full postback. We have used Radcomboboxes in our overall site and this is most major issue which we are facing.We need a generic fix as we don’t want to change many pages to fix this problem. Can you please suggest how we can fix this issue?

FYI: Instead of Enter key if we use mouse click to select option within RadCombobox then partial post back does correctly.

Is this kind of issues were got fixed in other higher version of Telerik such as UI for ASP.NET Ajax 2014 Q2? Please advice

Any help on above issue is highly appreciable.

Thanks,
Riz
Dimitar Terziev
Telerik team
 answered on 24 Sep 2014
1 answer
135 views
Hi

I have a RadTab and RadMultiPageView. I am adding New Tab and New Page View from Java Script and loading PageView with an URL.

Now I want to find an element in the loaded PageView with URL.

It is loading content in iFrame and I could not get the elements in it as there is no ID with the iFrame and cannot find that.

Please help.
Dimitar Terziev
Telerik team
 answered on 24 Sep 2014
1 answer
55 views
I have a public property witch looks like this
public string SelectedCountry
{
get { return this.cmbCountry.SelectedValue; }
}
Where i receive what the user has selected in the RadComboBox.

Now I want to filter my gird by this selected value how can I do this ?

On the gird page I prepared method like this witch is triggered when the user clicks on a button (apply filter)

protected void Af_FilterButtonClicked(object sender, EventArgs args)
{
jobFilter.SelectedCountry.Where() //jobFilter is my custom control
}

I thought that I have to do something like this ?Thanks for help and fast answer !
Angel Petrov
Telerik team
 answered on 24 Sep 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?