Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
91 views
Hello,

I have a RadGrid with Paging enabled.  On this grid, I have a GridClientSelectColumn.  Currently, on Client Side, I am using Javascript to track which rows have been selected (so that if the user pages through the grid and returns to an earlier page, they will still see the checkboxes that they originally checked).

The issue that I am running into is, I need to also have a list of selected items for use on the server side.  However, I do not want to perform a post back on the radgrid each time a row is selected or unselected. 

Is there a way to do this without having to perform a post back, such as getting my object from javascript and throwing it into Server side somewhere? 

Thanks,
Dave
Tsvetoslav
Telerik team
 answered on 28 Jan 2010
5 answers
115 views
Can the approach shown in the "Scheduler / Using RadToolTip" demo example be used with a RadScheduler control that is getting it's data using a WebService?

I've tried setting up the following:

    <asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional"
    <ContentTemplate> 
     
        <telerik:RadScheduler runat="server" ID="RadScheduler1" SelectedView="WeekView" SelectedDate="2009-02-02" 
            TimeZoneOffset="03:00:00"  
            StartEditingInAdvancedForm="false"  
            EnableCustomAttributeEditing="false"  
            OnClientAppointmentsPopulating="initRadScheduler" 
            OnClientAppointmentsPopulated="appointmentsLoaded"  
            OnClientAppointmentDataBound="appointmentDataBound"  
            OnClientAppointmentMoveEnd="appointmentMoveEnd"  
            OnClientAppointmentMoving="appointmentMoving"
            <WebServiceSettings Path="SchedulerWebService.asmx" ResourcePopulationMode="ServerSide" /> 
        </telerik:RadScheduler> 
         
        <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Width="320" Height="210" 
            Animation="None"  
            HideEvent="LeaveToolTip"  
            Text="Loading..."  
            RelativeTo="Element" 
            OnAjaxUpdate="RadToolTipManager1_AjaxUpdate"  
            OnClientBeforeShow="clientBeforeShow"/>        
 
    </ContentTemplate> 
    </asp:UpdatePanel> 
 

But I never seem to get a call to RadToolTipManager1_AjaxUpdate.

Thanks,
Greg


Greg Mercer
Top achievements
Rank 1
 answered on 28 Jan 2010
4 answers
129 views
Hi, i have a radmenu inside a column in a radgrid, and everything was working fine, but when i upgraded to firefox 3, the radmenus start to display a problem, the option list of the menu doesn't appear hover the remaing columns and rows of the grid, as it used to.

Here is a sample code:

<rad:RadGrid ID="RadGrid1" SkinID="DetalheCandidato" runat="server" AutoGenerateColumns="false" AllowPaging="false" EnableAJAX="true" ShowHeader="true" EnableAJAXLoadingTemplate="true"AllowSorting="true" Skin="None" MasterTableView-ShowHeadersWhenNoRecords="false" LoadingTemplateTransparency="50" onitemcreated="rad_Candidatos_ItemCreated" onitemcommand="rad_Candidatos_ItemCommand" onselectedindexchanged="rad_Candidatos_SelectedIndexChanged" onsortcommand="rad_Candidatos_SortCommand">

<AJAXLoadingTemplate>
<asp:Image ID="imgLoa" runat="server" ImageUrl="~/BackOffice/Images/timer.gif" />
</AJAXLoadingTemplate>

<MasterTableView DataKeyNames="TbcaID,UsrGUI,TbcaGUI">

<Columns>

<rad:GridTemplateColumn HeaderText="opes" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="80px" ItemStyle-Width="90px">

<ItemStyle HorizontalAlign="Center" />

<ItemTemplate>

<rad:RadMenu ID="RadMenuCmd" runat="server" Flow="Vertical" Skin="Default2006" SkinsPath="~/RadControls/Menu" EnableTheming="true">

<Items>
<rad:RadMenuItem Text="choices">

<Items>

<rad:RadMenuItem>

<ItemTemplate>

<asp:LinkButton ID="LNB_Select" runat="server" Text="Ver perfil" CommandName="Select"></asp:LinkButton>

<br />

<asp:LinkButton ID="LNK_ConsDocs" runat="server" CommandName="Navigate">Consultar Documentos</asp:LinkButton>

<br />

Pedir Anlise do Perfil Pessoal (APP)

<br />

<asp:LinkButton ID="LNB_PontCandidato" runat="server" CommandName="Edit">Pontuar Candidato</asp:LinkButton>

<br />

<asp:LinkButton ID="LNB_CatCandidato" runat="server" CommandName="Navigate">Categorizar Candidato</asp:LinkButton>

<br />

Copiar Candidato para Pasta

<br />

Inserir comentrio sobre Candidatura

<br />

