Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
221 views
I'm getting the following error when clicking the "Options" button when trying to insert a new appointment:

"Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar"

This doesn't happen in a small test project I put together but happens when I put the calendar into our application.  Here's the parameter string I get during the postback just before the error occurs.  I believe the startDate and endDate is formatted improperly and something in our application is causing this problem.  I'm trying to insert and appointment on February 23rd.  Notice the start date is 2010 0023 0002.  It should be 2010 0223 0000.  I.e., the day/month should be the middle 4 digits, the time is the last 4 digits.

"command":"AdvancedInsert",
"appointment":
{
"Subject":"",
"Description":"",
"Resources":[],
"RecurrenceState":0},
"startDate":"201000230002",
"endDate":"201000240002"
}

Any idea's what's causing this or how to fix it?

Thanks.

Kevin

Kevin Flynn
Top achievements
Rank 1
 answered on 11 Feb 2010
1 answer
96 views
Hi,
I noticed that my spellchecker does not catch upper-lower case mixed letters (aFFect, pRocess). My WordIgnoreOptions is set to "none" so it should not ignore those words.  Is there any other property I need to modify for this work? Thank you for your help!

Kate




Rumen
Telerik team
 answered on 11 Feb 2010
1 answer
94 views
We are going through the demos of RadControls for ASP.NET AJAX -> Windows -> Window/Restriction Zone. (http://demos.telerik.com/aspnet-ajax/window/examples/restrictionzone/defaultcs.aspx)
Clicking on Menu options such as 'CSS3.Info' or 'organic{x}html' opens a window in the restricted zone.
If any of these windows is closed, one cannot get it opened again by clicking on the option.
After Refreshing and clicking on the option the window gets opened.

We are facing a similar kind of problem in our case.

Please do give a solution.
robertw102
Top achievements
Rank 1
 answered on 11 Feb 2010
3 answers
139 views
Hi.
Could someone show me how to sort a radgrid by column click using javascript (not radajaxmanager).
Tsvetoslav
Telerik team
 answered on 11 Feb 2010
8 answers
247 views
When I create, update or delete an appointment and my code fails for whatever reason (debgging, testing etc), the UI will still look like the appointment was added and currently exists or was changed successfully until i refresh the page which of course reloads what i actually have in the DB.

Is there a standard way of not updating the UI on a failure?
The issue seems to be that the appointment is added to the control immediately before the call to my code actually creates or updates or whatever.

I've currently been using this to refresh the UI as a temp way to refresh
//temp way to rebind scheduler on the client  
function refreshSchedulerClientSide() {  
    var scheduler = $find('RadScheduler1');  
    scheduler.set_selectedDate(scheduler.get_selectedDate());  
}  

I could just call this on failure?

any tips?

thanks
T. Tsonev
Telerik team
 answered on 11 Feb 2010
1 answer
124 views
Instead of having 30+ items in the drop down which is separated by different categories, is it possible to use RadMenu inside Combobox to display something like this.    When the user hovers over Section A (which is a separator), it automatically displays the child menu for section A to be selected.     I saw some references to TreeView but using menu is probably simpler?   They key is auto expand/collapse that the menu inherently supports.

Section A     ---- Item A1
                      ---- Item A2
Section B
Section C
Section D
Veronica
Telerik team
 answered on 11 Feb 2010
3 answers
135 views
I have a treeview with Add/edit/delete context menu items. My problem is I am not able to make the node expanded and selected when I add a child node to aperent node. After adding/editing I am rebinding the treeview using AjaxManager.
Please note that this will have unlimited nodes.

For example,

Node1

- SubNode1

   - SubNode1.1

- SubNode2

- SubNode3

 If I add new node for SubNode1, named SubNode1.1, the focus should be in SubNode1 and it should be expanded to see the new node added.


Any help is greatly appreciated.

Thanx in advance
ASD

Vesko
Top achievements
Rank 2
 answered on 11 Feb 2010
4 answers
270 views
I have a RadGrid that has it's rows and columns being created programatically, and there is a RadAjaxManager that is set to update another Panel on SelectedIndexChange. The RadGrid also has scrolling enabled and multirowselect disabled. The RadGrid operates as supposed to, but as soon as you scroll it starts collecting selected items. I have set break points and verified through watches that SelectedItems.Count grows greater that 1. This also prevents from selecting previous selected rows after you've scrolled. I have tried clearing the selected items in the page unload event, but when it renders it sometimes shows more than one item selected. I say sometimes because it is not consistent with this issue. Only pattern I have noticed is that scrolling starts the problem.

(Edited)
Disregard about the disappearing headers. Just the multiple selections issue now.

I would appreciate any advice on this. I'll include my code as well. Thanks.

P.S.  The code I've included is set up to create text for the columns and rows, so no actual data is needed. You can easily copy and paste the same code to see what I'm seeing.


<rad:RadAjaxManager ID="AjaxManager" runat="server"
 <AjaxSettings> 
  <rad:AjaxSetting AjaxControlID="grdCustomerAssignments"
   <UpdatedControls> 
    <rad:AjaxUpdatedControl ControlID="grdCustomerAssignments" /> 
   </UpdatedControls> 
  </rad:AjaxSetting> 
  <rad:AjaxSetting AjaxControlID="grdCustomerAssignments"
   <UpdatedControls> 
    <rad:AjaxUpdatedControl ControlID="pnlDetails"  /> 
   </UpdatedControls> 
  </rad:AjaxSetting> 
 </AjaxSettings> 
</rad:RadAjaxManager> 
 
<rad:RadGrid ID="grdCustomerAssignments" runat="server" Skin="WebBlue" AutoGenerateColumns="false" AllowMultiRowSelection="false" OnNeedDataSource="grdCustomerAssignments_NeedDataSource" OnSelectedIndexChanged="grdCustomerAssignments_SelectedIndexChanged"
     
 <ClientSettings EnablePostBackOnRowClick="true" > 
  <ClientEvents/> 
  <Scrolling AllowScroll="true" ScrollHeight="350" UseStaticHeaders="true" SaveScrollPosition="true" /> 
  <Selecting AllowRowSelect="true" /> 
  <Resizing AllowColumnResize="true" /> 
 </ClientSettings> 
             
 <MasterTableView DataKeyNames="ID" > 
  <HeaderStyle Wrap="false" HorizontalAlign="Center" VerticalAlign="Middle" Font-Bold="true" /> 
  <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="false" /> 
  <AlternatingItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="false" /> 
                 
  <NoRecordsTemplate> 
    <div style="font-size:80%; color:Maroon;">No Items Were Found</div> 
  </NoRecordsTemplate> 
 
 </MasterTableView> 
                 
</rad:RadGrid> 
 
<asp:Panel ID="pnlDetails" runat="server"
 <rad:RadTabStrip ID="tabStrip" runat="server" Align="Justify" AppendDataBoundItems="false" SelectedIndex="0" MultiPageID="multiPage" Skin="WebBlue"
  <Tabs></Tabs
 </rad:RadTabStrip> 
 <rad:RadMultiPage ID="multiPage" runat="server"></rad:RadMultiPage> 
</asp:Panel> 



protected
 void Page_Init(object sender, EventArgs e) 
 GetAssignments(); 
 if (!IsPostBack) 
  AddColumnsToGrid(); 
 
protected void Page_Load(object sender, EventArgs e) 
 tabStrip.Tabs.Clear(); 
 multiPage.Controls.Clear(); 
 
protected void Page_UnLoad(object sender, EventArgs e) 
 grdCustomerAssignments.MasterTableView.ClearSelectedItems(); 
 
protected void grdCustomerAssignments_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) 
 grdCustomerAssignments.DataSource = Assignments; 
 
