hi
How to set date format in date picker i have following code
<
telerik:RadDatePicker ID="calFrom" Width="150" Skin="Office2007" runat="server">
<
DateInput DateFormat="yyyy-MM-dd" DisplayDateFormat="yyyy-MM-dd"></DateInput>
</telerik:RadDatePicker>
But its not working i need yyyy-mm-dd format date
Please help me its urgent
Regards,
Abdul
| string Connection = "Data Source=62.197.41.101; Initial Catalog=PilotWebApp; User ID=sa; Pwd=medularis;"; |
| strPropref = Request.QueryString["Propref"]; |
| SqlConnection conn = new SqlConnection(Connection); |
| SqlCommand cmd = new SqlCommand("slot_sp_EngineerTimeslots", conn); |
| cmd.CommandType = CommandType.StoredProcedure; |
| cmd.Parameters.AddWithValue("@PROPREF", strPropref); |
| cmd.Parameters.AddWithValue("@iSTARTDATE", RadCalendar1.SelectedDate); |
| cmd.Parameters.AddWithValue("@JOBLENGTH", "30"); |
| cmd.Parameters.AddWithValue("@TIMESLOT", RadAppointment.SelectedValue); |
| conn.Open(); |
| SqlDataReader reader = cmd.ExecuteReader(); |
| DataTable dt = new DataTable(); |
| dt.Load(reader); |
| RadGrid1.DataSource = dt; |
| RadGrid1.DataBind(); |
Hi,
I have a grid that i created dynamicly everyting i mean my datasource, my grid structure and every item in my grid are create in code behind for specific need. Everything is working fine when i load my grid.
The thing is i've created by code behind 2 other control that i add in my header item (imagebutton and a textbox).
I've add a javascript on my image button that is suppose to copy in all my item the value entered before in the header textbox.
But i'm not getting a radtextbox but simply an imput. When i click in any cell that i changed the value before, it change back to the first value.
| function OnCopyResult(textBoxId, columnIndex) |
| { |
| var grid = $find("<%= RadGridLocalTraining.ClientID %>"); |
| var masterTable = grid.get_masterTableView(); |
| var headerTextBox = masterTable.HeaderRow.cells[columnIndex].firstChild.nextSibling.nextSibling.firstChild; |
| var value = headerTextBox.value; |
| var itemsCount = grid.get_masterTableView().get_dataItems().length; |
| for(i = 0; i < itemsCount; i++) |
| { |
| cell = masterTable.getCellByColumnUniqueName(masterTableView.get_dataItems()[i],masterTableView._columnsInternal[columnIndex].get_uniqueName()); |
| var cellTextBox = cell.firstChild.firstChild; |
| cellTextBox.value = value; |
| } |
| } |
I am using the RadGrid in which we are using the self referencing hierarchy.
In the we are opening a new page in the row_doubleClick Event of the Grid.
var MasterTable = grid.get_masterTableView();
var row = MasterTable.get_dataItems()[dataItem.rowIndex-1];
Please find the above code which returns the row index.
It returns for the MasterTable but if i double click the child event iam not able to get the respective event.
Please provide me solution in so that i can get the row index of the child event in the self referencing hiearchy grid.
Thanks
Veda.S
| <%@ Page Language="C#" AutoEventWireup="false" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication2.WebForm1" %> | |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head runat="server"> | |
| <title></title> | |
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> | |
| </head> | |
| <body> | |
| <form id="form1" runat="server"> | |
| <asp:ScriptManager ID="ScriptManager1" runat="server"> | |
| </asp:ScriptManager> | |
| <div> | |
| <div>#1<asp:TextBox ID="TextBox1" runat="server" CssClass="ddl" style="width: 300px;" /><asp:HiddenField ID="HiddenField1" runat="server" /></div> | |
| <div>#2<asp:TextBox ID="TextBox2" runat="server" CssClass="ddl" style="width: 300px;" /><asp:HiddenField ID="HiddenField2" runat="server" /></div> | |
| <div>#3<asp:TextBox ID="TextBox3" runat="server" CssClass="ddl" style="width: 300px;" /><asp:HiddenField ID="HiddenField3" runat="server" /></div> | |
| <div>#4<asp:TextBox ID="TextBox4" runat="server" CssClass="ddl" style="width: 300px;" /><asp:HiddenField ID="HiddenField4" runat="server" /></div> | |
| <div>#5<asp:TextBox ID="TextBox5" runat="server" CssClass="ddl" style="width: 300px;" /><asp:HiddenField ID="HiddenField5" runat="server" /></div> | |
| <div>#6<asp:TextBox ID="TextBox6" runat="server" CssClass="ddl" style="width: 300px;" /><asp:HiddenField ID="HiddenField6" runat="server" /></div> | |
| <div>#7<asp:TextBox ID="TextBox7" runat="server" CssClass="ddl" style="width: 300px;" /><asp:HiddenField ID="HiddenField7" runat="server" /></div> | |
| <div>#8<asp:TextBox ID="TextBox8" runat="server" CssClass="ddl" style="width: 300px;" /><asp:HiddenField ID="HiddenField8" runat="server" /></div> | |
| <br /><br /> | |
| <telerik:RadComboBox ID="rcmb" runat="server" Skin="Default" Width="300px" | |
| ShowMoreResultsBox="false" EnableVirtualScrolling="false" EnableLoadOnDemand="false" | |
| MarkFirstMatch="false" ItemRequestTimeout="500" OpenDropDownOnLoad="false" ShowDropDownOnTextboxClick="false"> | |
| <Items> | |
| <telerik:RadComboBoxItem Text="Item 1" Value="1" /> | |
| <telerik:RadComboBoxItem Text="Item 2" Value="2" /> | |
| <telerik:RadComboBoxItem Text="Item 3" Value="3" /> | |
| <telerik:RadComboBoxItem Text="Item 4" Value="4" /> | |
| <telerik:RadComboBoxItem Text="Item 5" Value="5" /> | |
| <telerik:RadComboBoxItem Text="Item 6" Value="6" /> | |
| </Items> | |
| </telerik:RadComboBox> | |
| <div>Functions called</div> | |
| <div id="fcts" style="height: 250px; overflow: auto; border: solid 1px gray;"></div> | |
| <script type="text/javascript"> | |
| /* <![CDATA[ */ | |
| Sys.Application.add_load(function() | |
| { | |
| var _activeTb; | |
| var _rcmb = $find("<%= rcmb.ClientID %>"); | |
| _rcmb.get_element().style.position = 'absolute'; | |
| _rcmb.get_element().style.display = 'none'; | |
| _rcmb.set_closeDropDownOnBlur(false); | |
| _rcmb.add_selectedIndexChanged(UpdateValue); | |
| _rcmb.add_onClientBlur(HideDdl); | |
| _rcmb.disable(); | |
| function ShowDdl(tb) | |
| { | |
| $("#fcts").append("ShowDdl()<br />"); | |
| _activeTb = tb; | |
| _rcmb.enable(); | |
| var div = _rcmb.get_element(); | |
| var offset = $(_activeTb).offset(); | |
| div.style.top = offset.top + "px"; | |
| div.style.left = offset.left + "px"; | |
| _rcmb.clearSelection(); | |
| _rcmb.set_text(_activeTb.value); | |
| _rcmb.set_value($("INPUT[type=hidden]", _activeTb.parentNode).val()); | |
| _activeTb.style.visibility = 'hidden'; | |
| div.style.display = ''; | |
| _rcmb.get_inputDomElement().focus(); | |
| if (_rcmb.get_text().length != 0) { | |
| _rcmb.selectText(0, _rcmb.get_text().length); | |
| } | |
| _rcmb.showDropDown(); | |
| } | |
| function UpdateValue(sender, eventArgs) | |
| { | |
| $("#fcts").append("UpdateValue()<br />"); | |
| var item = eventArgs.get_item(); | |
| if (item != null) { | |
| $(_activeTb).val(item.get_text()); | |
| $("INPUT[type=hidden]", _activeTb.parentNode).val(item.get_value()); | |
| } | |
| else { | |
| $(_activeTb).val(""); | |
| $("INPUT[type=hidden]", _activeTb.parentNode).val(""); | |
| } | |
| } | |
| function HideDdl() | |
| { | |
| $("#fcts").append("HideDdl()<br />"); | |
| _activeTb.style.visibility = ''; | |
| _rcmb.hideDropDown(); | |
| /* uncommment the following lines | |
| and the textbox onfocus() event will not be called | |
| in IE after OnClientBlur()... must reclick. | |
| Note: Firefox works ok. |
|
| */ | |
| // _rcmb.get_element().style.display = 'none'; | |
| // _rcmb.disable(); | |
| } | |
| $(".ddl").focus(function() | |
| { | |
| ShowDdl(this); | |
| }); | |
| }); | |
| /* ]]> */ | |
| </script> | |
| </div> | |
| </form> | |
| </body> | |
| </html> | |