Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
305 views

Hi,
I am working on Project which has a Radgrid, project was running successfully and the out come is alright. But my problem is filtering and paging is not working.

<telerik:RadGrid ID="RadGrid1" Skin="WebBlue" runat="server" AllowFilteringByColumn="true" AutoGenerateColumns="true" ShowStatusBar="True" GridLines="None" AllowPaging="true" PageSize="20" AllowSorting="True" onitemdatabound="RadGrid1_ItemDataBound" EnableLinqExpressions ="false"> 

<PagerStyle Mode="NextPrevAndNumeric" />
<GroupingSettings CaseSensitive="false" /> 

<MasterTableView AutoGenerateColumns="false" EditMode="InPlace" AllowFilteringByColumn="True" 
ShowFooter="True" TableLayout="Auto" AllowSorting="true" AllowPaging="true" PageSize="20">  

<Columns>

<telerik:GridBoundColumn FilterControlWidth="50px" DataField=" total_float " HeaderText="Total Float" SortExpression=" total_float " UniqueName=" total_float ">
</telerik:GridBoundColumn> 

</Columns>
</MasterTableView>
</telerik:RadGrid> 

 

 

 

 

 


This is my code and i placed only one row for sample. 


Protected Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As EventArgs)
RadGrid1.MasterTableView.AllowFilteringByColumn = True
RadGrid1.Rebind()
End Sub  

 

 

 

 

 

Also i placed this in my code(VB) behind file.
Can any one help me, Thanks in advance.

 

 

Eyup
Telerik team
 answered on 16 Jul 2012
1 answer
102 views


I want insert and databind in radcombobox ,
How i achieve this
RadComboBoxItem Item6 = new RadComboBoxItem(Resources.Ticket.Action_Knowledge_Base);
Item6.Value = "1";
Item6.ImageUrl = "../Content/images/contextmenu/knowledgebase.png";
ddl_Actions.Items.Insert(8, Item6);
 
RadComboBoxItem Item7 = new RadComboBoxItem(Resources.Ticket.Action_CustomAction);
Item7.Value = "9";
Item7.ImageUrl = "../Content/images/contextmenu/caction.png";
ddl_Actions.Items.Insert(9, Item7);
 
RadComboBoxItem Item8 = new RadComboBoxItem(Resources.Ticket.Ticket_RemoveFromFolder);
Item8.Value = "12";
Item8.ImageUrl = "../Content/images/contextmenu/remove-from-folder.png";
ddl_Actions.Items.Insert(10, Item8);
 
RadComboBoxItem Item10 = new RadComboBoxItem(Resources.Ticket.Ticket_Create_Change_Request);
Item10.Value = "10";
Item10.ImageUrl = "../Content/images/contextmenu/changerequest_conf.png";
ddl_Actions.Items.Insert(11, Item10);
 
RadComboBoxItem Item11 = new RadComboBoxItem(Resources.TicketSubscription.Subscribe);
Item11.Value = "11";
Item11.ImageUrl = "../Content/images/contextmenu/subscribe.png";
ddl_Actions.Items.Insert(12, Item11);
 
using (var db = new TBSHelpDeskDataContext(Globals.strCon))
{
    var md = (from a in db.CustomActions select new { a.CustomAction_ID, a.Name }).ToList();
    ddl_Actions.DataSource = md;
    ddl_Actions.DataValueField = "CustomAction_ID";
    ddl_Actions.DataTextField = "Name";
    ddl_Actions.DataBind();
}


Thanks Advance,
Mohamed.
Nencho
Telerik team
 answered on 16 Jul 2012
1 answer
120 views
I have a custom module that works fine if my rad editor starts "enabled".  On pages where the default state of the editor is disabled until the user puts the form into edit mode, the module just doesn't show up.  If I just change the initial state of the editor to enabled it works fine.  Is there something I need to be registering when the page mode is changed to edit to ensure that my custom module will show up? 
Rumen
Telerik team
 answered on 16 Jul 2012
1 answer
108 views
Dear Telerik,

I have some problem here in IE it's work well but in Google chrome all my control located in my Radgrid become freeze. I don't want to use EditItemTemplate in Radgrid because of my business problem. Here is my screenshot :

   
*Arrow red is indicating freeze control. I cannot change the value.

