Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
199 views
Hi,
  In my radgrid, I need to use a GridButton column with button type as LinkButton. I enabled filtering with help of http://www.telerik.com/community/code-library/aspnet-ajax/grid/filtering-and-sorting-for-gridbuttoncolumn.aspx. This works fine with the help of the filter icon. My requirement is to hide the filter icon and have the default filtering set and apply filter.

Grid definition:
<custom:GridButtonColumnWithFilteringSorting HeaderText="" UniqueName="LastName"  DataTextFormatString="{0}" 
SortExpression="LastName" DataTextField="LastName" DataField="LastName" ItemStyle-CssClass="myLink"
CommandName="DisplayMember" HeaderButtonType="LinkButton" ButtonType="LinkButton"
CurrentFilterFunction
="StartsWith"  AutoPostBackOnFilter="true"  ShowFilterIcon="false"  />

When I type a filter text and hit ENTER key, I don't see postback happening thereby triggering the filter. Am I missing something here? How do I trigger filter from here?

Thanks in advance.
~/Ananth
Eyup
Telerik team
 answered on 18 Jun 2015
1 answer
93 views

Hi,

 

In My Application I have Cascading combo box, User is selecting one combo box and based on selection of first combo box second combo box  will get populated,  now I am storing those values to database and I want to set the value of combo box from Java script to allow user to update those values. To do so how can I set the text of combo box having LoadOnDemand from javascript. e.g. My combobox will have the items as

Employee ID    EmployeeName

1                          ABC

2                          PQR

now I am getting PQR from database and I want to set it to Combo box having PopulateOnDemand Property = true. I tried to create the object of Combobox in JavaScript and then tried with FindItemByText property, but since combo box is configured to Load on demand it is not able to find anything and not able to set the value.

Please let me know how to do it using JavaScript.

Nencho
Telerik team
 answered on 18 Jun 2015
1 answer
187 views

How can I get all data from the RadGrid at client side to build a json string with the new data?

using the following code I Tried 

01.<telerik:GridTemplateColumn UniqueName="ColDepartment" DataField="DepartmentId" HeaderStyle-HorizontalAlign="Left">
02.<ItemTemplate>
03.      <asp:Label ID="DepartmentNameLbl" runat="server" Text='<%#Bind("Department.Name") %>'></asp:Label>
04.</ItemTemplate>
05. 
06.<EditItemTemplate>
07.      <telerik:RadDropDownList runat="server" ID="DepartmentsDdl" DataValueField="Id" DataTextField="Name" OnPreRender="DepartmentsDdl_PreRender"></telerik:RadDropDownList>
08.        </EditItemTemplate>
09.
</telerik:GridTemplateColumn>

1.batchManagerObject.getCellValue(cellObject);

but it gives me the displayed value [DepartmentName] What I need is the [DepartmentId]

Angel Petrov
Telerik team
 answered on 18 Jun 2015
2 answers
224 views

HI Telerik

 I have htmlEcoded data coming from an external source. 

If I set the radeditor's content to this htmlEncoded data, it doesn't display properly. If I htmldecode this data and then set it to radeditor's content... it displays properly..

Can you pls explain why it is so. Also is it ok to htmldecode data and display in editor.

Please reply..

Thanks,

Nick.

Nick
Top achievements
Rank 1
 answered on 18 Jun 2015
2 answers
454 views
          
Hi ,
I want to open radwindow on click of link button with help of radopen() javascript method.. i am getting error
"Microsoft JScript runtime error: Object doesn't support this property or method" how can i call radwindow to open with radopen() method.
Code :
------
       <asp:LinkButton ID="lnk_ForgotPassqord" runat="server" OnClientClick="OpenRadWin(); return false;"
              Style="font-size: 11px; padding-left: 20px;">Forgot password?</asp:LinkButton>

            <telerik:RadWindowManager ID="radWindowManager" runat="server">
             <Windows>
                 <telerik:RadWindow ID="radWindow" Skin="Vista" runat="server" Title="User List Dialog"
                    Height="500px" Width="300px" Left="150px" Modal="true">
                </telerik:RadWindow>
                </Windows>
            </telerik:RadWindowManager>

