Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
143 views
Hi,

   I would like to log the source file and path being copied to the destination directory. When using the OnClientCopy I do get a value for the RadFileExplorerEventArgs get_newPath() but not for the get_item. Is there a way to get this value?

Thanks!

Jed
Jed
Top achievements
Rank 1
 answered on 14 Sep 2012
4 answers
230 views
I have a radgrid that displays a date from a record in a database along with the other information in that record.  What I want to do is automatically populate that date with the current date when a user enters a new row - AND I want that date to show up on the screen before they insert it.  I know how to populate the column at the time of insert, but what I would like is when a user presses "Add new record" that a Label shows in the Edit form with the current date.

Here is my code:

 

 

 <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"   
        DataSourceID="LogBookODS" GridLines="None" AllowFilteringByColumn="True"   
        AllowPaging="True" AllowSorting="True" AllowAutomaticDeletes="True"   
        AllowAutomaticInserts="True" AllowAutomaticUpdates="True"   
        Skin="Office2007">  
<MasterTableView DataKeyNames="LogBookID" DataSourceID="LogBookODS"   
            CommandItemDisplay="Top">  
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
    <Columns> 
        <telerik:GridBoundColumn DataField="LogBookID" DataType="System.Int32"   
            HeaderText="LogBookID" ReadOnly="True" SortExpression="LogBookID"   
            UniqueName="LogBookID" Visible="False">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="PatientID" DataType="System.Int32"   
            HeaderText="PatientID" SortExpression="PatientID" UniqueName="PatientID"   
            Visible="False" ReadOnly="True">  
        </telerik:GridBoundColumn> 
        <telerik:GridTemplateColumn DataField="LogEntryDate" DataType="System.DateTime"   
            HeaderText="Entry Date" SortExpression="LogEntryDate"   
            UniqueName="LogEntryDate">  
            <EditItemTemplate> 
            <asp:Label ID="CurrDateLbl" runat="server"></asp:Label> 
            <asp:TextBox ID="CurrDateTxtBx" runat="server" Visible="false" Text='<%# Bind("LogEntryDate") %>'></asp:TextBox> 
            </EditItemTemplate> 
            <ItemTemplate> 
                <asp:Label ID="LogEntryDateLabel" runat="server"   
                    Text='<%# Eval("LogEntryDate","{0:d}") %>'></asp:Label> 
            </ItemTemplate> 
        </telerik:GridTemplateColumn> 
          
        <telerik:GridBoundColumn DataField="LogDescription" HeaderText="Description "   
            MaxLength="100" UniqueName="LogDescription">  
        </telerik:GridBoundColumn> 
          
        <telerik:GridTemplateColumn DataField="LogEntry" HeaderText="Log Entry"   
            SortExpression="LogEntry" UniqueName="LogEntry" AllowFiltering="False">  
            <EditItemTemplate> 
                <br /> 
                <telerik:RadEditor ID="RadEditor1" Runat="server"   
                    Content='<%# Bind("LogEntry") %>'>  
                    <Content> 
</Content> 
                </telerik:RadEditor> 
            </EditItemTemplate> 
            <ItemTemplate> 
                
                <asp:ImageButton ID="ImageButton1" runat="server" CommandName="Edit" ImageUrl="~/images/Edit.gif" ToolTip="Click to view the log entry" /> 
               
            </ItemTemplate> 
        </telerik:GridTemplateColumn> 
                   <telerik:GridButtonColumn ConfirmText="Delete this Entry?" ConfirmDialogType="RadWindow" 
                        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" 
                        UniqueName="DeleteColumn">  
                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> 
                    </telerik:GridButtonColumn> 
 
    </Columns> 
 
<EditFormSettings> 
<EditColumn UniqueName="EditCommandColumn1" ButtonType="ImageButton"></EditColumn> 
</EditFormSettings> 
</MasterTableView> 
    </telerik:RadGrid> 
   

 

What I would like is for  CurrDateLbl to have the current date in it when the user clicks "Add New Record"

What event do I put that in?  ItemCommand fires at the right time, but I don't seem to be able to reference CurrDateLbl in that event.

Eric

 

Pam
Top achievements
Rank 2
 answered on 14 Sep 2012
2 answers
135 views
Hi,
My problem is:
I have a master page where I have RadAjaxManager and RadScriptManager.
On my aspx page I need to call with a javascript function the server with a Ajaxrequest to update a label for example.
For that, I added a RadAjaxManagerProxy and RadCodeBlock.
When I click on the button1, that working.
Form the button2 (javascript), I called the function manager_AjaxRequest but don't refresh the label.
Do you know what I missed ?
Here is a copy of my master page and detail page.

Masterpage:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="test.master.cs" Inherits="abc.pages.MasterPage.test"  ClientIDMode="AutoID" %>
<!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>
    <asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManagerMasterPage" runat="server" />
    <telerik:RadAjaxManager ID="RadAjaxManager_Master" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"></telerik:RadAjaxManager>
    <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server" />
    </form>
</body>
</html>

Code begin:
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
 
}