<asp:LinkButton ID="LNB_SolCont" runat="server" CommandName="Navigate">Solicitar Contacto Candidato</asp:LinkButton>

<br />

<asp:LinkButton ID="LNB_InsCom" runat="server" CommandName="Navigate">Inserir comentrio sobre Candidato</asp:LinkButton>

<br />

<asp:LinkButton ID="LNB_SMSCand" runat="server" CommandName="Navigate">Enviar SMS Candidato</asp:LinkButton>

<br />

<asp:LinkButton ID="LNB_MsgCand" runat="server" CommandName="Navigate">Enviar Mensagem Candidato</asp:LinkButton>

<br />

<asp:LinkButton ID="LNB_OutrosProc" runat="server" CommandName="Navigate">Ver outros processos do Candidato</asp:LinkButton>

<br />

Procurar Candidato no Google

<br />

<asp:LinkButton ID="LNB_Entrevista" runat="server" CommandName="Navigate">Marcar Entrevista</asp:LinkButton>

<br />

<asp:LinkButton runat="server" EnableViewState="false" OnClientClick="return confirm('Tem a certeza que deseja apagar o registo?')" CommandName="Delete" Text="Apagar" ToolTip="Apagar" ID="btnDelete"/>

</ItemTemplate>

</rad:RadMenuItem>

</Items>

</rad:RadMenuItem>

</Items>

</rad:RadMenu>

</ItemTemplate>

</rad:GridTemplateColumn>

<rad:GridBoundColumn DataField="TbcaDataIn" HeaderText="Data" SortExpression="TbcaDataIn"

DataFormatString="{0:d}" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="63px" />

</Columns>

</MasterTableView>

</rad:RadGrid>

</Columns>

Thks.

obinna osuji
Top achievements
Rank 1
 answered on 28 Jan 2010
2 answers
173 views
Hi,

we've a grid with 3 levels. The second and third levels are set to edit mode in the prerender event of the grid.
The problem is, that it is possible to expand these levels. but collapsing doesn't work anymore?!

Here is the sample code:

protected void RadGridContractProducts_PreRender(object sender, EventArgs e) 
        for (int i = RadGridContractProducts.MasterTableView.GetItems(GridItemType.NestedView).Length - 1; i >= 0; i--) 
            { 
                for (int j = ((GridNestedViewItem)RadGridContractProducts.MasterTableView.GetItems(GridItemType.NestedView)[i]).NestedTableViews.Length - 1; j >= 0; j--) 
                { 
                    
                    SetItemsMode(((GridNestedViewItem)RadGridContractProducts.MasterTableView.GetItems(GridItemType.NestedView)[i]).NestedTableViews[j]); 
                } 
            } 
 
 
            RadGridContractProducts.Rebind(); 
        } 
 
private void SetItemsMode(GridTableView oGridTableView) 
        { 
            for (int i = oGridTableView.Items.Count-1; i >= 0; i--) 
            { 
                 
                oGridTableView.Items[i].Edit = true
 
            } 
 
            
            for ( int i = oGridTableView.GetItems(GridItemType.NestedView).Length -1; i >=0 ; i-- ) 
            { 
                for ( int j = ( ( GridNestedViewItem )oGridTableView.GetItems(GridItemType.NestedView)[i]).NestedTableViews.Length -1 ; j >=0; j--) 
                { 
                    SetItemsMode(((GridNestedViewItem)oGridTableView.GetItems(GridItemType.NestedView)[i]).NestedTableViews[j]); 
                } 
 
            } 
        } 

Could someone explain how to get this problem solved?

Thanks in advance

Stefan
Thuan
Top achievements
Rank 1
 answered on 28 Jan 2010
3 answers
294 views
Hi,