protected void grdCustomerAssignments_SelectedIndexChanged(object sender, EventArgs e) 
 try 
 { 
  string id = ((RadGrid)sender).SelectedValue.ToString(); 
                 
  DataRow dataRow = null
  foreach (DataRow row in Assignments.Rows) 
  { 
   if (row["ID"].ToString() == id) 
    dataRow = row; 
  } 
 
  PopulateAssignmentDetail(dataRow); 
 
 } 
 catch (Exception ex) 
 { 
 
 } 
 
protected void PopulateAssignmentDetail(DataRow dataRow) 
 // just some code to add details to each tab. 
 
protected void AddColumnsToGrid() 
 grdCustomerAssignments.MasterTableView.Columns.Clear(); 
 
 for (int i = 1; i < 7; i++) 
 { 
  DataColumn column = Assignments.Columns[i]; 
  if (column.DataType == typeof(Int32)) 
  { 
   GridNumericColumn numericColumn = new GridNumericColumn(); 
   numericColumn.HeaderText = column.ColumnName; 
   numericColumn.DataField = column.ColumnName; 
   grdCustomerAssignments.MasterTableView.Columns.Add(numericColumn); 
  } 
  else if (column.DataType == typeof(DateTime)) 
  { 
   GridDateTimeColumn dateColumn = new GridDateTimeColumn(); 
   dateColumn.HeaderText = column.Caption; 
   dateColumn.DataField = column.ColumnName; 
   dateColumn.DataFormatString = @"{0:MMM dd yyyy}"
   grdCustomerAssignments.MasterTableView.Columns.Add(dateColumn); 
  } 
  else 
  { 
   GridBoundColumn boundColumn = new GridBoundColumn(); 
   boundColumn.HeaderText = column.Caption; 
   boundColumn.DataField = column.ColumnName; 
   grdCustomerAssignments.MasterTableView.Columns.Add(boundColumn); 
  } 
 } 
 