Javascript code :
----------------------
 <script language="javascript" type="text/javascript">
        function OpenRadWin() {
            debugger;
            radopen(null, "radWindow");
        }
    </script>

Regards,
Akki
Vivek
Top achievements
Rank 1
 answered on 18 Jun 2015
6 answers
343 views
Hi,

I created an RabToolBarButton and didn't assign it an icon but it comes by default with the "Refresh" icon when I add it to a RadFileExplorer's ToolBar.

What I need to do to remove the refresh icon?
I tried setting the icon to another image file but it just adds it on top of the refresh icon...

Here's an image of what it looks like

Here's the code :

RadToolBarButton toolbarBtnAlertMe = new RadToolBarButton("Alert Me");
toolbarBtnAlertMe.NavigateUrl = "http://someurl.com";
fileExplorer.ToolBar.Items.Add(toolbarBtnAlertMe);
Vessy
Telerik team
 answered on 17 Jun 2015
1 answer
111 views

I have an issue with the Diagram control when the LayoutType is Layered or Force.

With the code below, when either the GreatGrandChild 1 or GrandChild 1 shapes are moved, the connector between the two is pinned. BuildErrorDiagram() is called in  Page_Load.

The image files attached show the before and after on the shap move.

<ASPX Code>

 <div>
        <telerik:RadDiagram ID="RadDiagram1" runat="server" Height="950px"></telerik:RadDiagram>
    </div>

 

