Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
416 views
Currently is doing full postback to server which is slow in reponse. A snippet of the code below:

%

@ Register Src="~/UserControls/ExecutionMktSeg.ascx" TagName="ExecutionMktSeg"

 

 

TagPrefix="ucKpi" %>

 

<%

--<%@ Register Src="~/UserControls/ExecutionMktSegMobile.ascx" TagName="ExecutionMktSegMobile"

 

TagPrefix="ucMktSeg" %>--

 

%>

 

<

 

asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

 

 

<telerik:RadTabStrip ID="RadTabStrip1" runat="server"

 

 

MultiPageID="RadMultiPage1" SelectedIndex="0">

 

 

<tabs>

 

 

<telerik:RadTab runat="server" Text="Desktop" PageViewID="DesktopPageView"></telerik:RadTab>

 

 

<telerik:RadTab runat="server" Text="Mobile" PageViewID="MobilePageView" ></telerik:RadTab>

 

 

<telerik:RadTab runat="server" Text="Server" PageViewID="ServerPageView"

 

 

Selected="True" ></telerik:RadTab>

 

 

<telerik:RadTab runat="server" Text="GPG" PageViewID="GPGPageView" ></telerik:RadTab>

 

<%

-- <telerik:RadTab runat="server" Text="Misc" PageViewID="MiscPageView" ></telerik:RadTab>--%>

 

 

</tabs>

 

 

</telerik:RadTabStrip>

 

 

<telerik:RadMultiPage ID="RadMultiPage1" runat="server"

 

 

RenderSelectedPageOnly="false" SelectedIndex="0">

 

 

<telerik:RadPageView ID="DesktopPageView" runat="server">

 

 

<asp:Table ID="Table1" runat="server" Width="100%">

 

<%

-- <tr>

 

<td>

<label ID="commitpackowner" runat="server" text="PC (Tjone Irene)"></label>

</td>

</tr>--

 

%>

 

 

<asp:TableRow ID="TableRow1" runat="server">

 

 

<asp:TableCell ID="TableCell1" runat="server">

 

 

<asp:Button ID="btn_DesktopCommitPackTr" runat="server" CssClass="GridButton" Text="Commit & Pack (Hide)" OnClick="GridDisplayControl"></asp:Button>

 

 

</asp:TableCell>

 

 

</asp:TableRow>

 

 

<asp:TableRow ID="TableRow9" runat="server">

 

 

<asp:TableCell ID="DesktopCommitPackTr" runat="server">

 

 

<ucKpi:ExecutionMktSeg ID="DesktopCommitPack" runat="server" />

 

 

</asp:TableCell>

 

 

</asp:TableRow>

 

 

<asp:TableRow ID="TableRow2" runat="server">

 

 

<asp:TableCell ID="TableCell2" runat="server">

 

 

<asp:Button ID="btn_DesktopUTSTr" runat="server" CssClass="GridButton" Text="UTS Inventory (Hide)" OnClick="GridDisplayControl"></asp:Button>

 

 

</asp:TableCell>

 

 

</asp:TableRow>

 

 

</asp:Table>

 

 

 

 

 

</telerik:RadPageView>

 

 

 

 

<%

-- <telerik:RadPageView ID="MiscPageView" runat="server">

 

<ucKpi:ExecutionKpi ID="MiscMktSeg" runat="server" />

</telerik:RadPageView>--

 

%>

 

 

</telerik:RadMultiPage>

 

</

 

asp:Content>

 



 

protected void GridDisplayControl(object sender, EventArgs e)

 

{

 

string gridID = this.ToggleGridDisplay(sender, e);

 

 

Control executionGrid = (Control)DeepFindControl(this.Page, gridID);

 

 

if (executionGrid != null)

 

{

 

if (executionGrid.Visible == true)

 

{

executionGrid.Visible =

false;

 

((

Button)sender).Text = ((Button)sender).Text.Replace("Hide", "Show");

 

}

 

else

 

{

executionGrid.Visible =

true;

 

((

Button)sender).Text = ((Button)sender).Text.Replace("Show", "Hide");

 

}

}

}

 