private void GetAssignments() 
 if (Assignments == null
  Assignments = new DataTable(); 
 if (TabTitles == null
  TabTitles = new Dictionary<string, IList<int>>(); 
 
 try 
 { 
  Assignments.Columns.Add(new DataColumn("ID")); 
  for (int i = 0; i < 50; i++) 
  { 
   Assignments.Columns.Add(new DataColumn("Column" + i.ToString())); 
  } 
   
  int columnIndex = 0; 
  int tabIndex = 0; 
  foreach (DataColumn column in Assignments.Columns) 
  { 
   if (columnIndex > 5) 
   { 
    string fieldCategory = "tab" + tabIndex.ToString(); 
    if (tabIndex == 4) 
     tabIndex = 0; 
    else 
     tabIndex++; 
 
    if (!TabTitles.ContainsKey(fieldCategory)) 
    { 
     IList<int> tmp = new List<int>(); 
     tmp.Add(columnIndex); 
     TabTitles.Add(fieldCategory, tmp); 
    } 
    else 
     TabTitles[fieldCategory].Add(columnIndex); 
   } 
   columnIndex++; 
  } 
 
  for (int j = 0; j < 50; j++) 
  { 
   DataRow row = Assignments.NewRow(); 
   foreach (DataColumn column in Assignments.Columns) 
   { 
    row[column.ColumnName] = column.ColumnName + "Row" + j.ToString(); 
   } 
   Assignments.Rows.Add(row); 
  } 
 
  Assignments.AcceptChanges(); 
 } 
 catch (Exception ex) 
 { 
 
 } 
 
Josh Horton
Top achievements
Rank 1
 answered on 11 Feb 2010
7 answers
187 views
I am using an AdvancedEditTemplate. When the user clicks on the 'Update' button, RadScheduler1_AppointmentCommand gets called. Here I am validating the fields. The screen will go back to the origianl calendar grid view, no matter what. I really need to keep the user on the edit for view, if the validation fails and show them a message. This way the appointment doe not get save, but the user doesn't know what's happening. Any way of doing this?

Thanks a lot

Kati

 

robertw102
Top achievements
Rank 1
 answered on 11 Feb 2010
1 answer
95 views
Hello Telerik Team,

I used RadUpload to upload 5 documents , also added a custom "textbox" called "Title" to each file.
Now, before hitting "Upload" button, I want to make sure that "Tilte" has been entered for each file.

So, I wrote a script function for "OnClientFileselected" , and trying to clear the input when a file is selected 
without entering "Title".
Now, I used the upload.clearFileInputAt method. However, its not working if I give any conditions to clear 
files at specified index like in the below code.

 function clear_file(index) {
            var upload = $find("<%= RadUpload1.ClientID %>");
            var fileInputs = upload.getFileInputs();
            for (var i = 1; i < fileInputs.length; i++) {
                if (i != index) {                    
                }
                else {
                    upload.clearFileInputAt(i);
                }
            }            
        }

I got completely lost, why the condition is not working. If i remove the "if- else" then its working and clearing up all inputs.

Please help me at your earliest convenience.

Thank you,
Bharathi
Vesko
Top achievements
Rank 2
 answered on 11 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?