| <telerik:RadSlider ID="slideHeight" runat="server" LargeChange="30" |
| MaximumValue="320" MinimumValue="20" Orientation="Vertical" |
| TrackMouseWheel="False" Height="300px" IsDirectionReversed="True" /> |
Hello
Please can someone have a look at what i have done wrong below. if i uncomment the line 'e.DetailTableView.DataBind()' it seems to go into an infinate loop and times out...if i remove that line i just get No child records to display. i have got 6 records in objMonitor that have loaded ok.
thanks so much as just cant seem to get it working.
Private Sub radgridstats_DetailTableDataBind(ByVal source As Object, ByVal e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles radgridstats.DetailTableDataBind
Dim dataItem As Telerik.Web.UI.GridDataItem = CType(e.DetailTableView.ParentItem, Telerik.Web.UI.GridDataItem)
Select Case e.DetailTableView.Name
Case "DivisionOne"
Dim DemographicID As String = dataItem.GetDataKeyValue("DemographicID").ToString()
Dim objMonitors As New Pearson.Monitors
objMonitors.LoadStats(DemographicID, 1)
e.DetailTableView.DataSource = objMonitors
'e.DetailTableView.DataBind()
End Sub
| <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> |
| <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Charting" tagprefix="telerik" %> |
| <telerik:RadChart runat="server" Width="500px" ID="RadChart2" Skin="LightGreen" > |
| <Series> |
| <telerik:ChartSeries Name="series 1" Type="Bar"> |
| <Items> |
| <telerik:ChartSeriesItem YValue="5" /> |
| <telerik:ChartSeriesItem YValue="50" /> |
| <telerik:ChartSeriesItem YValue="500" /> |
| <telerik:ChartSeriesItem YValue="5000" /> |
| </Items> |
| </telerik:ChartSeries> |
| </Series> |
| <PlotArea> |
| <Appearance> |
| </Appearance> |
| <YAxis IsLogarithmic="true"> |
| </YAxis> |
| </PlotArea> |
| <ChartTitle> |
| <TextBlock Text="Logarithmic Axis"> |
| <Appearance TextProperties-Color="70, 143, 190"> |
| </Appearance> |
| </TextBlock> |
| </ChartTitle> |
| </telerik:RadChart> |
Hi,
I have a GridButtonColumn in my RadGrid which is a delete button for a tag and executes the deletecommand defined in my datasource. This delete actually deletes the pair "contentID" and "tagID" from my table tagsContents. However, as well as the delete of this pair from my table tagsContents, I also want to execute an update of my table tags where I decrease the count column of that tag by 1. This means that as I delete the pair tag - content, I also must decrease the count in the tags table. How can I execute this update command when I click the delete button? Can I associate both commands to the action of clicking the button? Here is my code:
This is the GridButtonColumn:
<telerik:GridButtonColumn ConfirmText="Tem a certeza de que pretende apagar esta tag deste conteúdo?" ConfirmDialogType="RadWindow" ConfirmTitle="Apagar" ButtonType="ImageButton" ButtonCssClass="pointer" CommandName="Delete" Text="Apagar" ItemStyle-Width="10%" UniqueName="ApagarTag" ImageUrl="~/imagens/bt_scorm_falhou.gif" ItemStyle-HorizontalAlign="Center" />
This is the datasource:
<asp:SqlDataSource ID="GET_TAGS_CONT" runat="server" ConnectionString="<%$ ConnectionStrings:lms_bibliotecaConnectionString1 %>"
SelectCommand="SELECT * FROM NL_LMS_BIB_tags INNER JOIN NL_LMS_BIB_tagsConteudos ON NL_LMS_BIB_tags.IDTag=NL_LMS_BIB_tagsConteudos.IDTag AND NL_LMS_BIB_tagsConteudos.IDConteudo = @idconteudo"
DeleteCommand="DELETE FROM [NL_LMS_BIB_tagsConteudos] WHERE IDTag = @IDTag AND IDConteudo=@idconteudo" >
<SelectParameters>
<asp:SessionParameter Name="idconteudo" SessionField="idconteudo" />
</SelectParameters>
<DeleteParameters>
<asp:SessionParameter Name="idconteudo" SessionField="idconteudo" />
<asp:Parameter Name="IDTag" />
</DeleteParameters>
</asp:SqlDataSource>
Thanks!
Marta
Things that didnt work:
* RadAjaxManager1.FocusControl(RadTreeView1.ClientID)
| <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Dossier.aspx.vb" Inherits="Dossiers_Dossier" %> | |
| <%@ Register Assembly="Telerik.Web.UI, Version=2009.1.527.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" | |
| Namespace="Telerik.Web.UI" TagPrefix="telerik" %> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head runat="server"> | |
| <title>Dossier</title> | |
| <link href="../css/StyleSheet.css" rel="stylesheet" type="text/css" /> | |
| </head> | |
| <body> | |
| <form id="form1" runat="server"> | |
| <div> | |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> | |
| </telerik:RadScriptManager> | |
| <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Sunset" /> | |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> | |
| <AjaxSettings> | |
| <telerik:AjaxSetting AjaxControlID="RadTreeView1"> | |
| <UpdatedControls> | |
| <telerik:AjaxUpdatedControl ControlID="RadTreeView1" /> | |
| <telerik:AjaxUpdatedControl ControlID="pnlTeksten" /> | |
| <telerik:AjaxUpdatedControl ControlID="pnlDossier" /> | |
| </UpdatedControls> | |
| </telerik:AjaxSetting> | |
| <telerik:AjaxSetting AjaxControlID="gvZoeken"> | |
| <UpdatedControls> | |
| <telerik:AjaxUpdatedControl ControlID="RadTreeView1" /> | |
| <telerik:AjaxUpdatedControl ControlID="pnlTeksten" /> | |
| <telerik:AjaxUpdatedControl ControlID="pnlDossier" /> | |
| </UpdatedControls> | |
| </telerik:AjaxSetting> | |
| </AjaxSettings> | |
| </telerik:RadAjaxManager> | |
| <table> | |
| <tr> | |
| <td> | |
| <telerik:RadMenu ID="RadMenu1" runat="server" Skin="Sunset"> | |
| <Items> | |
| <telerik:RadMenuItem Text="Terug" NavigateUrl="Default.aspx" /> | |
| </Items> | |
| </telerik:RadMenu> | |
| </td> | |
| <td> | |
| <h1> | |
| <asp:Label ID="lblTitel" runat="server"></asp:Label></h1> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td colspan='2'> | |
| <table> | |
| <tr> | |
| <td> | |
| Zoek in dossier: | |
| </td> | |
| <td> | |
| <asp:TextBox ID="tbZoekterm" runat="server"></asp:TextBox><asp:Button ID="butZoek" | |
| runat="server" Text="Zoek" /><br /> | |
| <asp:Label ID="lblEror" runat="server" ForeColor="Red"></asp:Label> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| | |
| </td> | |
| <td> | |
| <telerik:RadGrid ID="gvZoeken" runat="server" AllowPaging="True" AllowSorting="True" | |
| AutoGenerateColumns="False" GridLines="None" Skin="Sunset" DataSourceID="SqlDataSource2"> | |
| <PagerStyle Mode="NextPrevAndNumeric" NextPageToolTip="Volgende pagina" PagerTextFormat="Verander pagina: {4} &nbsp;Getoonde pagina {0} van {1}, rijen {2} t/m {3} van {5}." | |
| PrevPageToolTip="Vorige pagina" FirstPageToolTip="Eerste pagina" LastPageToolTip="Laatste pagina" /> | |
| <MasterTableView DataKeyNames="TekstNr" NoMasterRecordsText="Geen resultaten gevonden." | |
| DataSourceID="SqlDataSource2" PageSize="10"> | |
| <Columns> | |
| <telerik:GridTemplateColumn> | |
| <ItemTemplate> | |
| <asp:LinkButton ID="LinkButton1" runat="server" Text='<%# Highlight(tbZoekterm.Text,Eval("Titel")) %>' | |
| CommandArgument='<%# Eval("TekstNr") %>' OnClick="ZoekItemClick">LinkButton</asp:LinkButton> | |
| <br /> | |
| <br /> | |
| <asp:Literal ID="Literal1" runat="server" Text='<%# Highlight(tbZoekterm.Text,Eval("tekst"))%>'></asp:Literal> | |
| </ItemTemplate> | |
| </telerik:GridTemplateColumn> | |
| </Columns> | |
| </MasterTableView> | |
| <ClientSettings EnableRowHoverStyle="true" /> | |
| <SortingSettings SortedAscToolTip="Oplopend gesoteerd" SortedDescToolTip="Aflopend gesorteerd" | |
| SortToolTip="Klik hier om te sorteren" /> | |
| </telerik:RadGrid> | |
| <asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:DB %>" | |
| ProviderName="System.Data.SqlClient" SelectCommand="Zoek_in_dossier" SelectCommandType="StoredProcedure" | |
| runat="server"> | |
| <SelectParameters> | |
| <asp:QueryStringParameter Name="dossiernr" QueryStringField="dId" Type="Int32" /> | |
| <asp:FormParameter Name="Zoekterm" FormField="tbZoekterm" Type="String" /> | |
| </SelectParameters> | |
| </asp:SqlDataSource> | |
| </td> | |
| </tr> | |
| </table> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td valign="top"> | |
| <telerik:RadTreeView ID="RadTreeView1" runat="server" Skin="Sunset" EnableDragAndDrop="False" | |
| EnableDragAndDropBetweenNodes="False" AllowNodeEditing="False" DataFieldID="Tekstnr" | |
| DataFieldParentID="ParentID" DataSourceID="SqlDataSource1" DataTextField="Titel" | |
| DataValueField="Tekstnr"> | |
| </telerik:RadTreeView> | |
| <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:DB %>" | |
| ProviderName="System.Data.SqlClient" SelectCommand="GET_DOSSIER_TEKSTEN" SelectCommandType="StoredProcedure" | |
| runat="server"> | |
| <SelectParameters> | |
| <asp:QueryStringParameter Name="dossiernr" QueryStringField="dId" Type="Int32" /> | |
| </SelectParameters> | |
| </asp:SqlDataSource> | |
| </td> | |
| <td valign="top"> | |
| <asp:Panel ID="pnlDossier" runat="server"> | |
| <table> | |
| <tr> | |
| <td> | |
| Dossier titel: | |
| </td> | |
| <td> | |
| <asp:Label ID="lblDossierTitel" runat="server"></asp:Label> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| Instituut: | |
| </td> | |
| <td> | |
| <asp:Label ID="lblInstituut" runat="server"></asp:Label> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| Versie: | |
| </td> | |
| <td> | |
| <asp:Label ID="lblVersie" runat="server"></asp:Label> | |
| </td> | |
| </tr> | |
| </table> | |
| </asp:Panel> | |
| <asp:Panel ID="pnlTeksten" runat="server" Visible="false"> | |
| <table> | |
| <tr> | |
| <td> | |
| | |
| </td> | |
| <td> | |
| <asp:Label ID="lblTitel2" runat="server"></asp:Label> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| | |
| </td> | |
| <td> | |
| Samenvatting:<br /> | |
| <asp:Label ID="lblSamenvatting" runat="server" /> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| | |
| </td> | |
| <td> | |
| Verdieping:<br /> | |
| <asp:Label ID="lblVerdieping" runat="server" /> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| | |
| </td> | |
| <td> | |
| Detaillering:<br /> | |
| <asp:Label ID="lblDetaillering" runat="server" /> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| | |
| </td> | |
| </tr> | |
| </table> | |
| </asp:Panel> | |
| </td> | |
| </tr> | |
| </table> | |
| </div> | |
| </form> | |
| </body> | |
| </html> | |
| Imports Telerik.Web.UI | |
| Partial Class Dossiers_Dossier | |
| Inherits System.Web.UI.Page | |
| Dim dossierID As Integer | |
| Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load | |
| dossierID = Request("did") | |
| End Sub | |
| Protected Sub RadTreeView1_NodeDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles RadTreeView1.NodeDataBound | |
| 'Expand the parent | |
| If e.Node.Value = "0" Then | |
| e.Node.Expanded = True | |
| End If | |
| End Sub | |
| Protected Sub RadTreeView1_NodeClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles RadTreeView1.NodeClick | |
| 'Selected node changed | |
| NodeSelectieveranderd(e.Node) | |
| End Sub | |
| Sub NodeSelectieveranderd(ByVal n As RadTreeNode) | |
| If n.Value = "0" Then 'new selectednode is rootnode | |
| pnlDossier.Visible = True | |
| pnlTeksten.Visible = False | |
| lblTitel2.Text = "" | |
| lblSamenvatting.Text = "" | |
| lblVerdieping.Text = "" | |
| lblDetaillering.Text = "" | |
| Else 'childnode | |
| pnlDossier.Visible = False | |
| pnlTeksten.Visible = True | |
| 'fill pnlTeksten | |
| lblTitel2.Text = "test" | |
| n.ExpandParentNodes() | |
| End If | |
| End Sub | |
| 'Find and highlight words that match the searchvalue | |
| Public Function Highlight(ByVal Search_Str As String, ByVal InputTxt As String) As String | |
| ' Setup the regular expression and add the Or operator. | |
| Dim RegExp As New Regex(Search_Str.Replace(" ", "|").Trim(), RegexOptions.IgnoreCase) | |
| ' Highlight keywords by calling the delegate each time a keyword is found. | |
| Return RegExp.Replace(InputTxt, New MatchEvaluator(AddressOf ReplaceKeyWords)) | |
| ' Set the RegExp to null. | |
| End Function | |
| 'Highlight the keywords | |
| Public Function ReplaceKeyWords(ByVal m As Match) As String | |
| Return "<span class='Highlight'>" + m.Value + "</span>" | |
| End Function | |
| 'Linkbutton in searchgrid is clicked | |
| Protected Sub ZoekItemClick(ByVal sender As Object, ByVal e As System.EventArgs) | |
| Dim lb As LinkButton = CType(sender, LinkButton) | |
| RadTreeView1.FindNodeByValue(lb.CommandArgument).Selected = True | |
| NodeSelectieveranderd(RadTreeView1.SelectedNode) | |
| RadAjaxManager1.FocusControl(RadTreeView1.ClientID) | |
| End Sub | |
| End Class |
Hi Support Team,
I am working on Rad Editor. In the image upload Area. Afterbrowsing the image I have to add below code inthe click event of upload button.
WebClient oclient = new WebClient();
byte[] responseArray = oclient.UploadFile(PageUrlofRemoteServer,"POST",UploadimagePathAlongwithFileName);
Reason :
I have to upload thebrowse image to some other location (other domain like http://www.domain.com/images/imagefilename)
for that I wrote the above code which work fine.
But how can integrate this code with Rad Editor UploadButton Click event.
Regards
Ravindra Sahasrabudhe
(rs@mtccrm.com)