Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
557 views
Hi

I'm trying to access the value of a datepicker in javascript and no matter what i do i get a value of undefined.

Here are teh things i have tried

function

CustomValidate(sender, args)

{

var datePicker = $find("<%= txtDate.ClientID %>");

alert (datePicker.value);

alert (datePicker.get_Value);

alert (datePicker.get_textBoxValue);

alert (sender.value);

Please can you tell me what i am doing wrong as the datepicker has a date in it: it loads with a default date of today's date.

Here is the aspx for the datepicker

<telerik:RadDatePicker ID="txtDate" runat="server" Height="16px" EnableEmbeddedSkins="False">

 

<Calendar CellAlign="Center" CellVAlign="Middle" DayNameFormat="FirstLetter" FirstDayOfWeek="Default"

 

MonthLayout="Layout_7columns_x_6rows" Orientation="RenderInRows" TitleAlign="Center" EnableEmbeddedSkins="False" ShowRowHeaders="false"

 

NavigationNextImage="~/Images/CalendarSkin/arrowRight.gif"

NavigationPrevImage="~/Images/CalendarSkin/arrowLeft.gif"

FastNavigationNextImage="~/Images/CalendarSkin/fastNavRight.gif"

FastNavigationPrevImage="~/Images/CalendarSkin/fastNavLeft.gif">

 

</Calendar>

 

<DatePopupButton HoverImageUrl="~/Images/CalendarSkin/datePickerPopupHover.gif"

ImageUrl="~/Images/CalendarSkin/datePickerPopup.gif" />

<DateInput Height="16px" EnableEmbeddedSkins="False">

 

</DateInput>

 

<DatePopupButton HoverImageUrl="~/Images/CalendarSkin/datePickerPopupHover.gif" ImageUrl="~/Images/CalendarSkin/datePickerPopup.gif" />

 

</telerik:RadDatePicker>



thanks

Vlad
Telerik team
 answered on 10 Oct 2008
1 answer
74 views

 

public void rgTickets_ItemDataBound(object sender, GridItemEventArgs e)

 

{

 

if (e.Item.ItemType == GridItemType.AlternatingItem || e.Item.ItemType == GridItemType.Item)

 

{

 

if (e.Item.Cells[5].Text == PriorityType.PriorityName.Critical.ToString())

 

{

e.Item.Cells[5].Style.Add(

"background-color", "red");

 

}

}

}



How do I get around finding the cell by Index?   If the columns are moved around it will not find the correct cell.   I would like to change it to something else.

Shinu
Top achievements
Rank 2
 answered on 10 Oct 2008
1 answer
97 views
Hi,

I have GridEditCommandColumn and I have set its UpdateImageUrl but still it is showing default theme Edit Image.

I dont know what can be wrong with this. Here is code I have written.

<telerik:GridEditCommandColumn ButtonType="ImageButton" UpdateImageUrl="Extra/edit.gif" UniqueName="EditCommandColumn">

</telerik:GridEditCommandColumn>

Regards,
Divyesh
Shinu
Top achievements
Rank 2
 answered on 10 Oct 2008
1 answer
637 views
Hi,

I am using RadControls Q1 2007 for ASP.NET.

I have a grid with checkboxes that were created manually.  I can't seem to find code which lets me loop through each row, and getting the value of the checkbox.  I need to do this one th client side.

Please can someone advise?

Brendan
Shinu
Top achievements
Rank 2
 answered on 10 Oct 2008
1 answer
87 views

Hi all
I m adding details to a mastertable on a hierarchical  grid, my problem when the rows of the mastertable are displayed they dont show that they have details under them eg a plus sign or an arrow like the treeview. Does anyone know how to do this
I dont like the line below ,its seems too rigid for what i want to achieve. Right now thats what im doing  but not happy with it.
Grid1.SelectedIndexes.Add(2, 0, 1, 0, 0);

Shinu
Top achievements
Rank 2
 answered on 10 Oct 2008
2 answers
61 views
Hi,

I have implemented a functionality to search on columns which are not displayed in Grid.

  1. Grid has 4 columns
  2. Only two columns are shown in grid with filter functionality
  3. There are two columns in grid which can be made visible/ hidden using context menu.
  4. I need to search on column which is not currently shown in grid.
  5. For this i have give a Drop down list with name of columns and a text box to enter value to search. User select column enters value to search and then searches using search button provided.
  6. I have attached sample for the same.
Features expected: -
  1. This should be provided as some property which can be turned on or off. This especially useful when i have 200 columns in grid and i am only showing few of them but would like to show search even on others.
Missing Functionality in My Sample application: -

  1. The search functionality from within the grid and from my search functionality work independent of each other. They search in all records, where as the should consider both the criterias when search button is clicked.
  2. At least they should only filter on just whatever is displayed in grid and not all.
  3. Lastly the text box is displayed irrespective of Data type, Appropriate Control should be displayed depending on data type.
I hope my sample application helps Telerik team to improve the grid.

In the mean time if you can provide me work around for atleast point 1 or 2 it would be of great help.

For Zip File of Sample application please refer: -

Sample Application
Siddharth
Top achievements
Rank 1
 answered on 10 Oct 2008
1 answer
99 views

Hi,

 

How can we find hidden RadGrid columns in Code?.

Kumar

Princy
Top achievements
Rank 2
 answered on 10 Oct 2008
1 answer
190 views
Hi,

    I need to retain the header checkbox state in GridClientSelect Column when pagination happens.

Can anyone help me out?
Princy
Top achievements
Rank 2
 answered on 10 Oct 2008
4 answers
297 views
Hi,

I'd like to know how to dynamically add a RadTab control with 'Close' feature SERVER-SIDE.

I've alread created the tabs, but i cannot add a 'Close' gif on them.

thanks in advance
Scott R
Top achievements
Rank 1
 answered on 10 Oct 2008
0 answers
113 views
Is it possible to use the radcontextmenu with an iframe that displays a cross domain webpage? The context menu needs to call a javascript function which copies text selected by the user. The context menu works fine when the target control is not an iframe and I can successfully copy text from the iframe using IE's default context menu.....so it appears the radcontextmenu is not receiving the click event. Has anyone run into this problem or know a work-around? I know there are restrictions when using cross-domain pages in an iframe but given you can accomplish this with IE's default context menu, there must be a way to do it using the radcontextmenu control.

Many thanks!!

James
James
Top achievements
Rank 1
 asked on 09 Oct 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?