I have RadDatePicker control with SelectedDateChanged event. When I change the Date the event fires with Confirm window. When I click on 'Cancel' button RadDatePicker1_SelectedDateChanged invokes again and it displays Confirm window twice. When I click on 'OK' button it works fine. What could be the problem? Thanks for any suggestions. I am using 2010 Q3 controls.
<telerik:RadDatePicker ID="RadDatePicker1" runat="server" AutoPostBack="true" OnSelectedDateChanged="RadDatePicker1_SelectedDateChanged" >
</telerik:RadDatePicker>
protected void RadDatePicker1_SelectedDateChanged(object sender, EventArgs e)
{
string radalertscript = "<script language='javascript'>function f(){ radconfirm('Are you sure?', confirmChange, 400, 100) ; Sys.Application.remove_load(f);}; Sys.Application.add_load(f);</script>";
Page.ClientScript.RegisterStartupScript(this.GetType(), "radalert33", radalertscript);
}
Here is Javascript function
function confirmChange(args) {var hdval = document.getElementById('hiddenControlOldValue').value;
picker.set_selectedDate(new Date(hdval));
}
}
It looks like the problem is setting old value to Date Picker when 'Cancel' button clicked. Is there are any way I can Cancel Date Picker new selected value when 'Cancel' button clicked?
I have a radgrid on my page that I build programmatically within my Page_Init. I use the NeedDataSource to populate my grid. I have pagination enabled along with filtering.
When the user is on my screen the radgrid displays with information that spans multple pages. They can also use filtering to shrink the number of pages down. They will then have the ability to click on a regular asp button. This button will then try to gather all of the ids from all of the records in the radgrid. Not just the records on the current page.
An example:
1. the radgrid has a pagination set to 100 records. the datasource has a total of 1600 records in it. So I have a radgrid of 16 pages, 100 at a time.
2. the user uses a filter to shrink the number of pages down to 9 with a total of 850 records showing. the datasource still has 1600 because the radgrid is filtering and not the actual datasource.
3. the user clicks the button. I want, on the server, to be able to traverse through all 850 records to get their specific datakeyitem and do something like this but the problem is the MasterTableView only has 100 records in it not the 850.
protected void Button1_Click(object sender, EventArgs e) { foreach (GridDataItem item in RadGrid1.MasterTableView.Items) { int detailID = dataItem.GetDataKeyValue("DetailID"); //do something with the detailID } }var lstBusinessModel = $find("<%=lbBusinessModel.ClientID %>");
var items = lstBusinessModel.get_items();<telerik:RadListBox ID="lbBusinessModel" Width="200px" Height="300px" OnClientSelectedIndexChanged="BusinessModelSelected"
runat="server"></telerik:RadListBox>How would you go about creating dynamic tooltips such as the ones found here:
http://freelance.geekinterview.com/143141-issues-with-jquery-cluetip.html
Basically I got a glossary table in my database with definitions that I want to display as a tooltip in my aspx (c#) pages wherever the a keyword will match that of the glossary..
Something basic will do, such as:
http://plugins.learningjquery.com/cluetip/demo/
<telerik:GridTemplateColumn HeaderStyle-Width="20px" UniqueName="Comments" AllowFiltering="false" ItemStyle-VerticalAlign="Bottom" ItemStyle-HorizontalAlign="Left" HeaderText="Comments"> <ItemTemplate> <asp:Image ID="imgInfo" runat="server" ImageUrl="<% $WSSUrl:~info.png%>" /> <telerik:RadToolTipManager runat="server" ID="radTTMgrInfo" Position="BottomRight" RelativeTo="Element" Width="600px" Height="600px" Animation="Fade" ShowCallout="false" OffsetX="-70" OffsetY="-1" ShowDelay="0" ShowEvent="OnMouseOver" HideEvent="FromCode" OnClientBeforeHide="OnClientBeforeHide" OnClientShow="OnClientShow" Text=' <%# Eval("Comments") %>' ContentScrolling="Y"> <TargetControls> <telerik:ToolTipTargetControl TargetControlID="imgInfo" /> </TargetControls> </telerik:RadToolTipManager> </ItemTemplate> </telerik:GridTemplateColumn>