Here is some of my aspx :
<ItemTemplate>
    <telerik:RadNumericTextBox ID="lblNominationInstruction" runat="server" MaxLength="15"
        Width="100px" Visible="true" MinValue="0" NumberFormat-DecimalDigits="4" NumberFormat-DecimalSeparator="."
        NumberFormat-GroupSeparator="," NumberFormat-GroupSizes="3" NumberFormat-KeepNotRoundedValue="True"
        DisabledStyle-BorderStyle="None" Enabled="false" DisabledStyle-BackColor="Transparent"
        DisabledStyle-ForeColor="Black" Style="text-align: right" Text='<%# DataBinder.Eval(Container.DataItem, "EntryQuantity")%>'>
    </telerik:RadNumericTextBox>
    <asp:TextBox ID="txtNominationInstruction" MaxLength="15" runat="server" Visible="false"
        Width="100px" Style="text-align: right"></asp:TextBox>
</ItemTemplate>

In my simple term, my questions is :
"How can i using textbox, dropdownlist, and any other control inside RadGrid but I still can edit its value in Google Chrome ?"

Thanks.

Eyup
Telerik team
 answered on 16 Jul 2012
7 answers
367 views
I am using Rad File Explorer, i have disabled file navigator. I would like to display file count for folder as below.

Folder1(10)
Folder2(23)
.
.
.
.
Sample(200).

Can you please suggest a way?
Ashish
Top achievements
Rank 1
 answered on 16 Jul 2012
1 answer
104 views
Does anyone know how I can know when all files are finished uploading server-side, so I can redirect to another page?

Thanks,
John
Plamen
Telerik team
 answered on 16 Jul 2012
12 answers
529 views
Hello,

When the tab key is used to navigate through the controls on a web page that contains a RadEditor, when the RadEditor is reached the toolbar buttons are activated before the editor itself.  Is there a way to have the editor activated before the toolbar buttons?

Thanks,
Craig
Rumen
Telerik team
 answered on 16 Jul 2012
3 answers
248 views
Hi,

I have a combobox that need to have its items populated based on the results from a web service. I did try the below and could not get it working. Help appreciated.

<telerik:RadComboBox ID="radTestCombo" runat="server"  EnableLoadOnDemand="true"
     EnableItemCaching="true" WebServiceSettings-UseHttpGet="true" OnClientLoad="GetServers" Label="Servers">
</telerik:RadComboBox>

Below is the javascript i use to get the information from a web service.

function GetServers(sender, eventArgs) {
                combo = sender;
                combo.trackChanges();
                $.ajax({
                    url: "http://localhost/sampleservice/sample.svc/GetAll",
                    dataType: 'json',
                    type: "GET",
                    success: function (data) {
                        alert('success');
                        $.each(data, function (i, val) {
                            var comboItem = new Telerik.Web.UI.RadComboBoxItem();
                            alert(comboItem);
                            comboItem.set_text(val.toString());
                            combo.get_items().add(comboItem);
                        });
                    }
                });
                combo.commitChanges();
                alert(combo.get_items().get_count());
            }

The alert with "success" message is never called but from fiddler i get a 200 Http status code. The WCF service method returns a list of string. Below is the raw response from fiddler:

HTTP/1.1 200 OK
Content-Length: 602
Content-Type: application/json; charset=utf-8
Date: Thu, 12 Jul 2012 15:34:46 GMT
 
["John","Smith","Charlie","DAVID","James","Bond"]

Additionally i did remove the dataType setting in the ajax call and resulted in the same. Also  i did add an error setting with an alert and have this popup on my screen even though Fiddler reported a 200 OK status with the data.
Jerry T.
Top achievements
Rank 1
 answered on 16 Jul 2012
1 answer
58 views
Hi all, 

I have a skinning problem with RadButton in IE, but not in FF and Chrome.
The RadButton right side picture is shifted for 20px and I cannot find out why. 
Can you give me a hint what to check.

