Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
328 views
Hi,

I'm pulling my hair over this, I can't get the Client-Side API of RadDatePicker to work. The object has no function or no properties...

Can you help me to find what is wrong with this code on a blank aspx page?

<asp:ScriptManager ID="ScriptManager1" runat="server"> 
</asp:ScriptManager> 
 
<telerik:RadDatePicker ID="rdtpBegin" runat="server" SharedCalendarID="sharedCalendar" /> 
<telerik:RadDatePicker ID="rdtpEnd" runat="server" SharedCalendarID="sharedCalendar" /> 
<telerik:RadCalendar ID="sharedCalendar" runat="server" /> 
 
<script type="text/javascript"> 
   var picker = $find("<%= rdtpBegin.ClientID %>"); 
   if (picker.get_selectedDate() == null) { 
      var defaultDate = new Date(); 
      picker.control.set_selectedDate(defaultDate); 
   } 
</script> 

I get a "picker has no properties" javascript error... I tried with document.getElementById() with no help. I tried from code-behind with RegisterStartupScript but that didn't work either...

Thanks for your assistance,

Dominic.
p.s using v2008.1.515.20
dstj
Top achievements
Rank 1
 answered on 27 May 2008
2 answers
178 views
Hi. I am stuggling to insert a records using RADGrid, Linq and codeless method.

All the correct things as per documentation have been set:
1. LinqDataSource - EnableInsert="True"
2. RadGrid1 - AllowAutomaticInserts="True"

Also cannot get a insert button to appear.

Any suggestions.
Brad
B
Top achievements
Rank 1
 answered on 27 May 2008
3 answers
94 views

http://www.sport-events.ch/Sport_Event_Suchen.aspx


When somoene searches in the Sportcategory: e.g. Handball
i will open also an RadWindows with the image of Handball.

Cause of so many sport category, it is very usefull to show an image for the search sport category.

how can i do that ?


Rosi
Telerik team
 answered on 27 May 2008
5 answers
532 views
Hi,
In my application there is Rad grid, in its MasterTableView, there is DetailTables, in its GridTableView's CommandItemTemplate , i have taken one LinkButton.

Problem is that I am not getting this linkbutton in ondetailtabledatabind event.

I am giving code below..

<telerik:RadGrid ID="grdExams" runat="server" ondetailtabledatabind="grdExams_DetailTableDataBind">

<GroupPanel Visible="True">

</GroupPanel>

<MasterTableView GridLines="None" DataKeyNames="ID" DataSourceID="LinqDataSource1"

CommandItemDisplay="TopAndBottom" Width="100%" Name="Examinations">

<DetailTables>

<telerik:GridTableView HierarchyLoadMode="Client" DataSourceID="LinqDataSource2" DataKeyNames="ID"

Width="100%" runat="server" CommandItemDisplay="Bottom" AllowAutomaticDeletes="true"

AllowFilteringByColumn="false" Name="Detractions">

<ParentTableRelation>

<telerik:GridRelationFields MasterKeyField="ID" DetailKeyField="ExaminationID" />

</ParentTableRelation>

<EditFormSettings>

<PopUpSettings ScrollBars="None"></PopUpSettings>

</EditFormSettings>

<CommandItemTemplate>

<asp:LinkButton ID="lnkAddDetraction" runat="server" CommandName="InitInsert" >

I want to find the above link button "lnkAddDetraction"...

Thanks.

Rahul Khinvasara
Top achievements
Rank 1
 answered on 27 May 2008
12 answers
239 views
I'm having a small problem in Safari for Windows (3.1.1) trying to use the DateTimePicker control in a MultiView View while using the UpdateProgress control. Whenever the view with the DateTimePicker is shown the UpdateProgress message never goes away. Does anyone have any ideas on how to resolve this?


I've tried this with the latest download able version but it still does the same thing.

[Project reference deleted by Telerik staff]
Philip
Top achievements
Rank 1
 answered on 27 May 2008
3 answers
159 views
Hi

I want to make use of the new Item template feature side the default skin to be able to add new custom header rows to the grid. This is what i have done. I have a label which takes the width of the grid and this is only shown when i want to insert my custom header.(i.e. it is set so visible = false but in the item bound event i sent it to visible depending on some row condition). I've then used a table to try and recreate the standard grid structure so that the grid rows match the columns on the header rows

<telerik:RadGrid ID="RadGrid1" runat="server" width="400">

 

<MasterTableView width="400" AutoGenerateColumns="false">

 

<Columns>

 

<telerik:GridBoundColumn HeaderText="ID" DataField="ID" >

 

<ItemStyle width="200"/></telerik:GridBoundColumn>

 

<telerik:GridBoundColumn HeaderText="Test" DataField="JourneyNo" >

 

<ItemStyle width="200"/></telerik:GridBoundColumn>

 

</Columns>

<

ItemTemplate>

<

asp:label id="header" visible="false" runat="server" style="display:block"/>

<

table>

<

tr>

<

td><asp:label id="column1" runat="server" Width="200"/></td>

<

td><asp:label id="column2" runat="server" Width="200"/></td>

<

tr>

</

table>

</

ItemTemplate>

 

 

</

MasterTableView>

 

