Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
154 views
I am having problem in the day view of calendar - the slot width is very minimaland I cannot get them to be expanded (see attachment). I am new to Telerik stuff, have played with a few settings but no luck. Month and week views are fine. The html for the control is:

 <telerik:RadScheduler ID="Scheduler1" runat="server" Culture="en-CA" DataKeyField="Id"
                SelectedView="MonthView" DataEndField="End" DataStartField="Start" DataSubjectField="Subject"
                Width="90%" OnAppointmentDataBound="Scheduler1_AppointmentDataBound"
                OnAppointmentDelete="Scheduler1_AppointmentDelete" BorderStyle="None"
                CssClass="RadCalendar_Windows7" OverflowBehavior="Expand"
                ColumnWidth="200px" AllowEdit="False" OnAppointmentClick="Scheduler1_AppointmentClick"
                OnAppointmentInsert="Scheduler1_AppointmentInsert" AllowInsert="true" AdvancedForm-Enabled="False"
                AdvancedForm-EnableResourceEditing="False" verflowBehavior="Expand" Skin="Windows7"
                ReadOnly="false">
                <AdvancedForm Enabled="False" />
                <DayView EnableExactTimeRendering="True" />
            </telerik:RadScheduler>
Peter
Telerik team
 answered on 28 Jan 2011
1 answer
600 views
Hi,

I've got this page with a couple of RadComboBoxes, an asp TextBox, a RadCalendar, a RadGrid and 2 asp Buttons (Submit and Cancel). The idea is that the user can select categories from the comboboxes, enter a value in the textbox, select a date and press Submit to store the data and it will be shown in the radgrid below (together with older entries, based on the date selected in the calendar).

However, for some reason I can't get the RadGrid to update on the client. The data is stored and everything but it simply won't show. Refreshing the page _does_ update it, but so does pressing a  button again (such as edit, submit, or even changing the date on the calendar). What am I doing wrong?
I have the same problem with the Delete button, although the entry does get deleted, it is not reflected on the client.

My ASCX file:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucTimesheet.ascx.cs" Inherits="PRIS.Timesheet.ucTimesheet" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
...

<
telerik:RadAjaxManagerProxy ID="ramAjaxManager" runat="server">
   <AjaxSettings>
      ...
      <telerik:AjaxSetting AjaxControlID="rdgTimeList">
         <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="rdgTimeList" LoadingPanelID="pnlListLoading" />
         </UpdatedControls>
      </telerik:AjaxSetting>
      ...
      <telerik:AjaxSetting AjaxControlID="btnSubmit">
         <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="pnlTimeSheet" LoadingPanelID="pnlListLoading" />
            <telerik:AjaxUpdatedControl ControlID="pnlForm" />
         </UpdatedControls>
      </telerik:AjaxSetting>
      <telerik:AjaxSetting AjaxControlID="btnCancel">
         <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="pnlTimeSheet" LoadingPanelID="pnlListLoading" />
            <telerik:AjaxUpdatedControl ControlID="pnlForm" />
         </UpdatedControls>
      </telerik:AjaxSetting>
   </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<asp:Panel runat="server" ID="pnlForm">
   ...
   <asp:Button ID="btnSubmit" runat="server" Text="Boek" CssClass="Button_Pris" TabIndex="6" OnClick="btnSubmit_Click" />
   ...
   <asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="Button_Pris" TabIndex="7" OnClick="btnCancel_Click" />
   ...
</asp:Panel>
<asp:Panel runat="server" ID="pnlTimeSheet">
   <telerik:RadGrid ID="rdgTimeList"
             runat="server"
             AutoGenerateColumns="false"
             OnNeedDataSource="rdgTimeList_NeedDataSource"
             OnItemDataBound="rdgTimeList_ItemDataBound"
             OnItemCreated="rdgTimeList_ItemCreated"
             ShowFooter="true">
   <MasterTableView>
      <Columns>
         <telerik:GridTemplateColumn>
            <HeaderStyle Width="22px" />
            <ItemTemplate>
               <asp:ImageButton ID="btnEdit" runat="server" ImageUrl="~/DesktopModules/PRIS.Common/Images/icn_pencil.gif" OnCommand="btnEdit_Click" CommandName="id" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "pkid").ToString()%>' />
            </ItemTemplate>
         </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn>
            <HeaderStyle Width="22px" />
            <ItemTemplate>
               <asp:ImageButton ID="btnDelete" runat="server" ImageUrl="~/DesktopModules/PRIS.Common/Images/icn_delete.gif" OnCommand="btnDelete_Click" CommandName="id" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "pkid").ToString()%>' OnClientClick="if(!confirm('Weet u het zeker?')){return false;}" />
            </ItemTemplate>
         </telerik:GridTemplateColumn>
         ...
      </Columns>
   </MasterTableView>