I am using RadAjax version 2011.2.712.35 within DNN.
I would post the html code, but the zip. extension is not allowed ;(


Thank you, 
Kristijan

Kristijan
Top achievements
Rank 1
 answered on 16 Jul 2012
2 answers
792 views
Hi

I have a very large rad grid and when a user clicks edit on the grid I make a radwindow pop up from the code behind (the reason I do it from the code behind is because I need to do some serverside stuff to populate the radwindow).
This works fine, but when a button is clicked in the radwindow the page posts back, the window closes and the pages scrolls back to the top. I don't mind the window closing, but I need it to stay at the same scroll position.
I have tried to add the javascript on this page: http://www.telerik.com/support/kb/aspnet-ajax/window/persist-radwindow-s-scroll-position.aspx but it doesn't work.
I have wrapped the whole page in an ajax panel and I have just tried added an ajax panel in the rad window, none of which work.

The radgrid and radwindow are in a user control.
I'm not sure what else to try?
Can anyone help?

I have isolated this into a very basic page and here is my code:

Webusercontrol1:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl1.ascx.cs"
    Inherits="TestRadWindow.WebUserControl1" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadScriptManager runat="server">
</telerik:RadScriptManager>
<script type="text/javascript">
    var body = document.body;
    var docElem = document.documentElement;
    var bodyScrollTop = 0;
    var bodyScrollLeft = 0;
    var docElemScrollTop = 0;
    var docElemScrollLeft = 0;
    function OnClientBeforeClose(sender, args) {
        bodyScrollTop = body.scrollTop;
        bodyScrollLeft = body.scrollLeft;
        docElemScrollTop = docElem.scrollTop;
        docElemScrollLeft = docElem.scrollLeft;
    }
    function OnClientClose() {
        setTimeout(function () {
            body.scrollTop = bodyScrollTop;
            body.scrollLeft = bodyScrollLeft;
            docElem.scrollTop = docElemScrollTop;
            docElem.scrollLeft = docElemScrollLeft;
        }, 30);
    }
    function OpenWnd() {
        $find("wnd").show();
    }
</script>
<telerik:RadAjaxPanel runat="server">
    <telerik:RadWindowManager runat="Server" ID="RadWindowManager1" EnableViewState="false">
        <Windows>
            <telerik:RadWindow runat="server" ID="winEdit" Width="300px" Height="450px" ReloadOnShow="true"
                ShowContentDuringLoad="false" Modal="True" Behaviors="Close, Move" VisibleTitlebar="true"
                VisibleStatusbar="false" AutoSize="True" KeepInScreenBounds="True" OnClientBeforeClose="OnClientBeforeClose"
                OnClientClose="OnClientClose">
                <ContentTemplate>
                    <asp:Button runat="server" ID="btnSave" Text="button" />
                </ContentTemplate>
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    <telerik:RadGrid runat="server" ID="grdTest" AutoGenerateColumns="False" EnableLinqExpressions="False"
        OnNeedDataSource="grdTest_NeedDataSource" Width="200px" CellSpacing="0" GridLines="None">
        <MasterTableView>
            <Columns>
                <telerik:GridBoundColumn runat="server" DataField="Id" />
                <telerik:GridTemplateColumn>
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="lnkEdit" OnClick="lnkEdit_Click" Text="Edit" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid></telerik:RadAjaxPanel>

My user control code behind:
protected void Page_Load(object sender, EventArgs e)
       {
 
       }
 
       protected void grdTest_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
       {
           List<TestBind> binding = new List<TestBind>();
          for(int i=0;i<=500; i++)
          {
              TestBind t = new TestBind();
              t.Id = i;
              binding.Add(t);
          }
 
           grdTest.DataSource = binding;
       }
 
       protected void lnkEdit_Click(object sender, EventArgs e)
       {
           string script = "function f(){var win=$find(\"" + winEdit.ClientID + "\"); " +
                         " win.show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
           winEdit.VisibleOnPageLoad = true;
           ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);
       }
 
       class TestBind
       {
           public int Id { get; set; }
       }
   }

My webform:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="TestRadWindow.WebForm1" %>
 
<%@ Register src="WebUserControl1.ascx" tagname="WebUserControl1" tagprefix="uc1" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     
        <uc1:WebUserControl1 ID="WebUserControl11" runat="server" />
     
    </div>
    </form>
</body>
</html>


Any help  would be appreciated as I have spent hours on this now.

Bex
Steve
Top achievements
Rank 1
 answered on 16 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?