<C# Code Behind>

        private void BuildErrorDiagram()
        {
            RadDiagram1.ConnectionsCollection.Clear();
            RadDiagram1.ShapesCollection.Clear();

            RadDiagram1.LayoutSettings.Type = Telerik.Web.UI.Diagram.LayoutType.Layered;
            RadDiagram1.LayoutSettings.Subtype = Telerik.Web.UI.Diagram.LayoutSubtype.Horizontal;


            Telerik.Web.UI.DiagramShape p1 = new Telerik.Web.UI.DiagramShape();
            p1.Id = "P0";
            p1.ContentSettings.Text = "Parent 0";
            RadDiagram1.ShapesCollection.Add(p1);

            Telerik.Web.UI.DiagramShape c1 = new Telerik.Web.UI.DiagramShape();
            c1.Id = "C1";
            c1.ContentSettings.Text = "Child 1";
            RadDiagram1.ShapesCollection.Add(c1);

            Telerik.Web.UI.DiagramShape c2 = new Telerik.Web.UI.DiagramShape();
            c2.Id = "C2";
            c2.ContentSettings.Text = "Child 2";
            RadDiagram1.ShapesCollection.Add(c2);

            Telerik.Web.UI.DiagramShape gc1 = new Telerik.Web.UI.DiagramShape();
            gc1.Id = "GC1";
            gc1.ContentSettings.Text = "GrandChild 1";
            RadDiagram1.ShapesCollection.Add(gc1);

            Telerik.Web.UI.DiagramShape gc2 = new Telerik.Web.UI.DiagramShape();
            gc2.Id = "GC2";
            gc2.ContentSettings.Text = "GrandChild 2";
            RadDiagram1.ShapesCollection.Add(gc2);

            Telerik.Web.UI.DiagramShape gc3 = new Telerik.Web.UI.DiagramShape();
            gc3.Id = "GC3";
            gc3.ContentSettings.Text = "GrandChild 3";
            RadDiagram1.ShapesCollection.Add(gc3);

            Telerik.Web.UI.DiagramShape gc4 = new Telerik.Web.UI.DiagramShape();
            gc4.Id = "GC4";
            gc4.ContentSettings.Text = "GrandChild 4";
            RadDiagram1.ShapesCollection.Add(gc4);

            Telerik.Web.UI.DiagramShape ggc1 = new Telerik.Web.UI.DiagramShape();
            ggc1.Id = "GGC1";
            ggc1.ContentSettings.Text = "GreatGrandChild 1";
            RadDiagram1.ShapesCollection.Add(ggc1);



            Telerik.Web.UI.DiagramConnection dsc1 = new Telerik.Web.UI.DiagramConnection();
            dsc1.ToSettings.ShapeId = p1.Id;
            dsc1.FromSettings.ShapeId = c1.Id;
            dsc1.EndCap = Telerik.Web.UI.Diagram.ConnectionEndCap.ArrowEnd;
            dsc1.StartCap = Telerik.Web.UI.Diagram.ConnectionStartCap.FilledCircle;
            dsc1.StrokeSettings.DashType = Telerik.Web.UI.Diagram.StrokeDashType.Solid;
            dsc1.ContentSettings.Color = "#fff";

            RadDiagram1.ConnectionsCollection.Add(dsc1);

            Telerik.Web.UI.DiagramConnection dsc2 = new Telerik.Web.UI.DiagramConnection();
            dsc2.ToSettings.ShapeId = p1.Id;
            dsc2.FromSettings.ShapeId = c2.Id;
            dsc2.EndCap = Telerik.Web.UI.Diagram.ConnectionEndCap.ArrowEnd;
            dsc2.StartCap = Telerik.Web.UI.Diagram.ConnectionStartCap.FilledCircle;
            dsc2.StrokeSettings.DashType = Telerik.Web.UI.Diagram.StrokeDashType.Solid;
            dsc2.ContentSettings.Color = "#fff";

            RadDiagram1.ConnectionsCollection.Add(dsc2);
             
             Telerik.Web.UI.DiagramConnection dsc3 = new Telerik.Web.UI.DiagramConnection();
            dsc3.ToSettings.ShapeId = c1.Id;
            dsc3.FromSettings.ShapeId = gc1.Id;
            dsc3.EndCap = Telerik.Web.UI.Diagram.ConnectionEndCap.ArrowEnd;
            dsc3.StartCap = Telerik.Web.UI.Diagram.ConnectionStartCap.FilledCircle;
            dsc3.StrokeSettings.DashType = Telerik.Web.UI.Diagram.StrokeDashType.Solid;
            dsc3.ContentSettings.Color = "#fff";

            RadDiagram1.ConnectionsCollection.Add(dsc3);
 
            Telerik.Web.UI.DiagramConnection dsc4 = new Telerik.Web.UI.DiagramConnection();
            dsc4.ToSettings.ShapeId = c2.Id;
            dsc4.FromSettings.ShapeId = gc2.Id;
            dsc4.EndCap = Telerik.Web.UI.Diagram.ConnectionEndCap.ArrowEnd;
            dsc4.StartCap = Telerik.Web.UI.Diagram.ConnectionStartCap.FilledCircle;
            dsc4.StrokeSettings.DashType = Telerik.Web.UI.Diagram.StrokeDashType.Solid;
            dsc4.ContentSettings.Color = "#fff";

            RadDiagram1.ConnectionsCollection.Add(dsc4);

            Telerik.Web.UI.DiagramConnection dsc40 = new Telerik.Web.UI.DiagramConnection();
            dsc40.ToSettings.ShapeId = gc2.Id;
            dsc40.FromSettings.ShapeId = gc3.Id;
            dsc40.EndCap = Telerik.Web.UI.Diagram.ConnectionEndCap.ArrowEnd;
            dsc40.StartCap = Telerik.Web.UI.Diagram.ConnectionStartCap.FilledCircle;
            dsc40.StrokeSettings.DashType = Telerik.Web.UI.Diagram.StrokeDashType.Solid;
            dsc40.ContentSettings.Color = "#fff";

            RadDiagram1.ConnectionsCollection.Add(dsc40);

            Telerik.Web.UI.DiagramConnection dsc411 = new Telerik.Web.UI.DiagramConnection();
            dsc411.ToSettings.ShapeId = gc3.Id;
            dsc411.FromSettings.ShapeId = gc4.Id;
            dsc411.EndCap = Telerik.Web.UI.Diagram.ConnectionEndCap.ArrowEnd;
            dsc411.StartCap = Telerik.Web.UI.Diagram.ConnectionStartCap.FilledCircle;
            dsc411.StrokeSettings.DashType = Telerik.Web.UI.Diagram.StrokeDashType.Solid;
            dsc411.ContentSettings.Color = "#fff";

            RadDiagram1.ConnectionsCollection.Add(dsc411);

            Telerik.Web.UI.DiagramConnection dsc41 = new Telerik.Web.UI.DiagramConnection();
            dsc41.ToSettings.ShapeId = gc2.Id;
            dsc41.FromSettings.ShapeId = gc3.Id;
            dsc41.EndCap = Telerik.Web.UI.Diagram.ConnectionEndCap.ArrowEnd;
            dsc41.StartCap = Telerik.Web.UI.Diagram.ConnectionStartCap.FilledCircle;
            dsc41.StrokeSettings.DashType = Telerik.Web.UI.Diagram.StrokeDashType.Solid;
            dsc41.ContentSettings.Color = "#fff";

            RadDiagram1.ConnectionsCollection.Add(dsc41);

            Telerik.Web.UI.DiagramConnection dsc5 = new Telerik.Web.UI.DiagramConnection();
            dsc5.ToSettings.ShapeId = gc1.Id;
            dsc5.FromSettings.ShapeId = ggc1.Id;
            dsc5.EndCap = Telerik.Web.UI.Diagram.ConnectionEndCap.ArrowEnd;
            dsc5.StartCap = Telerik.Web.UI.Diagram.ConnectionStartCap.FilledCircle;
            dsc5.StrokeSettings.DashType = Telerik.Web.UI.Diagram.StrokeDashType.Solid;
            dsc5.ContentSettings.Color = "#fff";

            RadDiagram1.ConnectionsCollection.Add(dsc5);

            Telerik.Web.UI.DiagramConnection dsc6 = new Telerik.Web.UI.DiagramConnection();
            dsc6.ToSettings.ShapeId = gc4.Id;
            dsc6.FromSettings.ShapeId = ggc1.Id;
            dsc6.EndCap = Telerik.Web.UI.Diagram.ConnectionEndCap.ArrowEnd;
            dsc6.StartCap = Telerik.Web.UI.Diagram.ConnectionStartCap.FilledCircle;
            dsc6.StrokeSettings.DashType = Telerik.Web.UI.Diagram.StrokeDashType.Solid;
            dsc6.ContentSettings.Color = "#fff";

            RadDiagram1.ConnectionsCollection.Add(dsc6);

        }

 

 --- END OF CODE

 