</telerik:RadGrid>
...
</asp:Panel>

My CS file:
protected void rdgTimeList_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
   ...
 
   int liEmployeeId = (!String.IsNullOrEmpty(ddlEmployee.SelectedValue)) ? Convert.ToInt32(ddlEmployee.SelectedValue) : -1;
   rdgTimeList.DataSource = PRIS.SP.SpCacheUrenVanMedewerker(liEmployeeId, StartDate, EndDate, MaatschappijId).GetDataSet();
 
   ...
}
 
protected void btnSubmit_Click(object sender, EventArgs e)
{
   SaveForm();
   rdgTimeList.Rebind();
}
 
protected void btnCancel_Click(object sender, EventArgs e)
{
   ClearForm();
}
 
protected void SaveForm()
{
   ...
 
   PAtblUur loUur = null;
   string lsProject = ddlProject.SelectedValue;
   string lsDeliverable = ddlDeliverable.SelectedValue;
   string lsActivity = ddlActivity.SelectedValue;
   bool saved = false;
   if (objCalendar.SelectedDates.Count == 1)
   {
      loUur = TimeObject;
 
      loUur.CBMaatschappijID = MaatschappijId;
      loUur.FKActiviteitID = this.SaveActivity();
      loUur.FKPersoonRelatieID = (!String.IsNullOrEmpty(ddlEmployee.SelectedValue)) ? Convert.ToInt16(ddlEmployee.SelectedValue) : -1;
      loUur.DatumBezetting = objCalendar.SelectedDates[0].Date;
      loUur.UrenBesteed = (!String.IsNullOrEmpty(txtHours.Text)) ? Convert.ToDecimal(txtHours.Text) : 0;
 
      try
      {
         loUur.Save();
         saved = true;
      }
      catch
      {
         ErrorManager.Errors = loUur.Errors;
         ErrorManager.LoadErrors();
      }
   }
   else
   {
      ...
   }
 
   if (saved)
   {
      ClearForm(false);
   }
 
   ...
}
 
private void ClearForm() { ClearForm(true); }
private void ClearForm(bool pbClearDate)
{
   // Clear message label
   lblMessage.Text = "";
 
   // Get the current user's id
   int liEmployeeId = (!String.IsNullOrEmpty(ddlEmployee.SelectedValue)) ? Convert.ToInt32(ddlEmployee.SelectedValue) : -1;
 
   // Reload Employee combobox
   ddlEmployee_UpdateDataBind(liEmployeeId);
 
   // Reload Project combobox
   ddlProject_UpdateDataBind(liEmployeeId);
 
   // Clear Deliverable combobox
   ddlDeliverable.Text = "";
   ddlDeliverable.Items.Clear();
   ddlDeliverable.SelectedValue = "";
   ddlDeliverable.SelectedIndex = 0;
 
   // Clear Activity combobox
   ddlActivity.Text = "";
   ddlActivity.Items.Clear();
   ddlActivity.SelectedValue = "";
   ddlActivity.SelectedIndex = 0;
 
   // Clear Hours textbox
   txtHours.Text = "";
   hfTimeId.Value = "-1";
 
   // Clear the selected dates
   if (pbClearDate)
   {
      objCalendar.SelectedDates.Clear();
      objCalendar.SelectedDate = System.DateTime.Now;
   }
 
   // Rebind RadGrid
   rdgTimeList.Rebind();
 
   if (ErrorManager.Errors.Count == 0)
   {
      ErrorManager.HideErrors();
   }
}

Do note that the triple periods (...) in the code mean I omitted some code there for readability.

Any help would be appreciated,

- Dennis


EDIT: In case you're wondering: the dropdownlist UpdateDataBind functions simply set the DataTextField, DataValueField, assign a new DataSet to DataSource and trigger the DataBind function.
Dennis
Top achievements
Rank 1
 answered on 28 Jan 2011
1 answer
75 views
Hi..

I'm using Q2 2010 of telerik.
I'm trying to create custom Filter.....Using GridFilterMenu we extract all our filter fields.....at the same time we r using custom paging also....
using this extracted filter fields we bound the Radgrid.....in this grid we have a multiple GridBoundColumn.....I want to do filter for all the GridBoundColumn... can u help me.... i need sample coding also......



