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

1)   I have a master page that contains the following controls:
      <telerik:RadAjaxManager id="RadAjaxManager" runat="server" EnablePageMethods="True" />
      <telerik:RadAjaxLoadingPanel id="DefaultLoadingPanel" runat="server" />

2)   My content page contains:
      <telerik:RadPanelItem Value="CourseControl" Text="Courses"><ContentTemplate>...</ContentTemplate></telerik:RadPanelItem>
      <telerik:RadAjaxManagerProxy id="CourseRadAjaxManagerProxy" runat="server">
         <AjaxSettings>
          <telerik:AjaxSetting AjaxControlID="CourseGrid">
           <UpdateControls>
            <telerik:AjaxUpdateControl ControlID="CourseGrid" LoadingPanelID="DefaultLoadingPanel" />
           </UpdateControls>
          </telerik:AjaxSetting>
         </AjaxSettings>
      </telerik:RadAjaxManagerProxy>

3)   My User Control known as CourseControl in the above RadPanelItem contains the following control:
       <UC1:CourseGrid id="CourseGridControl" runat="server">

4)   My CourseGrid user control which is a generic grid used by multiple user controls has a Javascript function to open a popup window (AddEditCourse.aspx) which helps users manage the courses.
 
The problem is when a new course is added to the database or an existing course is updated I am unable to refresh the grid so that the changes be visible to the user. In the CloseAndRebind() function located in the popup window, I use top.location.href = top.location.href. This refreshes the grid but it refreshes the entire page while I only want to refresh only the grid.

Complete Root: MasterPage->Couses.aspx->CoursesUC.ascx->CourseGrid.ascx->AddEditCourse.aspx

Can someone please point me in the right direction? I would appreciate if you could provide me some code sample.

Thank you in advance.

Luc
Tsvetina
Telerik team
 answered on 06 Sep 2011
1 answer
148 views
Hi,
On editing single reccurrence  AppointmentInsert  handler is fired  to add a new appointment for the exception, and the RecurrenceParentid for this appointment is set to the id of the parent recurring appointment.
So, On editing single reccurrence i am able to insert new one with same id as of parent Appointment and new appointment shows in the schedular, but i am still not able to get image of exception appointment. it just show it as normal recurring appointment.is any other recurrence rule will be generated in acse of editing indivisual appointment ?
Also if i edit while series of recurrence and i click on the reset exception link  then it is not deleting the new entry added but restore previously edited indivisual appointment making it two appointment on same day. One of recursive and one exceptional.
I am attaching screenshots of Problem. Appointment Delete event does not fire on clicking link resetException link.
Pls Reply..


Thanks
Peter
Telerik team
 answered on 06 Sep 2011
3 answers
168 views
Hi!

My customer has a request to skip the calander popupbutton of the datepicker on tab. So if I have 2 datepickers and the textbox of the first datepicker has focus and I press tab, I want the textbox of the second datepicker to get focus. What I've been trying to do so far, is  to trigger a keydown event with the tab key on the focus event of the popupbutton. I was doing this with jquery. But so far it's not working at all.
Do you know how to accomplish this with jquery or javascript?

Thanks in advance.
Datamex
Top achievements
Rank 2
 answered on 06 Sep 2011
3 answers
151 views
I have 2 radgrids on my page, both bound with entity data sources. The second grid's data source uses a WHERE clause to filter the set by a parent/foriegn key.  The second grid is cofigured for allow inserts/updates/deletes on both the data source and radgrid. When I insert a record on the second grid I would like to pass the key field from the first grid to the foreign key on the second.  I have seen several examples to do this but even when a value is successfully passed to the edit column textbox, I get an Entity error that the foreign key is null. Can someone help with this or is this an Entity Framewwork issue?
Tsvetina
Telerik team
 answered on 06 Sep 2011
7 answers
188 views
Hi,
Is this recurrence rule is exceptional:
DTSTART:20110907T183000Z
DTEND:20110908T083000Z
RRULE:FREQ=WEEKLY;COUNT=5;INTERVAL=1;BYDAY=MO,TU
EXDATE:20110911T183000Z

as it is not coming to RecurrenceState.Exception in appointment_created event of radschedular.
my schedular is working fine except on editing indivisual appointment of recurring appointment it doesnot show that appointment again on editing as it never comes to exceptional state in Appointment_created event.
I am attaching the xml and my code of schedular,
Pls Help.........

Thanks
Dan Lehmann
Top achievements
Rank 1
 answered on 06 Sep 2011
1 answer
95 views

I have a masterpage with menu items and a content page inside a telerik ajax pannel. The master page does not have any ajax pannels.  I need to disable and enable menu items in the masterpage from the contentpage and the ajax pannel as user clicks the items inside the ajax panel.  What is the best method to update the masterpage contents. 
Princy
Top achievements
Rank 2
 answered on 06 Sep 2011