</telerik:RadGrid>

I'm having problems with the visual appearance. Firstly there are grey lines in the rows i think because i am using tables and secondly I can't get the 'columns' in the item template to line up with columns in the header

Please can you advise how I can sort out the appearance
thanks

andieje
Top achievements
Rank 1
 answered on 27 May 2008
1 answer
224 views

I just tried to figure out how to add a RequiredFieldValidator to an GridDateTimeColumn.

I tried the code from this example in the documentation, but it didn't work for the DateTimeColumn because editor.TextBoxControl is always null. Instead you have to get a reference to the PickerControl:

void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)  
{  
    if (e.Item.IsInEditMode && e.Item is GridEditableItem)  
    {  
        GridEditableItem item = e.Item as GridEditableItem;  
 
        GridDateTimeColumnEditor dateEditor = item.EditManager.GetColumnEditor("StartDate") as GridDateTimeColumnEditor;  
        // Adding a validator to the DateTimeColumn. This one works  
        if (dateEditor != null && dateEditor.PickerControl != null)  
        {  
            TableCell cell = dateEditor.PickerControl.Parent as TableCell;  
 
            //Don't set the id here. Otherwise you'll get an exception  
            //dateEditor.PickerControl.ID = "StartDate_ID_Validation";  
 
            RequiredFieldValidator validator = new RequiredFieldValidator();  
            validator.ControlToValidate = dateEditor.PickerControl.ID;  
            validator.ErrorMessage = "StartDate required";  
            cell.Controls.Add(validator);  
        }  
    }  
} 

I don't know if this is the desired behaviour or a bug (I mean TextBoxControl being null), but it works fine.

Best regards
Sebastian

Missing User
 answered on 27 May 2008
5 answers
157 views
Hi,
I'm evaluating the latest download (bin35).
I have a UserControl that has a grid on it. The UserControl is placed in a RadPageView.  I'm trying to get the ExportToPDF to work but nothing happens. I have coded this in my UserControl:

protected void btnPDF_Click(object sender, EventArgs e)

{

RadGrid1.ExportSettings.ExportOnlyData =

true;

RadGrid1.ExportSettings.IgnorePaging =

true;

RadGrid1.ExportSettings.OpenInNewWindow =

true;

RadGrid1.MasterTableView.ExportToPdf();

}


The code is executed but nothing happens - no errors - nothing. Any ideas what I might be missing.

Here is my Grid Definition - I ajaxify what I need manually - becuase of the user control.

<

telerik:RadGrid ID="RadGrid1" runat="server"

AllowPaging="True" AllowSorting="True"

GridLines="None" onneeddatasource="RadGrid_NeedDataSource"

ShowGroupPanel="True" HorizontalAlign="Center"

oncolumncreated="RadGrid1_ColumnCreated"

ongroupschanging="RadGrid1_GroupsChanging"

onitemdatabound="RadGrid1_ItemDataBound" Skin="Office2007"

SkinID="Office2007" PageSize="50" >

<ExportSettings OpenInNewWindow="True">

</ExportSettings>

<mastertableview cellpadding="10" gridlines="None" ShowGroupFooter="True"

GroupsDefaultExpanded="False"><rowindicatorcolumn visible="False"><HeaderStyle Width="90px" /></rowindicatorcolumn><expandcollapsecolumn visible="False"><HeaderStyle Width="90px" /></expandcollapsecolumn><editformsettings><formtablestyle /><popupsettings scrollbars="None" /></editformsettings><ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

Font-Strikeout="False" Font-Underline="False" Width="100px" Wrap="False" />

<GroupHeaderItemStyle Font-Bold="False" Font-Italic="False"

Font-Overline="False" Font-Strikeout="False" Font-Underline="False"

Width="100px" Wrap="False" HorizontalAlign="Left" /><HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

Font-Strikeout="False" Font-Underline="False" Wrap="False" /></mastertableview><GroupHeaderItemStyle Wrap="False" /><clientsettings AllowColumnsReorder="True" allowdragtogroup="True"><Scrolling AllowScroll="True" UseStaticHeaders="True" /><Resizing ClipCellContentOnResize="False" ResizeGridOnColumnResize="True" /></clientsettings><ActiveItemStyle Wrap="False" /></telerik:RadGrid>


Any help is appreciated!

Joni
Princy
Top achievements
Rank 2
 answered on 27 May 2008
1 answer
167 views
When we open a RadWindow, the visited url in that window is added to the browser history.

Is it possible to prevent this behavior?

The logical behind this is that it is not correct for the user to bookmark that url since it can only be displayed in the context of the parent window.

Thanks,

Hugues
Svetlina Anati
Telerik team
 answered on 27 May 2008
1 answer
133 views

Hi all,

     I have placed the grid in the my page.Enable the pagination for the grid.Set the page size is 3.Binding the records to the datagrid and these grid
contained some text boxes in the Item Template column.do some changes in the Page 1 then click on page 2 then back to the page 1.I have lost the current changes.how to avoid this problem ?
  
  Atleast I want to show some message to user like "U lost the data" 

Please help me

Regars
Sangeetha

Princy
Top achievements
Rank 2
 answered on 27 May 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?