Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
164 views
I have a client-side bound grid via WCF that I would like to update (edit) completely at client-side.
I read and downloaded an example Vladimir E. here. The example uses an ItemTemplate to present the editor controls.  I am trying to achieve something very similar but instead using GridTemplateColumn with a RadTextBox inside.
I trigger the following code onBlur client event:

function updateItem(sender, e) {
var parent = $find(Telerik.Web.UI.Grid.GetFirstParentByTagName(sender._element, "tr"));
var item = parent.id;
var columns = tableView.get_columns();
var dataItem = item.get_dataItem();

var newObject = new Object();
return false;
}


The var "parent" is always null I tried to use sender._parent, sender._element.parenNode, etc without success.

This is how the GridTemplateColumn looks like:

<telerik:GridTemplateColumn SortExpression="EntryId" DataField="EntryId" HeaderText="EntryId">
<ItemTemplate>
                     <telerik:RadTextBox ID="txtEntryId" runat="server" Width="80px" ClientEvents-OnBlur="updateItem" />
                 </ItemTemplate>
</telerik:GridTemplateColumn>

I could not find any documentation on the method Telerik.Web.UI.Grid.GetFirstParentByTagName, can you guys please point me in the right direction?

Thanks in advanced,

Fernando M.

Veli
Telerik team
 answered on 15 Sep 2009
1 answer
86 views

Everything was working fine. We've upgraded to 2009.1.527.35 and it broke the close command on docs.

 

 

DockCloseCommand objDockCloseCommand = new DockCloseCommand();

 

objDockCloseCommand.OnClientCommand =

"dockClose_Click";

 

objDockCloseCommand.Text =

"Close";

 

currentDock.Commands.Add(objDockCloseCommand);

 

 

function dockClose_Click() {

 

//this never gets executed
alert(

'test');

 

}

Funny part about it is that if dockClose_Click does not exist I get an error when page loads.
Please help, this is urgent.

Pero
Telerik team
 answered on 15 Sep 2009
3 answers
674 views
Hi all,

I have a requirement to change the header text at runtime.
I have one gridtemplate column like the following:

 <radG:GridTemplateColumn DataField="id" HeaderText="ID" SortExpression="id"
                        UniqueName="id">
                       
                        <EditItemTemplate >
                            <asp:TextBox ID="Txtid" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Id") %>' style="position: static" OnTextChanged="Txtid_TextChanged" AutoPostBack="true"></asp:TextBox>
                            <asp:ImageButton ID="MediaIDLookup" runat="server" BorderStyle="Solid"
                                Height="18px" ImageUrl="~/Images/magnifier.gif" Style="position: static" Width="21px" OnClick="IDLookup_Click" />
                     
                            </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Lblid" runat="server" Width="120px" Text='<%# DataBinder.Eval(Container.DataItem,"Id") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle ForeColor="Black" />
                    </radG:GridTemplateColumn>

when i click the image button, a new web page opens , i get the value from new page and i need to change the header text of the id column to new value that i picked from new page.

Pls advice how to do that.
Shinu
Top achievements
Rank 2
 answered on 15 Sep 2009
3 answers
139 views
I have just upgraded to the new version of radeditor by replacing the dll and xml files. There are a few strange behaviours.  I have set  <ImageManager ViewPaths="/" UploadPaths="/" DeletePaths="/" /> so that the default location is set to the root folder.

When I open the image manager window, the top few buttons are greyed out except for the refresh button.
 
If i try to right click on the folder icon on the left hand side and create a new folder, the panel is not updated with the new folder. If I exit the page and come in again, I can then see the new folder there.

After that, I tried uploading images and it could work. However, the file size is incorrectly displayed as 0. Moreover, inserting the image into the picture does not work sometimes and I have to try a few times. 

Flash manager and media manager have the same problem too.

Rumen
Telerik team
 answered on 15 Sep 2009
1 answer
81 views
I am designing a User Interface. I have 2 grids on a page and I need to place them side by side horizontally. Any suggestions?
Thanks!
Shinu
Top achievements
Rank 2
 answered on 15 Sep 2009
2 answers
142 views
Hi:

I was using Vs2005, and the next escenario is working OK, but last night I need to move into VS2008 and the escenario doesnt work.
I have in the master page a RadAjaxPanel with the contentplaceholder insidde it, so in the contentpages I have alll the logic, when I made a Postback in the content pages, it is converted into a callback, but since I move to VS2008 and framework 3.5 it doesnt work anymore. The loading image is not showing, and the postbacks are not converted.
Here it is:

MasterPage
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MPageRoot03.master.cs" Inherits="master_MPageRoot03" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 
<head id="Head1" runat="server"> 
    <title>someits</title> 
    <link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon" /> 