1 answer
94 views
Hey Community,

I need to lock down my grids look and feel across my entire application. I was wondering if there was a configuration I can define for the site that makes all my grids behave the same way. Sort of like using the Skin in the web.config.

Can I set any grid properties in the web.config?

For instance:
  • Skin="Transparent" - Yes, I know I can do this...
  • EnableViewState="false"
  • AllowPaging="true"
  • PageSize="18"
  • etc...

I mean it would really be nice to enable row hover, dbl-click, and other advanced features once so it guarantees a common look and feel everywhere, but could be overridden if defined in the grid markup, or programmaticly.

Thanks.

John
Tsvetina
Telerik team
 answered on 06 Sep 2011
1 answer
114 views
Hi,

I have planned to purchase ASP.Net Ajax controls with using my project. Before that i have checked sample source in 1and1 shared hosting in my account. 1and1 windows hosting has supported for .Net3.5. Sample source is working fine in my development machine. But it is not working in 1and1 windows hosting. Please give me your suggestion or sample web config file

Regards

Rameshkumar
Iana Tsolova
Telerik team
 answered on 06 Sep 2011
10 answers
272 views
Hi,
 I have a grid  (Version Q3 2009 NET35 -  Product Version:  2009.3.1314.35 - Telerik.Web.UI.dll ) with one master table and two detail tables (One inside the other one).  The details table are populated dynamically when the 
row is selected.  First time that the page runs the master table and the detail tables are populated properly.   The user selects one row 
from the master table and the data to populate the detail table is retreived from the database at that moment and the grid displays fine. 

If the user changes the search criteria for the report and hits the "Search button" the grid is refreshed (A Post back is fired). 
Master table is refreshed properly based on the new search criteria. When the detail grid is opened is still showing the data from the previous execution

The "DetailTableDataBind" event is fired.  The data used to populate the detail grid is retreived fine. The datasource for the
DetailTableView is linked to the datatable, but for any reason the  page rendered is still showing the old data.

A sample of the code is attached to make the question more understandable. 

<telerik:RadGrid ID="mkgtTotalLevels" runat="server" Skin="Outlook" OnItemDataBound="mkgtTotalLevels_ItemDataBound"
 OnNeedDataSource="mkgtTotalLevels_NeedDataSource" ondetailtabledatabind="mkgtTotalLevels_DetailTableDataBind"
 OnItemCommand="mkgtTotalLevels_ItemCommand" DataSourcePersistenceMode="NoPersistence"
 AllowPaging="True" AllowSorting="true" PageSize="20" HeaderStyle-Font-Bold="true"
 Width="100%" AutoGenerateColumns="true">
 
 <MasterTableView Name="Level1" DataKeyNames="MarketingSourceID" CommandItemDisplay="Top">
 
  <DetailTables>
   <telerik:GridTableView Name="Level2" DataKeyNames="MarketingSourceSubID" CommandItemDisplay="Top" HierarchyLoadMode="ServerOnDemand"
                AutoGenerateColumns="true"  Width="100%" BackColor="#EFEFFB" >

    <DetailTables>
     <telerik:GridTableView Name="Level3" DataKeyNames="" CommandItemDisplay="Top" HierarchyLoadMode="ServerOnDemand"
      AutoGenerateColumns="true"  Width="100%" BackColor="#FFFFCC" >     
     </telerik:GridTableView>                                                       
                </DetailTables>
                                                   
            </telerik:GridTableView>
  </DetailTables>                                           
 </MasterTableView>      
 
 
 ==============================================================================================
 
 
protected void mkgtTotalLevels_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
 BindDataGrid();
}

private void BindDataGrid()
{                       
 SetRangeDates();

 SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["TargetInfoNetConnectionString"].ConnectionString);

 try
 {
  // Get a Pivot table with the Marketing Level 1 - Total of Providers
  string str = "dbo.spPivot_MkgtLevel1_Totals";
  SqlCommand cmd = new SqlCommand(str, con);
  cmd.CommandType = CommandType.StoredProcedure;

  cmd.Parameters.Add("@DateFrom", SqlDbType.Date);
  cmd.Parameters["@DateFrom"].Value = StartDate;

  cmd.Parameters.Add("@DateTo", SqlDbType.Date);
  cmd.Parameters["@DateTo"].Value = EndDate;

  SqlDataAdapter da = new SqlDataAdapter(cmd);
  DataTable dt = new DataTable();
  da.Fill(dt);
  
  mkgtTotalLevels.DataSource = dt;               
 }

 finally
 {
  con.Close();
 }
}