Detail page:
<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server" >
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Button1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Label1"
                    LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="Button2">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Label1"
                    LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
 
<telerik:radajaxloadingpanel id="RadAjaxLoadingPanel1" runat="server" skin="Windows7" />
 
    <telerik:RadCodeBlock  ID="RadScriptBlock1" runat="server">
    <script type="text/javascript">
        function test() {
            var manager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");
            var textBoxId = "RowSelected";
            if (manager && textBoxId) {
                manager.ajaxRequest("RowSelected");
            }
        }
    </script>
</telerik:RadCodeBlock >
 
<asp:Button ID="Button1" runat="server" Text="test 1" onclick="Button1_Click" /><br />
<asp:Button ID="Button2" runat="server" CausesValidation="false" OnClientClick="javascript:test();return false;" Text="test 2" /><br />
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>

and the code behind:
protected void Page_Load(object sender, EventArgs e)
{
    RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
    manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(manager_AjaxRequest);
}
 
protected void Button1_Click(object sender, EventArgs e)
{
    Label1.Text = "A" + DateTime.Now.Ticks.ToString();
}
 
protected void manager_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
    if (e.Argument == "RowSelected")
    {
        Label1.Text = "B" + DateTime.Now.Ticks.ToString();
    }
}
daniel demesmaeker
Top achievements
Rank 1
 answered on 14 Sep 2012
5 answers
592 views
 Hi all,

I have a grid with 3 columns, a name and a date and a calculated (sql) field witch displays terms like "last week, this week, today, yesterday, next week, last year, etc..."

When i use a grouping al works fine, only the group sorting is alphabetical (of course) and thus the wrong order. I would like the grid toe group, but sort the groups logical, on the date field.

any ideas?

Thanks in advance!
Joe
Top achievements
Rank 1
 answered on 14 Sep 2012
1 answer
124 views
Hi,
I am showing daily test results over a period of time in a line chart.
The values varriy from 0% to 100%. 100% means bestand 0% means the worst.

Currently my chart line is all green. I wanted to check if I can have gradient like color which show 0% red and 100% as green and any other percentage from 0 to 100 are represented by the color which flows form red to green.

Can I achieve this?

Thanks,
Abinash
Petar Kirov
Telerik team
 answered on 14 Sep 2012
3 answers
181 views
The treelist has autogenerated columns and bound to a datatable.

I read somewhere that you need to set the width in order to get the exporting to work.  THis is the error that i'm getting:


System.SystemException: At least one of minimum, optimum, or maximum IPD must be specified on table.

Daniel
Telerik team
 answered on 14 Sep 2012
2 answers
87 views
Hi,

I'd like to have a single menu instance on a single web page.  And as I click on a menu option, A different user control is loaded into the web page.  I didn't see any samples for this.  Is this something that is possible?

Thanks,
Craig
Craig
Top achievements
Rank 1
 answered on 14 Sep 2012
2 answers
121 views
I want to autofill scheduler data when we enterd data in a Grid or textboxes means i have  4 textboxes 1.name 2.date 3.amount 4.total amount when i submit this data this data will display in scheduler for that particuler date i.e given in date text box.
siva sankar
Top achievements
Rank 1
 answered on 14 Sep 2012
0 answers
89 views

Update: I realized that the issue was caused by another control. I apologize for the post.

Hello,

I'm attempting to use the numeric textbox control provided by Telerik and I'm receiving the following error when I attempt to use the control's text value in a sql insert:

{"No mapping exists from object type System.Web.UI.WebControls.Label to a known managed provider native type."}

Here's the code that I'm using to attempt to do the insert:

'Insert/Update the Adjustment
With oCmd
    .Parameters.Clear()
    .Connection = oConn
    .CommandType = CommandType.StoredProcedure
    .CommandText = "iBill_Dashboard_Insert_Adjustments"
    With .Parameters
        .AddWithValue("@DepartmentTab", DepartmentTab)
        .AddWithValue("@ProjectType", ProjectType)
        .AddWithValue("@Month", Month)
        .AddWithValue("@Year", Year)
        .AddWithValue("@Value", tValue.Text)
        .AddWithValue("@AdjustmentID", AdjustmentID)
        .Add("@NewID", SqlDbType.Int)
    End With
    .Parameters("@NewID").Direction = ParameterDirection.Output
    .ExecuteNonQuery()
End With
AdjustmentID = oCmd.Parameters("@NewID").Value

The error occurs on the ExecuteNonQuery() method. Any help would be greatly appreciated.
Johnathan
Top achievements
Rank 1
 asked on 14 Sep 2012
2 answers
163 views
Hi,

I have some text boxes inside a grid edit form. Everything works well except in IE. I can't edit any value of textbox. I click on one, and it unfocus automatically.

TextBox:

<telerik:RadNumericTextBox ID="edDose" runat="server" DbValue='<%# Bind("PRES_DOSE") %>'
       Width="40" MaxLength="12" Height="22px" ShowSpinButtons="true">
</telerik:RadNumericTextBox>

This is happening in every IE versions.
Jocelyn
Top achievements
Rank 1
 answered on 14 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?