| <script type="text/javascript"> |
| function ShowPopup() |
| { |
| var datetimepicker = $find("<%= txtcalMeetingDate.ClientID %>"); |
| datetimepicker.showPopup(); // Show Calendar popup |
| } |
| </script> |
<asp:button runat = "server" name= "View Calendar" id = "CalendarPopup1" visible = "false" />
and in code-behind:
CalendarPopup1.Attributes.Add(
"onClick", "ShowPopup();");
var
teclatextbox= false;
function
TeclaTextbox(presionada)
{
teclatextbox= presionada;
}
function
BodyKeyDown(e)
{
var key;
if (window.event)//IE
key= window.
event.keyCode;
else//Firefox
key= e.which;
if(!e) var e = window.event;//take event
if (key == 8 && !teclatextbox)//BACKSPACE and it is not inside a textbox
{//stop the default behavior
e.cancelBubble =
true;
e.returnValue =
false;
if (e.stopPropagation)
{
e.stopPropagation();
e.preventDefault();
}
return false;
}
return true;
}
textbox events to permit backspace only inside the textboxes:
<
asp:TextBox ID="txbComentarios" runat="server" onkeydown="javascript:TeclaTextbox(true);" onkeyup="javascript:TeclaTextbox(false);" onblur="javascript:TeclaTextbox(false);"></asp:TextBox>
Regards,
Daniel.
| <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