Iana Tsolova
Telerik team
 answered on 28 Jan 2011
3 answers
95 views
Hi,
My code opens a rad window when a gridbutton, located at a radgrid as a column, is clicked. In the OnClientClose event of the window it deletes the related row in the grid. I put an alert at the end of script which is wiritten to delete  row. I can see that the row is deleted at the grid but when the main window  got focused the row comes back. I think I must delete that row after main window has got focused, but there is no such event. I am sure that there is a simple way to do this. I will be pleasured if you help?
Thanks,

delete function

var table = $find("<%= rGrid.ClientID %>").get_masterTableView().get_element();
       var row = table.rows[rowInd];
       table.deleteRow(rowInd);
        
       var dataItem = $find(row.id);
       if (dataItem)
       {
           dataItem.dispose();
           Array.remove($find("<%= rGrid.ClientID %>").get_masterTableView()._dataItems, dataItem);           
       }
Iana Tsolova
Telerik team
 answered on 28 Jan 2011
1 answer
57 views
Hi,

   I've got a page with a bunch of menu items that when clicked open radwindow's with content.  In each RadWindow is usually a RadGrid and a few other controls.  I would like the pages in the RadWindow to use the opener page's RadAjaxLoadingPanel rather than use a RadAjaxLoadingPanel within the RadWindow.  Is there any way to achieve this?  I'm thinking I could hack something together to do this, but if there is some built in functionality that I am not aware of I'd rather use that.

Thank you.
Georgi Tunev
Telerik team
 answered on 28 Jan 2011
11 answers
335 views
Hi,

I am having a hard time finding Control to a TextField nested within a radgrid and pageview. I am trying to access this textField inside of my Page_load Function.The TextField I am trying to get reference to is the TextBox ID="LongitudeTextBox"nested inside ( Radmultipage- RadView1 - RadGrid1 - MasterTableViewEditForm ).

Previously I have gained control using the sender object from the form however in this case I do not have one since I am in the Page_Load function.
I have tried multiple solutions to find control such as setting the sender object from the form to a global variable , or trying to nest findcontrol methods with the path described above.

Any help would be greatly appreciated,

Thank you.
Marin
Telerik team
 answered on 28 Jan 2011
1 answer
120 views
hello to all experts

                         i would like to ask for help in loading images in a thumbnails views using the radgridview horizontally, my image path was save in the database but the actual file is in the image folder. how can do that? any sample codes is highly appreciated..thanks
Joel
Telerik team
 answered on 28 Jan 2011
8 answers
262 views
Hi,

I am trying to understand how you people build the "Products" menu on the Telerik website.

For a customer we must build a solution with the same hierarchy, so on click the sub- and the sub-sublevel is shown in one panel.

Can you explain how you did it?

Best Regards,

Marc
Peter
Telerik team
 answered on 28 Jan 2011
1 answer
93 views
Hi All Experts,

I want to add a gallery button in the editor. This editor button open the popup and shows the list of editor. If i click the editor it will shows the gerybox with my code. Can you have some kind of stuff. I want to create a gallery for this like wordpress plugin we added the gallery and added into our code like this.... Any comments will be appreciated.

Thanks
Anil
Rumen
Telerik team
 answered on 28 Jan 2011
3 answers
195 views
First off - we are using the latest and greatest ASP.NET AJAX RadEditor/RadPageView/RadTabStrip assemblies.  Our particular implementation is that of a single editor swapped in and out of placeholders triggered with "click-to-edit" or in-place editing type functionality (whatever you want to call it).  If the RadEditor exists on a RadPageView that is shown when the page loads (i.e. the 1st tab) then the toolbars are rendered perfectly fine.  However, if the RadEditor is not shown until one shows a second or third RadPageView (i.e. 2nd or 3rd tab) then the toolbars are incorrectly rendered: they don't wrap correctly or they are cut off by the text entry area. 

Now a workaround for this is to position a mock/unused RadEditor on the 1st RadPageView and wrap it with an absolutely positioned div that takes it off screen.  Note: if you wrap that mock RadEditor in a display:none div then the toolbar rendering problem (above) occurs.

Is there anyway around this?  Some RadEditor setting, css, or JavaScript that I have overlooked?  I would prefer not to have a mock/unused RadEditor on every page that I have an editor nested within a tab control.  Any help would be highly appreciated.....
Rumen
Telerik team
 answered on 28 Jan 2011
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?