Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
135 views
Hi,

I have a three tier datagrid Hierarchy which basically consists of a Radgrid, in the Radgrid i have specified a master table and a detail table.  Within the detail table i have also specified a nested view template which holds another radgrid.  The set up works fine as everything expands as it should.

However, while selecting an item in the 3rd level of the hierarchy i would like to obtain a reference to the item expanded in the first level.
at present i am trying to perform this operation like so 

e.Item.OwnerTableView.ParentItem.GetDataKeyValue("EnquiryNo");
 The event isn't important, but e is of type GridSortCommandEventArgs.

The problem with this is that ParentItem is null.

This technique has worked in the same project when trying to get a handle from the detail table to the master table which leaves me to believe that a relationship must be set up between the nested view template and the detail table.

Any help will be greatly appreciated thank you
Princy
Top achievements
Rank 2
 answered on 25 Nov 2010
1 answer
203 views
I have a table with too many columns to display in the grid.

I want to display selected columns in the grid and be able to show all columns for a particular row upon clicking a button on something like that.
More like a add/edit FormTemplate where I can customize the template.

Any help would be appreciated.

Thanks
Shinu
Top achievements
Rank 2
 answered on 25 Nov 2010
1 answer
77 views
How can I set the visible page of a rad grid in the code behind of an aspx page?

Supposing I have a grid with 100 pages, and a user is on the 50th page of data and clicks on a link in one of the rows which redirects them to another page. When they click the "Back" button, they are taken to the first page of the grid and have to navigate back to the 50th page.

Can anyone tell me if this is possible without setting up routes?
Shinu
Top achievements
Rank 2
 answered on 25 Nov 2010
2 answers
159 views
Hi,
  I have a problem regarding the retrieving latest 10 images into rad rotator from folder by using the image name stored in sql server.
For this i placed the asp:image tag in item template of radrotator and assigned imageurl to handler.ascx file. but i'm not sure about passing "id" from image url to handler.ascx file.
here, in handler.ascx file i retrieved the image name's from sql server db.
Help me from this problem...
saratchand
Top achievements
Rank 2
 answered on 25 Nov 2010
1 answer
58 views
I am using radscheduler with Modal advanced form for one of our clients.  Below are some f the questions i have.

1. Referring to below link.

http://www.telerik.com/community/forums/aspnet-ajax/scheduler/how-to-open-a-new-appointment-using-code-behind.aspx

the script at the path does not work when radscheduler is inside radsplitter.

2. UNDO, CLEAR, SAVE and New buttons

I have these 3 buttons on my advanced edit for on both insert as well as edit mode. Please see below to know how i need them  to work.

i) UNDO : When in insert form clicking on this button should take the advanced form back to as it was when loaded. I used the binding container method to rebind the container in advanced form button click as.

SchedulerFormContainer container = (SchedulerFormContainer)BindingContainer;
            Appointment Apt1 = new Appointment();
            Apt1.Start = Start;
            Apt1.End = End;
            container.Appointment = Apt1;

            container.DataBind();

However this does not reset the values in posted controls.

ii) SAVE and ADD:

This is something for which i was trying the script in step1, but didnt quite make it work. i successfully saved the data and closed advanced form using this button. I can even write teh code to understand the control causing postback however dont understand where and how do i need to put the script to open window for creating new appointment so that i can use ShowAdvancedInsertForm() method. Tried everything for this. Same works if i put the button and call it on button click. Please suggest what to do in this case.

iii) CLEAR button:

Similar to UNDO button in thsi also i need to clear the values and use teh same thing as mentioned above, but the problem with posted controls still exist.

Please try and help me on these items as soon as possible as these are being show stoppers in our upload lined up in coming 2 days.

Many thanks in advance.

Waiting for your response.

Regards,
Sachin

sachin
Top achievements
Rank 1
 answered on 25 Nov 2010
2 answers
36 views
hi,
In the past, we can set the tool button's attribute like this:
WebControl btn= this.Editor1.ToolControls["InsertImage"].Control as WebControl;
btn.Attributes["onclick"] = "alert('hellow telerik');";

But now it seem that we cannot make it like that ! 
this is the client-side way:
<script type="text/javascript">  
var imageManagerCommand = RadEditorCommandList["ImageManager"];  
RadEditorCommandList["ImageManager"] = function(commandName, editor, oTool)   
{   
    imageManagerCommand (commandName, editor, callBackFn);   
      
    function callBackFn(result)   
    {   
        if (result && result.imagePath)   
        {   
           
 
           
        };   
    }   
}  
</script> 

WebControl ctrl = this.Editor1.ToolControls["InsertImage"].Control as WebControl;
            ctrl.Attributes["onclick"] = "alert('damnd');";
WebControl ctrl = this.Editor1.ToolControls["InsertImage"].Control as WebControl;
            ctrl.Attributes["onclick"] = "alert('damnd');";
WebControl ctrl = this.Editor1.ToolControls["InsertImage"].Control as WebControl;
            ctrl.Attributes["onclick"] = "alert('damnd');";
WebControl ctrl = this.Editor1.ToolControls["InsertImage"].Control as WebControl;
            ctrl.Attributes["onclick"] = "alert('damnd');";
 WebControl ctrl = this.Editor1.ToolControls["InsertImage"].Control as WebControl;
            ctrl.Attributes["onclick"] = "alert('damnd');"
Is there a way to do it in C# code?

Thanks for your reply!