</head> 
 
 
<body style="background-image:url(../../img/titlebg.jpg); background-attachment:fixed"> 
    <form id="frmNet01" runat="server"> 
        <TE01:RadScriptManager ID="RadScriptManager1" runat="server"> 
            <Scripts> 
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> 
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> 
            </Scripts> 
        </TE01:RadScriptManager> 
        <TE01:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"> 
        </TE01:RadAjaxLoadingPanel> 
        <TE01:RadAjaxPanel ID="radAjaxPanel01" runat="server" LoadingPanelID="RadAjaxLoadingPanel1" > 
            <div style="width: 100%; height:20px;top:0px; left:auto;" class="div02"> 
                <table class="tbl12"> 
                    <tr> 
                        <td width="50%" style="text-align:left"> 
                            <asp:Label ID="lblMessage" runat="server" CssClass="txt08r" Visible="false" EnableViewState="false" /> 
                        </td> 
                        <td width="50%" style="text-align:right"> 
                            <asp:Label ID="lblApp" runat="server" style="color:#FFFFFF" /> 
                            <asp:Image ID="imgApp" runat="server" ImageUrl="~/img/spacer.gif"/>&#160;&#160;<asp:Label ID="lblAppTitle" runat="server" CssClass="txt09s" />                                 
                        </td> 
                    </tr> 
                </table> 
            </div> 
            <div id="pnlContentMain01_01" name="pnlContentMain01_01" style="PADDING-RIGHT: 0px;PADDING-LEFT: 0px;PADDING-BOTTOM: 0px;OVERFLOW: auto;WIDTH: 100%;PADDING-TOP: 0px;moz-box-sizing: border-box;box-sizing: border-box"> 
                <center> 
                    <asp:contentplaceholder id="mpContentMain01_01" runat="server" /> 
                </center> 
            </div> 
        </TE01:RadAjaxPanel> 
    </form> 
</body> 
</html> 

webForm01.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/master/MPageRoot03.master" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %> 
 
<asp:Content ID="Content2" ContentPlaceHolderID="mpContentMain01_01" Runat="Server"> 
    <asp:Button ID="some" Text="asas22222" runat="server" />     
    <asp:Literal ID="txtsome" runat="server" EnableViewState="false" /> 
</asp:Content> 
 






Will
Top achievements
Rank 1
 answered on 14 Sep 2009
2 answers
223 views

Hi All,

I am using RadScheduler

I want to show 3 link in each appointment of radscheduler.

so i added 3 link button in appointment template of radschedular as follows
aspx page tags are follows

<telerik:RadScheduler ID="radSchedulCalender" runat="server"
                                      AllowDelete="False" AllowInsert="False" DataEndField="STARTTIME"
                                      DataKeyField="UNIQUEID" DataRecurrenceField="contact"
                                      DataRecurrenceParentKeyField="contact" DataStartField="STARTTIME"
                                      DataSubjectField="subject" 
                                                                            Skin="Outlook">
                                      <appointmenttemplate>
                                  
                    <asp:LinkButton ID="lbtnButton1" runat="server"</asp:LinkButton>
<asp:LinkButton ID="lbtnButton2" runat="server"</asp:LinkButton>
<asp:LinkButton ID="lbtnButton3" runat="server"</asp:LinkButton>                                  
                                  </appointmenttemplate>
                                      <timelineview userselectable="false" /></telerik:RadScheduler>

from serverside event i assign data to it.

Private Sub radSchedulCalender_AppointmentCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.AppointmentCreatedEventArgs) Handles radSchedulCalender.AppointmentCreated
        Dim dsTemp As New DataSet
               
            dsTemp = Me.Session("CalenderData")
            If Not String.Compare(Convert.ToString(e.Appointment.ID), "") = 0 Then
                Dim sContactId As String = ""
                Dim lblButton As LinkButton = CType(e.Container.FindControl("lbtnButton1"), LinkButton)
                lblButton.Text = e.Appointment.Subject
                lblButton.ToolTip = e.Appointment.RecurrenceRule
                lblButton.Attributes.Add("onclick", "OpenWindow(); return false;")

              ...
.             .
                ..
             

same for button 2 and button 3

end sub
While nevgating from day view to month view/week view or from monthview to dayview.
 it takes more time to load.

How can reduce its loading time.

 




SKS
Top achievements
Rank 1
 answered on 14 Sep 2009
1 answer
97 views
Hi,
         I am facing a peculiar problem. I have a rad grid in which i have defined a colname for download files. Now when click on a colname for download files for a particular a rad window opens up  with another radgrid inside it. This is checkbox list rad grid. Now when i click on the checkbox to make a selection and then close the rad window and click on another records' download file link, rad window opens up remembering the previous selections. Can you please let me know your feedback.