protected void mkgtTotalLevels_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
{
 GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;

 //**** Level 2 ****
 if (e.DetailTableView.Name == "Level2")
 {
  DataTable dt2 = new DataTable();
  Int32 Level1 = 0;
  Int32.TryParse(dataItem.GetDataKeyValue("MarketingSourceID").ToString(), out Level1);
   
  dt2 = GetLevel2Data(Level1);
      
  e.DetailTableView.DataSource = dt2;               
 }

 //**** Level 3 ****
 if (e.DetailTableView.Name == "Level3")
 {
  DataTable dt3 = new DataTable();
  Int32 Level2 = 0;
  Int32.TryParse(dataItem.GetDataKeyValue("MarketingSourceSubID").ToString(), out Level2);
  
  dt3 = GetLevel3Data(Level2);
  e.DetailTableView.DataSource = dt3;
 }
}

private DataTable GetLevel2Data(int Level1)
{
 DataTable dt = new DataTable();

 SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["TargetInfoNetConnectionString"].ConnectionString);

 try
 {
  SetRangeDates();
  // Get a Pivot table with the Marketing Level 2 - Total of Providers
  string str = "dbo.spPivot_MkgtLevel2_Totals";
  SqlCommand cmd = new SqlCommand(str, con);
  cmd.CommandType = CommandType.StoredProcedure;

  cmd.Parameters.Add("@DateFrom", SqlDbType.Date);
  cmd.Parameters["@DateFrom"].Value = StartDate;

  cmd.Parameters.Add("@DateTo", SqlDbType.Date);
  cmd.Parameters["@DateTo"].Value = EndDate;

  cmd.Parameters.Add("@MarketingSourceID", SqlDbType.Int);
  cmd.Parameters["@MarketingSourceID"].Value = Level1;

  SqlDataAdapter da = new SqlDataAdapter(cmd);
  
  da.Fill(dt);

  return dt;
 }

 finally
 {
  con.Close();
 }
}

private DataTable GetLevel3Data(int Level2)
{
 DataTable dt = new DataTable();
 SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["TargetInfoNetConnectionString"].ConnectionString);

 try
 {
  SetRangeDates();

  // Get a Pivot table with the Marketing Level 3 - Total of Providers
  string str = "dbo.spPivot_MkgtLevel3_Totals";
  SqlCommand cmd = new SqlCommand(str, con);
  cmd.CommandType = CommandType.StoredProcedure;

  cmd.Parameters.Add("@DateFrom", SqlDbType.Date);
  cmd.Parameters["@DateFrom"].Value = StartDate;

  cmd.Parameters.Add("@DateTo", SqlDbType.Date);
  cmd.Parameters["@DateTo"].Value = EndDate;

  cmd.Parameters.Add("@MarketingSourceSubID", SqlDbType.Int);
  cmd.Parameters["@MarketingSourceSubID"].Value = Level2;

  SqlDataAdapter da = new SqlDataAdapter(cmd);

  da.Fill(dt);

  return dt;
 }

 finally
 {
  con.Close();
 }
}

private void SetRangeDates()
{
 DateTime tmpDate;
 int intYear = 0;
 int intMonth = 0;
 int intDay = 0;

 // **** Start Date ****
 intYear = int.Parse(ddlFromYear.SelectedValue.ToString());
 intMonth = int.Parse(ddlFromMonth.SelectedValue.ToString());
 intDay = 1;

 tmpDate = new DateTime(intYear, intMonth, intDay);
 StartDate = tmpDate;

 // **** End Date ****
 intYear = int.Parse(ddlToYear.SelectedValue.ToString());
 intMonth = int.Parse(ddlToMonth.SelectedValue.ToString());
 tmpDate = new DateTime(intYear, intMonth, 1);
 tmpDate = tmpDate.AddMonths(1);
 tmpDate = tmpDate.AddDays(-1);
 intDay = tmpDate.Day;
 tmpDate = new DateTime(intYear, intMonth, intDay);
 EndDate = tmpDate;
}

 




 

 

Dheeraj
Top achievements
Rank 1
 answered on 06 Sep 2011
2 answers
161 views
In my sharepoint application, I am using RadEditor (RadEditorSharePoint.dll V5.3.2.0) for displaying and editing the content of product. Till now I have used Rad Editor for single product only with the below code.

for setting data:
RadEditor.content = strProductContent

for getting data:
strProductContent = RadEditor.content

In my new requirement, i need to display the content of all the products at once and user can edit all the products content at once. How to display all the data with product name and product content in a table style like

Product1 Name
Product1 Content.

Product2 Name
Product2 Content.

Product3 Name
Product3 Content.


While reading the data from RadEditor, how to segregate the data. Can we use any html controls in the content area to achieve this?

Thanks in Advance.
satish
Top achievements
Rank 1
 answered on 06 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?