Regards
alloovee
Top achievements
Rank 1
 answered on 25 Nov 2010
5 answers
113 views
Hi,

I am manually loading custom user controls, same one few times. the user control has raddatepicker. the page contains few tabs and is set on lazy loading. the first time these controls load it shows the calender image. if clicked on any other tab, the image disappears and open popup calender text appears. even clicking on the link doesnt work. what is the work around for this.

Thanks
Vin
Vineet
Top achievements
Rank 1
 answered on 25 Nov 2010
2 answers
86 views
I have a page with a grid on it the grid is very  tall the grid could extend 2000px or more, it has one column and 10 rows each row is about 300px . When you clik on a button for each row there is a window that pops up. The window pops up fine but the grid jumps back to the top of the page. So i have to scroll back down to the clicked position to view the contenets of the window. Is this the  normal is there anyway to change that  so when i click the button the window just appears and the grid itself does nothing below is the code uses to call the window
<a href="#" onclick="getAddWindow(<%# eval("p_id") %>)" class="CheckUsername" title='<%# eval("p_title") %>'>
                   <%#IIf(Not IsDBNull(Eval("p_video")) And Not Eval("p_video") Is Nothing, "<img src='http://img.youtube.com/vi/" & Eval("p_video") & "/0.jpg' width='150' border='0' />", "")%>
                   <asp:Panel ID="Panel1" runat="server" Visible='<%# showvisible(eval("p_image")) %>'>
                       <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%# convertvarbinary(eval("p_image")) %>'
                           AutoAdjustImageControlSize="false" Height='150px' Width="150px" BorderWidth="0"
                           BorderStyle="none" />
                   </asp:Panel>
               </a>


any help is appreciated thanks.....
Dwayne
Top achievements
Rank 1
 answered on 24 Nov 2010
4 answers
58 views
So I'm in my RadScheduler and looking at the Week View.  Let's say I click today's date, "Fri, 12" at the top of today's column.  On Firefox's footer, I see the URL displayed by that link ends in #2010-11-12.  However, when I click, it takes me to the DayView for the previous day, 11-11.  The same thing happens in the MonthView, always one day too early.

What's going on here?

<telerik:RadScheduler
    ID="RadSchedulerCalendarEvents"
    runat="server"
    Width="100%"
    Height="500"
    BorderStyle="None"
    BorderWidth="0"
    HoursPanelTimeFormat="h:mm tt"
    ShowFullTime="true"
    TimeSlotContextMenuSettings-EnableDefault="true"
    StartInsertingInAdvancedForm="true"
    DisplayRecurrenceActionDialogOnMove="true"
    EnableDatePicker="False"
    EnableDescriptionField="True"
    DataSourceID="SqlDataSourceEvents"
    DataKeyField="evtID"
    DataStartField="evtStartTime"
    DataEndField="evtEndTime"
    DataSubjectField="evtName"
    DataDescriptionField="evtDescription"
    DataReminderField="evtReminder"
    DataRecurrenceField="evtRecurrenceRule"
    DataRecurrenceParentKeyField="evtRecurrenceParentID"
    OnClientAppointmentInserting="RadSchedulerCalendarEvents_OnClientAppointmentInserting"
    OnClientAppointmentEditing="RadSchedulerCalendarEvents_OnClientAppointmentEditing"
    OnClientAppointmentMoveEnd="RadSchedulerCalendarEvents_OnClientAppointmentMoveEnd"
    OnClientAppointmentResizeEnd="RadSchedulerCalendarEvents_OnClientAppointmentResizeEnd"
    >
    <AdvancedForm Modal="true" />
    <TimeSlotContextMenus>
        <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerTimeSlotContextMenu">
            <Items>
                <telerik:RadMenuItem Text="New Event" ImageUrl="/Images/Icons16x16/calendar.png" Postback="false" NavigateUrl="javascript: parent.newEvent('Calendar Event');" />
                <telerik:RadMenuItem IsSeparator="true" />
                <telerik:RadMenuItem Text="Go to today" Value="CommandGoToToday" />
            </Items>
        </telerik:RadSchedulerContextMenu>
    </TimeSlotContextMenus>
    <AppointmentContextMenuSettings EnableDefault="true" />
    <Localization
        ContextMenuAddAppointment="New Event"
        ContextMenuAddRecurringAppointment="New Recurring Event"
        ContextMenuEdit="Edit Event" />
</telerik:RadScheduler>
Jesse Lawler
Top achievements
Rank 1
 answered on 24 Nov 2010
2 answers
113 views
I created two radwindows which i'd like to serve as result alerts after a user tries to upload files to a database. they select the files, then click an upload button.

What I'd like to do is open either the 'success' radwindow or the 'fail' radwindow based on whether or not the upload was successful. I tried using client script manager in codebehind to open the windows but it isn't working.
int result = cmd.ExecuteNonQuery();
if (result < 1)
{
    
    String strFail = "<script type=text/javascript> var oWnd = radopen(null, 'fail');</script>";
    ClientScriptManager sm = Page.ClientScript;
    sm.RegisterStartupScript(this.GetType(), "upFail", strFail);
}
else
{
   
    String strSuccess = "<script type=text/javascript> var oWnd = radopen(null, 'success');</script>";
    ClientScriptManager sm = Page.ClientScript;
    sm.RegisterStartupScript(this.GetType(), "upSuccess", strSuccess);
fred williams
Top achievements
Rank 1
 answered on 24 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?