Thank you

regards,
Ajit
Schlurk
Top achievements
Rank 2
 answered on 14 Sep 2009
2 answers
535 views
Hi folks:

I have an app that will be handling company directory information for U.S. and International entities. Right now, I'm a bit stuck on how to handle the different phone number formats.

Will RadInput Manager help, or should I simply create two separate fields (one for domestic phone, one for international), and try to use regular expressions to validate the input.

Thanks in advance for any help/hints/advice.

Larry
Larry Mrazek
Top achievements
Rank 1
 answered on 14 Sep 2009
5 answers
453 views
So my grid works fine when I don't specify HierarchyDefaultExpanded, but when I add HierarchyDefaultExpanded="true" to my MasterTableView tab, I get the following error:

task_id is neither a DataColumn nor a DataRelation for table .

When I setup my hierarchy, I followed the example as closely as possible, and like I said, it works without this option enabled...but there are a couple scenarios where we want to use this feature. Here's my grid code if that helps:

<telerik:RadGrid ID="RadGrid1" 
    Skin="Telerik" 
    ImagesPath="images/grid/" 
    AllowSorting="true" 
    PageSize="25" 
    ShowFooter="true" 
    AllowPaging="false" 
    ShowGroupPanel="true" 
    GroupingEnabled="true" 
    OnNeedDataSource="RadGrid1_NeedDataSource" 
    OnItemDataBound="RadGrid1_ItemDataBound" 
    Width="950" 
    runat="server"> 
    <MasterTableView Name="master" CommandItemDisplay="None" DataKeyNames="request_id" Width="100%" HorizontalAlign="NotSet" AutoGenerateColumns="False" AllowSorting="true" GroupsDefaultExpanded="false" HierarchyLoadMode="ServerOnDemand" HierarchyDefaultExpanded="true"> 
        <Columns> 
            <telerik:GridTemplateColumn HeaderText="Request #" DataField="request_id" UniqueName="request_id" SortExpression="request_id" Groupable="false"> 
                <ItemStyle Width="75" /> 
                <ItemTemplate> 
                    <a href='request.aspx?id=<%# Eval("request_id") %>' style="cursor:pointer;"><asp:Label Width="65" CssClass="gridLabel" runat="server" ID="lbl_request_id" Text='<%# Eval("request_id") %>' /></a><br /> 
                    <asp:Label Width="70" CssClass="gridLabel" runat="server" ID="lbl_request_type" Text='<%# Eval("request_type") %>' /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridBoundColumn UniqueName="request_type" DataField="request_type" AllowFiltering="true" Visible="false" /> 
            <telerik:GridTemplateColumn HeaderText="Request Date" UniqueName="request_date" SortExpression="request_date" Groupable="false"> 
                <ItemStyle Width="90" /> 
                <ItemTemplate> 
                    <asp:Label Width="85" CssClass="gridLabel" runat="server" ID="lbl_request_date" Text='<%# Eval("request_date") %>' /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Requestor" UniqueName="requestor_name" DataField="requestor_name" SortExpression="requestor_name" GroupByExpression="requestor_name Requestor Group By requestor_name"> 
                <ItemStyle Width="105" /> 
                <ItemTemplate> 
                    <asp:Label Width="100" CssClass="gridLabel" runat="server" ID="lbl_requestor_name" Text='<%# Eval("requestor_name") %>' /><br /> 
                    <asp:Label Width="100" CssClass="gridLabel" runat="server" ID="lbl_requestor_dept" Text='<%# Eval("requestor_dept") %>' /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Purpose" UniqueName="title" SortExpression="title" Groupable="false"> 
                <ItemTemplate> 
                    <asp:Label CssClass="gridLabel" runat="server" ID="lbl_title" Text='<%# Eval("title") %>' /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Due Date" UniqueName="due_date" SortExpression="due_date" GroupByExpression="due_date Due Group By due_date"> 
                <ItemStyle Width="85" /> 
                <ItemTemplate> 
                    <asp:Label Width="80" CssClass="gridLabel" runat="server" ID="lbl_due_date" Text='<%# Eval("due_date") %>' /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Assigned To" UniqueName="analyst_name" DataField="analyst_name" SortExpression="analyst_name" GroupByExpression="analyst_name Assigned Group By analyst_name" AllowFiltering="true"> 
                <ItemStyle Width="105" /> 
                <ItemTemplate> 
                    <asp:Label Width="100" CssClass="gridLabel" runat="server" ID="lbl_analyst_name" Text='<%# Eval("analyst_name") %>' /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Status" UniqueName="status" DataField="status" SortExpression="status" GroupByExpression="status Status Group By status"> 
                <ItemStyle Width="65" /> 
                <ItemTemplate> 
                    <asp:Label Width="60" CssClass="gridLabel" runat="server" ID="lbl_status" Text='<%# Eval("status") %>' /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Priority" UniqueName="priority" SortExpression="priority" GroupByExpression="priority Priority Group By priority"> 
                <ItemStyle Width="60" /> 
                <ItemTemplate> 
                    <asp:Label Width="55" CssClass="gridLabel" runat="server" ID="lbl_priority" Text='<%# Eval("priority") %>' /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Age" UniqueName="age" SortExpression="age" GroupByExpression="age Age Group By age"> 
                <ItemStyle Width="40" /> 
                <ItemTemplate> 
                    <asp:Label Width="35" CssClass="gridLabel" runat="server" ID="lbl_age" Text='<%# Eval("age") %>' /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
        </Columns> 
        <DetailTables> 
            <telerik:GridTableView Name="detail" DataKeyNames="task_id" DataSourceID="TaskDataSource" Width="100%" runat="server" CommandItemDisplay="None" AutoGenerateColumns="false"> 
                <ParentTableRelation> 
                    <telerik:GridRelationFields DetailKeyField="request_id" MasterKeyField="request_id" /> 
                </ParentTableRelation> 
                <Columns> 
                    <telerik:GridTemplateColumn HeaderText="Task #" UniqueName="task_no" SortExpression="task_no" Groupable="false"> 
                        <ItemStyle Width="75" /> 
                        <ItemTemplate> 
                            <asp:Label Width="70" CssClass="gridLabel" runat="server" ID="lbl_task_no" Text='<%# Eval("task_no") %>' /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn HeaderText="Task Date" UniqueName="task_date" SortExpression="task_date" Groupable="false"> 
                        <ItemStyle Width="90" /> 
                        <ItemTemplate> 
                            <asp:Label Width="85" CssClass="gridLabel" runat="server" ID="lbl_task_date" Text='<%# Eval("task_date") %>' /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn HeaderText="Due Date" UniqueName="task_due_date" SortExpression="task_due_date" Groupable="false"> 
                        <ItemStyle Width="105" /> 
                        <ItemTemplate> 
                            <asp:Label Width="100" CssClass="gridLabel" runat="server" ID="lbl_task_due_date" Text='<%# Eval("task_due_date") %>' /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn HeaderText="Task" UniqueName="task_title" SortExpression="task_title" Groupable="false"> 
                        <ItemTemplate> 
                            <asp:Label CssClass="gridLabel" runat="server" ID="lbl_task_title" Text='<%# Eval("task_title") %>' /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn HeaderText="Complete Date" UniqueName="task_complete_date" SortExpression="task_complete_date" Groupable="false"> 
                        <ItemStyle Width="85" /> 
                        <ItemTemplate> 
                            <asp:Label Width="80" CssClass="gridLabel" runat="server" ID="lbl_task_complete_date" Text='<%# Eval("task_complete_date") %>' /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn HeaderText="Assigned To" UniqueName="task_analyst_name" SortExpression="task_analyst_name" Groupable="false"> 
                        <ItemStyle Width="105" /> 
                        <ItemTemplate> 
                            <asp:Label Width="100" CssClass="gridLabel" runat="server" ID="lbl_task_analyst_name" Text='<%# Eval("task_analyst_name") %>' /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn HeaderText="Status" UniqueName="task_status" SortExpression="task_status" Groupable="false"> 
                        <ItemStyle Width="65" /> 
                        <ItemTemplate> 
                            <asp:Label Width="60" CssClass="gridLabel" runat="server" ID="lbl_task_status" Text='<%# Eval("task_status") %>' /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn HeaderText="" UniqueName="blank" SortExpression="blank" Groupable="false"> 
                        <ItemStyle Width="60" /> 
                        <ItemTemplate> 
 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn HeaderText="Age" UniqueName="age" SortExpression="age" GroupByExpression="age Age Group By age"> 
                        <ItemStyle Width="40" /> 
                        <ItemTemplate> 
                            <asp:Label Width="35" CssClass="gridLabel" runat="server" ID="lbl_age" Text='<%# Eval("age") %>' /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                </Columns> 
            </telerik:GridTableView> 
        </DetailTables> 
    </MasterTableView> 
    <ClientSettings AllowDragToGroup="True" AllowGroupExpandCollapse="True"> 
        <Selecting AllowRowSelect="True" /> 
        <Scrolling AllowScroll="false" UseStaticHeaders="True" /> 
        <ClientEvents OnGridCreated="GridCreated" /> 
    </ClientSettings> 
    <PagerStyle Mode="NextPrevAndNumeric" /> 
</telerik:RadGrid> 

Any help is greatly appreciated.
Venkat
Top achievements
Rank 1
 answered on 14 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?