Thank you.

Vessy
Telerik team
 answered on 17 Jun 2015
1 answer
304 views

I have a framed site with an IFrame containing a Radgrid. From the grid I have pop up RadWIndows that pop up in modal form, but they are contained within the iFrame.

Is it possible to bust these modal pop ups over the iframe, the main reason is content and several scroll bars which makes using the pop very difficult with a lot of content.

Andy

Marin Bratanov
Telerik team
 answered on 17 Jun 2015
4 answers
130 views
I have been trying to determine how to make either a diagram shape size fit the text or fit the text to the shape size.  Can someone please explain how this can be done? 
Vessy
Telerik team
 answered on 17 Jun 2015
3 answers
81 views

Hi,

I have drag/drop working ok from a grid to treeview node using this code:

function RadGrid1_OnRowDropping(sender, args) {
 
    if (currentNode) {
        var fld = $get("<%= nodeValueHiddenField.ClientID %>");
        fld.value = currentNode.get_value();
        args.set_destinationHtmlElement(fld);

        //args.set_destinationHtmlElement(fld.id);// Have tried both options

    }
    else {
        args.set_cancel(true);
    }
}
 

 currentNode gets set using mouseover/out of the treeview, fld is a valid reference to my <input type="hidden"/> field. Whenever the server side event is fired (by ajax) though, e.HtmlElement is always the string "undefined":

protected void RadGrid1_RowDrop(object sender, GridDragDropEventArgs e)
{
    if ((!String.IsNullOrEmpty(e.HtmlElement)) &&
        (e.DraggedItems.Count > 0))
 

 

 

 

 

 

Angel Petrov
Telerik team
 answered on 17 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?