private string ToggleGridDisplay(object sender, EventArgs e)

 

{

 

string buttonId = ((Button)sender).ID;

 

 

string gridID = buttonId.Split('_')[1];

 

 

return gridID;

 

}

 

private Control DeepFindControl(Control control, string id)

 

{

 

Control foundControl = null;

 

 

if (control.ID == id)

 

{

foundControl = control;

}

 

if (control.HasControls())

 

{

 

Control tempControl;

 

 

foreach (Control subcontrol in control.Controls)

 

{

tempControl = DeepFindControl(subcontrol, id);

 

if (tempControl != null)

 

{

foundControl = tempControl;

}

}

}

 

return foundControl;

 

}

Albert Shenker
Top achievements
Rank 1
Veteran
Iron
 answered on 16 Aug 2010
1 answer
94 views
Hi,

I have implemented a self-referencing hierarchy using the Q2 2010 RadGrid. Now I want to insert nodes using an interaction similar to that of the DevExpress TreeList control depicted in attached screenshot.

The New link in the header inserts a node at root.
The New link in the node row inserts a child node of node.

How do I set up RadGrid to do this?
Iana Tsolova
Telerik team
 answered on 16 Aug 2010
3 answers
670 views
If it rendered as the title attribute rather than the alt attribute then it may have some value as it would display as a ToolTip but as it stands it doesn't appear to be of much use.

-- 
Stuart
Stuart Hemming
Top achievements
Rank 2
 answered on 16 Aug 2010
6 answers
118 views
Hello team,

I have a Gridbound (label) column and a imagebutton in a template column of a radgrid.

How can I open up a new  page (like modal pop up, not exactly pop up) when clicked on imagebutton which takes an id and populates session variables of that page to display details?

Any pointers would be highly appreciated.



Maria Ilieva
Telerik team
 answered on 16 Aug 2010
3 answers
103 views
I believe I am using the latest version of Telerik.Web.UI (2010.1.415.35), but have come across a major issue for my use case.
It's essential to my application that when a user changes the text in the RadCombo that LoadOnDemand actions off a request to the server.

But, in IE I'm not getting the behaviour I expect, even though in FireFox I do. The problem is that when I have CustomText=True, LoadOnDemand=True, and I make a valid selection and then type a single character a request to the server is not made and it should be.

<asp:ScriptManager ID="ctlScriptManager" runat="server" />
<telerik:RadComboBox ID="ddlCombo" runat="server" AllowCustomText="true" EnableLoadOnDemand="true" />

Private Sub ddlCombo_ItemsRequested(ByVal o As Object, ByVal e As RadComboBoxItemsRequestedEventArgs) Handles ddlCombo.ItemsRequested
    ddlCombo.DataSource = GetData()
    ddlCombo.DataValueField = "Key"
    ddlCombo.DataTextField = "Value"
    ddlCombo.DataBind()
End Sub
 
Private Function GetData() As IDictionary(Of Integer, String)
    Dim items As New Dictionary(Of Integer, String)()
    items.Add(0, "-- None --")
    items.Add(1, "One")
    items.Add(2, "Two")
    items.Add(3, "Three")
    Return items
End Function

Please advise?

Cheers.
Simon
Telerik team
 answered on 16 Aug 2010
2 answers
171 views
I have a radgrid with AllowFilteringByColumn="True". Then i get filter visible for all columns. How can i set filter to not visible for a column programmatically?

Regards
daaland1972
øystein daaland
Top achievements
Rank 1
 answered on 16 Aug 2010
2 answers
112 views
Hi,
I have a tree view in the following shape with the checkbox support...

Text: Paret-Node-1    Value:1
        Text: Child-Node-1       Value:1
        Text: Child-Node-2       Value:2
        Text: Child-Node-3       Value:3