I am using RADScheduler, and I want to fix the height of the scheduler for MonthView. I want a fix Height, no matters how many appointments/contents (if there's no content to fill it) are.

Is it possible?

Thanks & Regards,
Peter
Telerik team
 answered on 28 Jan 2010
1 answer
138 views
Hello,

I am running VQ3 2009 with hotfixes.  I'm having trouble with databinding the scheduler. 

  1. I am binding the data in the server side code by querying my appointments table. 
  2. I traverse the datatable of appointments and build a generic list of <Appointment> objects. 
  3. I then set the datasource of thescheduler to the generic list.

I first put this code in the PageLoad() event, but though the data showed in the scheduler just fine, it seemed to cause issues with the navigation pane's calendar popup.

I then moved the code to the PageInit() event.  I get unpredictable behavior now where sometimes when i open the page, the scheduler does not contain data, but when I refresh it finally shows the appointments. 

Questions:
1. Where should I put my server side data binding statement?
2. Should it be wrapped in an "If(!IsPostBack)" call?

Thanks,

Ryan
Peter
Telerik team
 answered on 28 Jan 2010
6 answers
303 views
I have a new crash that happens in the Scheduler javascript code that I'm not sure how to begin debugging.  Are there suggestions that you guys use that you could share with me?

This is the type of error that shows in the IE 8 error window: 
Webpage error details 
 
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2) 
Timestamp: Mon, 30 Nov 2009 22:56:17 UTC 
 
 
Message: '0.tBodies.0.rows[...].cells' is null or not an object 
Line: 6438 
Char: 2 
Code: 0 
URI: http://localhost/Pinnacle/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_MainContent_MainContent_radScriptManager_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ad0c4ca6e-6b5d-49b6-922d-5244924fb100%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.2.701.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a7e598a31-3beb-49a1-914c-5f530240f0ea%3a16e4e7cd%3aed16cbdc%3a874f8ea2%3af7645509%3a24ee1bba%3a19620875%3a39040b5c%3af85f9819%3a650fdad%3a41a6cee9%3ad40f7d5c%3a431f16a4%3a1a9ac27f%3a7d98db04%3afe65db44%3a63767fed%3a44e9d927%3a26c790aa%3a3cdff5d5%3ae91ff703%3a7666c7ed%3aef9d9f4a%3aa960fda2%3ab7778d6c%3a8674cba1%3ac08e9f8a%3aef347303%3aa51ee93e%3a1e771326%3aaa288e2d%3ae085fe68%3a59462f1 
 

SolutionStream
Top achievements
Rank 1
 answered on 28 Jan 2010
1 answer
206 views
Hello,

My apologies if this is a simple question... I just couldn't seem to track it down. Is there a specific CSS value to allow for when the mouse is hovered over a column header? I want to change the column header background image when it is hovered over the specific column (something I've seen a lot of other grids do), but can't seem to find where to do that with the Telerik grid.

Thanks in advance!
-Brian
Brian Azzi
Top achievements
Rank 1
 answered on 28 Jan 2010
2 answers
144 views
I am implementing the RadScheduler to manage scheduling data from a Dynamics CRM system.  One of the requirements is that the user not be able to enter an appointment for a date prior to 12 am for the current day.  I have found the FormCreating server side event and can cancel the insert, however, I've not been able to figure out how to tell the user why the appointment isn't created.  I'm a Winforms developer that has been asked to deal with this issue and I'll admit my javascript/aspx skills are rusty.  I've seen plenty of examples where javascript is registered from code behind, but these are all associated with an OnClick event.  I don't have a client side OnClientFormCreating that I can use to validate this on the client side.

Is there a native way to handle this through a property on the scheduler or how would I best achieve this?  I'd love to be able to integrate RadWindow manager and use the alert dialog.

Thanks.
Chuck
Peter
Telerik team
 answered on 28 Jan 2010
3 answers
160 views
Hi,
I have a radupload tool in my RadGrid.
I allow user to upload file when user edits or inserts a row. But when inserting a row, I want user to be able to upload more than one files. On the other hand, when editing a row, I want user to insert just one file.
-This means I should be changing upload tool's property in edit and insert mode of grid-

Here is my grid:
<MasterTableView Width="100%" CommandItemDisplay="Top"
        <Columns> 
            <telerik:GridEditCommandColumn></telerik:GridEditCommandColumn> 
            <telerik:GridTemplateColumn UniqueName="File" HeaderText="Image File"
                 <ItemTemplate> 
                    <asp:Image ID="img" runat="server" Height="50px"/> 
                </ItemTemplate> 
                <EditItemTemplate> 
                        <telerik:RadUpload ID="upload" runat="server" AllowedFileExtensions="gif,jpg,png" AllowedMimeTypes="image/gif,image/jpeg,image/png"></telerik:RadUpload> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridBoundColumn 
                DataField="Title" 
                HeaderText="Title" 
                UniqueName="Title"
            </telerik:GridBoundColumn> 
      </Columns>         
</MasterTableView> 

How can I do that? I added this code below to ItemDataBound method. But it makes MaxFileInputCount=1000 in both edit and insert mode.
MaxFileInputCount should be 1 in edit mode and it should be 1000 in insert mode.

This is the code I wrote to ItemDataBound
if (e.Item is GridEditableItem && e.Item.IsInEditMode && grid.MasterTableView.IsItemInserted) 
            { 
                GridEditableItem temp = e.Item as GridEditableItem; 
                ((RadUpload)temp["File"].FindControl("upload")).MaxFileInputsCount = 1000; 
                ((RadUpload)temp["File"].FindControl("upload")).InitialFileInputsCount = 1; 
 
            } 



hll
Top achievements
Rank 1
 answered on 28 Jan 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?