Text: Paret-Node-2    Value:2
        Text: Child-Node-4       Value:4
        Text: Child-Node-5       Value:5
        Text: Child-Node-6       Value:6

How can I get the "values" of Parent node and child nodes.

Regards,

Veronica
Telerik team
 answered on 16 Aug 2010
1 answer
107 views
I basically need an idiots guide to drag and drop handlers as I look at the example code and simply dont understand what each part of the JS code does, if it helps I would be writing data bach to a SQL database as a result of a drop event.
Any help would be greatly appriciated.
Dan
Pavlina
Telerik team
 answered on 16 Aug 2010
1 answer
292 views
Hi,

Problem : 1
I want to export rad grid and i want custom title on radgrid.
I did try to use caption and caption displayed on UI but didnt display on Export to excel.
I like to show on Export to excel Like "Report Name : abc , Report Date : 08/12/10 " And some other criteria. Also caption height should be 5 px when export to excel. Because report has 30 columns and 65 rows and i need to fit in one page.

Problem : 2
I want the grid to be export in landscape mode so can you send me example code for that.(please look at my code that i am currently using). I need tiltle and export in landscape mode. 

Radgrid.MasterTableView.Caption = lblCaption

Protected Sub rgFlash_DataBound(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rgFlash.DataBound
        If Export = True Then
            rgFlash.ExportSettings.ExportOnlyData = True
            rgFlash.ExportSettings.FileName = "Report Name"
            rgFlash.ExportSettings.IgnorePaging = True
            rgFlash.ExportSettings.HideStructureColumns = True
            rgFlash.FilterMenu.Visible = False

            rgFlash.HeaderContextMenu.Visible = False
            rgFlash.EnableHeaderContextMenu = False
            rgFlash.EnableHeaderContextFilterMenu = False
            rgFlash.AllowSorting = False
            rgFlash.AllowPaging = False
            rgFlash.AllowFilteringByColumn = False
            rgFlash.MasterTableView.AllowFilteringByColumn = False
            rgFlash.MasterTableView.AllowSorting = False
            rgFlash.MasterTableView.AllowPaging = False
            rgFlash.MasterTableView.EnableHeaderContextFilterMenu = False
            rgFlash.MasterTableView.EnableHeaderContextMenu = False
        End If

        lblRecordCount.Text = "Records : " & recordcount

    End Sub

  Protected Sub rgFlash_GridExporting(ByVal source As System.Object, ByVal e As Telerik.Web.UI.GridExportingArgs) Handles radgrid.GridExporting
        'rgFlash.MasterTableView.Caption = Caption
        ExportDataGridToExcel(radgrid, Response)
    End Sub


    Public Sub ExportDataGridToExcel(ByVal ctrl As System.Web.UI.Control, ByVal response As System.Web.HttpResponse)

        response.Clear()

        response.Buffer = True

        response.Cache.SetCacheability(HttpCacheability.NoCache)

        response.ContentType = "application/vnd.ms-excel"

        response.AddHeader("content-disposition", "attachment;filename=Flash Report.xls")

        response.Charset = ""

        Me.EnableViewState = False

        Dim oStringWriter As New System.IO.StringWriter()

        Dim oHtmlTextWriter As New System.Web.UI.HtmlTextWriter(oStringWriter)

        'this.ClearControls(ctrl);

        ctrl.RenderControl(oHtmlTextWriter)

        ' set content type and character set to cope with european chars like the umlaut.

        response.Write("<meta http-equiv=Content-Type content=""text/html; charset=utf-8"">" & vbLf)

        ' add the style props to get the page orientation

        response.Write(AddExcelStyling())

        response.Write(oStringWriter.ToString())
        response.Write("</body>")
        response.Write("</html>")

        response.[End]()

    End Sub

    Private Function AddExcelStyling() As String
        ' add the style props to get the page orientation
        Dim sb As New StringBuilder()

        sb.Append("<html xmlns:o='urn:schemas-microsoft-com:office:office'" & vbLf + "xmlns:x='urn:schemas-microsoft-com:office:excel'" & vbLf + "xmlns='http://www.w3.org/TR/REC-html40'>" & vbLf + "<head>" & vbLf)

        sb.Append("<style>" & vbLf)

        sb.Append("@page")

        'page margin can be changed based on requirement.....

        sb.Append("{margin:.10in .10in .10in .10in;" & vbLf)

        sb.Append("mso-header-margin:.10in;" & vbLf)

        sb.Append("mso-footer-margin:.10in;" & vbLf)

        sb.Append("mso-height-source:96.75pt;" & vbLf)

        sb.Append("mso-page-orientation:landscape;}" & vbLf)



        sb.Append("</style>" & vbLf)

        sb.Append("<!--[if gte mso 9]><xml>" & vbLf)

        sb.Append("<x:ExcelWorkbook>" & vbLf)

        sb.Append("<x:ExcelWorksheets>" & vbLf)

        sb.Append("<x:ExcelWorksheet>" & vbLf)

        sb.Append("<x:Name>Flash Report</x:Name>" & vbLf)

        sb.Append("<x:WorksheetOptions>" & vbLf)

        sb.Append("<x:Print>" & vbLf)

        sb.Append("<x:ValidPrinterInfo/>" & vbLf)

        sb.Append("<x:PaperSizeIndex>9</x:PaperSizeIndex>" & vbLf)

        sb.Append("<x:HorizontalResolution>600</x:HorizontalResolution" & vbLf)

        sb.Append("<x:VerticalResolution>600</x:VerticalResolution" & vbLf)

        sb.Append("</x:Print>" & vbLf)

        sb.Append("<x:Selected/>" & vbLf)

        sb.Append("<x:DoNotDisplayGridlines/>" & vbLf)

        sb.Append("<x:ProtectContents>False</x:ProtectContents>" & vbLf)

        sb.Append("<x:ProtectObjects>False</x:ProtectObjects>" & vbLf)

        sb.Append("<x:ProtectScenarios>False</x:ProtectScenarios>" & vbLf)

        sb.Append("</x:WorksheetOptions>" & vbLf)

        sb.Append("</x:ExcelWorksheet>" & vbLf)

        sb.Append("</x:ExcelWorksheets>" & vbLf)

        sb.Append("<x:WindowHeight>12780</x:WindowHeight>" & vbLf)

        sb.Append("<x:WindowWidth>19035</x:WindowWidth>" & vbLf)

        sb.Append("<x:WindowTopX>0</x:WindowTopX>" & vbLf)

        sb.Append("<x:WindowTopY>0</x:WindowTopY>" & vbLf)

        sb.Append("<x:ProtectStructure>False</x:ProtectStructure>" & vbLf)

        sb.Append("<x:ProtectWindows>False</x:ProtectWindows>" & vbLf)

        sb.Append("</x:ExcelWorkbook>" & vbLf)

        sb.Append("</xml><![endif]-->" & vbLf)

       sb.Append("</head>" & vbLf)

        sb.Append("<body>" & vbLf)

        Return sb.ToString()

    End Function


Thanks for your all previous support and look at this issue.
Daniel
Telerik team
 answered on 16 Aug 2010
1 answer
85 views
Hello there,

I've currently installed the trial version of the telerik ultimate collection and I want to add a RadMenu to my website. I've found some examples on the web and I tried to build my code.

But I get the error; 

'Telerik.Web.UI, Version=2010.1.519.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4' File or assembly name or one of its dependencies not found.

I have the Telerik.Web.UI in my bin folder and it references to Bin35 folder in program files, which means the dll is for dotNET 3.5. The another issue is my DLL version is not 2010.1.519.20. My DLL's version is 2010.2.713.35 and I registered it into GAC util. I'm using W7 Ultimate and VS2008 SP1.


What do I need to do now?
Thanks.

Pavlina
Telerik team
 answered on 16 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?