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

I have a requirement in which i am using filter with rad gird to query on multiple Share-Point lists. My question is to how to get the CAML query generated from the Filter expression if it is at all possible. Any broad line idea will be appreciated.
I know how to get the filter expression. so please don't direct me to that link.


Regards,
Govind.
Tsvetoslav
Telerik team
 answered on 19 Oct 2010
5 answers
340 views
I have a scenario where depending on the the values in a field of itemdata, I need to generate a different control. Obviously in ItemCreated the dataitem is not bound yet, but strangely if I add controls in ItemDataBound, they disappear by the time the control is rendered. For example:
If TypeOf (e.Item) Is RadListViewDataItem Then
    Dim FormItem As MyFormItem = CType(CType(e.Item, RadListViewDataItem).DataItem, MyFormItem)
    Select Case FormItem.TypeId
        Case "Header"
            Dim lbl As New Label
            lbl.Text = String.Format("<b>{0}</b>", FormItem.Text)
            e.Item.Controls.Add(lbl)
there the ItemTemplate is initially empty.

Is this possible?

Thanks,
Reuven
Reuven
Top achievements
Rank 1
 answered on 19 Oct 2010
2 answers
170 views
WEB.CONFIG
<httpRuntime maxRequestLength="2024000" executionTimeout="10000"/>
  
ASPX
<telerik:RadUpload runat="server" ID="RadUpload1" Skin="WebBlue" ControlObjectsVisibility="None" MaxFileInputsCount="1" ReadOnlyFileInputs="true"></telerik:RadUpload>                         

When I try uploading locally I could upload 50MB file. But when I tried from server upload stops in middle with an error

404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

can anyone reply me on how to handle upload for large files.

Thanks,
Swetha

SWETHA MANDAVA
Top achievements
Rank 1
 answered on 19 Oct 2010
4 answers
383 views
I want to be able to set client side focus to the first field in a tab once the tab is clicked. I've tried the OnSelectedTab & OnSelectingTab client side events to run a js function, but when I click on one of the tabs, it doesn't get highlighted; nor does it go into my js function. If I take away the js event on the tabstrip, it works fine, but I can't set the focus to the first field. the last two tabs are optional and are disabled by default. They get enabled elsewhere in the code.

Here is my html:
<telerik:RadTabStrip ID="tsPatientDemographics" runat="server" AutoPostBack="false" OnSelectedTab="SetFocus"
                                            ScrollButtonsPosition="Right" MultiPageID="RadMultiPage1"
                                            BackColor="Gray" CausesValidation="False" Align="Left">


Here is my js:

            function SetFocus() {

                var tabStrip = $find("<%= tsPatientDemographics.ClientID %>");
                var selectedTab = tabStrip.get_selectedTab();
                var HospAcctno = document.getElementById("HospAcctno");
                var GuarRelToPat = document.getElementById("GuarRelToPat");
                var priInsCode = document.getElementById("priInsCode");
                var secInsCode = document.getElementById("secInsCode");
                var terInsCode = document.getElementById("terInsCode");

                if (selectedTab != null) {
                    var selectedTabValue = selectedTab.get_text();

                    if (selectedTabValue == "Patient") {
                        var HospAcctno = document.getElementById("HospAcctno");
                        HospAcctno.focus();
                    }
                    else if (selectedTabValue == "Guarantor") {
                        var GuarRelToPat = document.getElementById("GuarRelToPat");
                        GuarRelToPat.focus();
                    }
                    else if (selectedTabValue == "Pri Ins") {
                        var priInsCode = document.getElementById("priInsCode");
                        priInsCode.focus();
                    }
                    else if (selectedTabValue == "Sec Ins") {
                        var tabStrip = $find("<%= tsPatientDemographics.ClientID %>");
                        var tab = tabStrip.findTabByText("Sec Ins");
                        if (tab.get_isEnabled == true) {
                            var secInsCode = document.getElementById("secInsCode");
                            secInsCode.focus();
                        }
                    }
                    else if (selectedTabValue == "Ter Ins") {
                        var tabStrip = $find("<%= tsPatientDemographics.ClientID %>");
                        var tab = tabStrip.findTabByText("Ter Ins");
                        if (tab.get_isEnabled == true) {
                            var terInsCode = document.getElementById("terInsCode");
                            terInsCode.focus();
                        }
                    }
                }
            }

Bill
Top achievements
Rank 2
 answered on 19 Oct 2010
0 answers
97 views
Hello
I have a radgrid, there I have a nestedview with two-TAB controls and within
each tab a repeater control with a checkbox that tells me whether or not
selected an option from my database.
Since the option ItemCommand make it along the repeater and enable or disable the
options with the checkbox, my problem is how do I get each time
checkbox event access Oncheckedchangued return me the id code
grid and the repeater control to scroll it and store control
changes in my database.

I have an option that is to place a button and using the property commandname
ItemCommand capturing the event and do my validations and
routes, not if you have a more direct option to control
checkbox inside the repeater and nestedview.

Thanks

Alex Alfonso

Code ----------
<telerik:RadGrid ID="RadGridSedes" runat="server" AllowPaging="True" AllowSorting="True"
                    AutoGenerateColumns="False" GridLines="None" DataSourceID="OpenAccessDataSedes">
                    <ExportSettings ExportOnlyData="True">
                    </ExportSettings>
                    <MasterTableView DataKeyNames="CodigoSede" DataSourceID="OpenAccessDataSedes" CommandItemDisplay="TopAndBottom">
                        <CommandItemSettings AddNewRecordText="Adicionar Nuevo Registro" RefreshText="Actualizar" />
                        <RowIndicatorColumn Visible="True">
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn Visible="True">
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridBoundColumn DataField="CodigoSede" DataType="System.Int32" HeaderText="Codigo Sede"
                                ReadOnly="True" SortExpression="CodigoSede" UniqueName="CodigoSede" Visible="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn">
                                <HeaderStyle Width="30px" />
                            </telerik:GridClientSelectColumn>
                            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="Editcommandcolumn">
                                <HeaderStyle Width="30px" />
                            </telerik:GridEditCommandColumn>
                            <telerik:GridBoundColumn DataField="Nombre" HeaderText="Nombre" SortExpression="Nombre"
                                UniqueName="Nombre">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Direccion" HeaderText="Direccion" SortExpression="Direccion"
                                UniqueName="Direccion">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Email" HeaderText="Email" SortExpression="Email"
                                UniqueName="Email">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Telefono1" HeaderText="Telefono1" SortExpression="Telefono1"
                                UniqueName="Telefono1">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Fax1" HeaderText="Fax1" SortExpression="Fax1"
                                UniqueName="Fax1">
                            </telerik:GridBoundColumn>
                        </Columns>
                        <EditFormSettings EditFormType="WebUserControl" UserControlName="AddEditSedes.ascx">
                        </EditFormSettings>
                        <NestedViewTemplate>
                            <div class="Centrado">
                                <telerik:RadTabStrip ID="RadTabStrip2" runat="server" SelectedIndex="0" MultiPageID="RadMultiPageSed">
                                    <Tabs>
                                        <telerik:RadTab runat="server" Text="Jornadas" ImageUrl="~/images/Jornadas.png">
                                        </telerik:RadTab>
                                        <telerik:RadTab runat="server" Text="Semestres" ImageUrl="~/images/Semestres.png">
                                        </telerik:RadTab>
                                    </Tabs>
                                </telerik:RadTabStrip>
                                <telerik:RadMultiPage ID="RadMultiPageSed" runat="server" Width="100%" SelectedIndex="0">
                                    <telerik:RadPageView ID="RadPageViewJornadas" runat="server">
                                        <telerik:OpenAccessDataSource ID="OpenAccessJornadas" runat="server" EnableDelete="False"
                                            EnableInsert="False" EnableUpdate="False" ObjectContextProvider="ServisistemasAra.FoxisWeb.TelerikOrm.AcademicoEntityDiagrams, ServisistemasAra.FoxisWeb.TelerikOrm"
                                            TypeName="ServisistemasAra.FoxisWeb.TelerikOrm.Jornadas" OrderBy="Descripcion"
                                            Where="">
                                        </telerik:OpenAccessDataSource>
                                        <asp:Repeater ID="JornadasList" runat="server" DataSourceID="OpenAccessJornadas">
                                            <ItemTemplate>
                                                <asp:CheckBox runat="server" ID="RoleCheckBoxJornadas" AutoPostBack="true" Text='<%# eval("descripcion") %>' OnCheckedChanged="JornadasCheckBox_CheckChanged" />
                                                <br />
                                            </ItemTemplate>
                                        </asp:Repeater>
                                    </telerik:RadPageView>
                                    <telerik:RadPageView ID="RadpageviewSem" runat="server">
                                        <div class="Centrado">
                                            <ul class="uledicion">
                                                <li>
                                                    <asp:Label runat="server" ID="LblSedeJornadaSemestre" CssClass="labelsedicion width130"
                                                        Text="Seleccione la jornada"></asp:Label>
                                                    <telerik:RadComboBox ID="ComboSedeJornadas" runat="server" Width="220px" DataTextField="Descripcion"
                                                        DataValueField="Codigo" AppendDataBoundItems="true" >
                                                        <Items>
                                                            <telerik:RadComboBoxItem runat="server" Text='<%$ Resources:General, SeleccioneOpcion %>'
                                                                Value="0" Selected="true" />
                                                        </Items>
                                                    </telerik:RadComboBox>
                                                    <asp:Button ID="ButConsulta" runat="server" Text="Consultar" CommandName="ConsultaSemestres" />
                                                </li>
                                            </ul>
                                            <asp:Repeater ID="RepeaterSedesJornadasSemestres" runat="server" DataSourceID="OpenAccessDataSemestres"
                                                Visible="false">
                                                <ItemTemplate>
                                                    <asp:CheckBox runat="server" ID="RoleCheckBoxSemestres" AutoPostBack="true" Text='<%# eval("descripcion") %>' OnCheckedChanged="SemestresCheckBox_CheckChanged"  />
                                                    <br />
                                                </ItemTemplate>
                                            </asp:Repeater>
                                        </div>
                                    </telerik:RadPageView>
                                </telerik:RadMultiPage>
                            </div>
                        </NestedViewTemplate>
                        <PagerStyle FirstPageToolTip="Primera Página" LastPageToolTip="Ultima Página" NextPagesToolTip="Siguientes Páginas"
                            NextPageToolTip="Siguiente Página" PagerTextFormat="Cambiar Página: {4} &nbsp;Página <strong>{0}</strong> de <strong>{1}</strong>, items <strong>{2}</strong> de <strong>{3}</strong> de <strong>{5}</strong>."
                            PrevPagesToolTip="Páginas anteriores" PrevPageToolTip="Página anterior" />
                    </MasterTableView>
                    <ClientSettings EnableRowHoverStyle="true">
                        <Selecting AllowRowSelect="True" />
                        <Resizing AllowRowResize="True" AllowColumnResize="True"></Resizing>
                    </ClientSettings>
                </telerik:RadGrid>

Code Behind to Itemcommand

Protected Sub RadGridSedes_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGridSedes.ItemCommand
 
        If e.CommandName = RadGrid.ExpandCollapseCommandName Then
            If e.Item.Expanded = False Then
                'Es expandcollapseName
                Dim SedeId As String = e.Item.OwnerTableView.Items(e.Item.ItemIndex)("CodigoSede").Text
                Dim JornadasXSede As List(Of VJornadasBySedes)
                JornadasXSede = (From Sj In CachedScope.VJornadasBySedes() Where Sj.Sede = SedeId Select Sj).ToList
                If Not JornadasXSede Is Nothing Then
                    Dim Repeatlista As Repeater = DirectCast(e.Item, GridDataItem).ChildItem.FindControl("JornadasList")
                    For Each ri As RepeaterItem In Repeatlista.Items
                        ' Programmatically reference the CheckBox
                        Dim RoleCheckBox As CheckBox = TryCast(ri.FindControl("RoleCheckBoxJornadas"), CheckBox)
                        ' See if RoleCheckBox.Text is in selectedUsersRoles
                        Dim TmpRole = RoleCheckBox.Text
                        For Each SedesyJornadas As VJornadasBySedes In JornadasXSede
                            If SedesyJornadas.Descripcion = TmpRole Then
                                RoleCheckBox.Checked = True
                            End If
                        Next
                    Next
                End If
                'Adicionamos las jornadas en el combo
                Dim MisJornadasxsede = (From VJS In CachedScope.VJornadasBySedes() Where VJS.Sede = SedeId Select VJS).ToList()
                Dim CboSedesJornadas As RadComboBox = DirectCast(e.Item, GridDataItem).ChildItem.FindControl("ComboSedeJornadas")
                CboSedesJornadas.DataSource = MisJornadasxsede
                CboSedesJornadas.DataBind()
 
            End If
        End If
        If e.CommandName = "ConsultaSemestres" Then
            Dim nestedview As GridNestedViewItem = DirectCast(e.Item, GridNestedViewItem)
            Dim RadcboSede As RadComboBox = DirectCast(nestedview.FindControl("ComboSedeJornadas"), RadComboBox)
            Dim JornadaID As Integer = RadcboSede.SelectedValue
            Dim LSedesJornadasSemestres As List(Of VSemestresByJornadas)
            LSedesJornadasSemestres = (From Sj In CachedScope.VSemestresByJornadas() Where Sj.Jornada = JornadaID Select Sj).ToList
            If Not LSedesJornadasSemestres Is Nothing Then
                Dim RepeatSemestres As Repeater = DirectCast(nestedview.FindControl("RepeaterSedesJornadasSemestres"), Repeater)
                RepeatSemestres.Visible = True
                For Each ri As RepeaterItem In RepeatSemestres.Items
                    ' Programmatically reference the CheckBox
                    Dim SemestreCheckBox As CheckBox = TryCast(ri.FindControl("RoleCheckBoxSemestres"), CheckBox)
                    SemestreCheckBox.Checked = False
                    ' See if RoleCheckBox.Text is in selectedUsersRoles
                    Dim TmpSemestre = SemestreCheckBox.Text
                    For Each SemestresxJornadas As VSemestresByJornadas In LSedesJornadasSemestres
                        If SemestresxJornadas.Descripcion = TmpSemestre Then
                            SemestreCheckBox.Checked = True
                        End If
                    Next
                Next
            End If
        End If
    End Sub


Alex
Top achievements
Rank 1
 asked on 19 Oct 2010
4 answers
131 views
I have read that i need to exclude the export to excel and pdf buttons of the RadGrid from the AJAXified requests. I found the following article outlining this:

http://www.telerik.com/help/aspnet-ajax/ajxexclude.html

However i have two questions as this does not help me much:

1) When i add the OnRequestStart property to my ClientSettings  like this:
<ClientSettings AllowDragToGroup="True">
    <Scrolling AllowScroll="True" ScrollHeight="600px" UseStaticHeaders="True" />
    <ClientEvents OnRequestStart="gridRequestStart" />
</ClientSettings>

I get the following error: Type 'Telerik.Web.UI.GridClientEvents' does not have a public property named 'OnRequestStart'.

2) These buttons are generated by the Radgrid and i am unable to access them like the example shows...

Could someone help me to get this functionality working again? Thanks,
Duncan Evans
Top achievements
Rank 1
 answered on 19 Oct 2010
2 answers
215 views
Hi,

I'm having an issue using telerik control on one of the page i'm working on now, it is using ajaxpro.2
and on the page_load event of the page 
Utility.RegisterTypeForAjax(typeof(_Default));
is called.
well my problem is that when i add a radcombobox to the page it will not work throwing a javascript error
like "h constructor something" and the other one is n(l) something", i've made certain test on the page
the first one is i added a radscriptmanager and remove the radcombobox and it is working fine, but when i add
the radcombobox a javascript error is thrown, and lastly is i remove the code on the page_load event of the page
and add the radscriptmanager and radcombobox and it works fine, so i'm assuming that the problem is ajaxpro.2 is not compatible
with telerik controls? anyone has experienced this problem before? TIA

-eds
Genady Sergeev
Telerik team
 answered on 19 Oct 2010
1 answer
71 views

Is it possible to resizing the most right column on the RadGrid. I'm not able to do this in my application and as I can see in this demo it's not possible also. http://demos.telerik.com/aspnet-ajax/grid/examples/client/resizing/defaultcs.aspx

Pavlina
Telerik team
 answered on 19 Oct 2010
1 answer
103 views
I need the insert image control to have an upload option or have image manager slimmed way down. I don't want the file view functionality in the image manager. That's the best way to explain it. I want the user to upload an image and it insert into the editor. That's all, no extras.
Rumen
Telerik team
 answered on 19 Oct 2010
1 answer
60 views
Hello,

We use the RadEditor to allow our customers to create emails that will be sent to email clients.  We've noticed in IE8 and Chrome that you are unable to set the specific font for an area of text if that font happens to be the same as the default body font for the HTML page the editor is on.  


times new roman<br />
<span style="font-family: verdana;">verdana</span><br />
<span style="font-family: georgia;">georgia</span><br />
times new roman<br />
<span style="font-family: arial;">arial</span>

Rumen
Telerik team
 answered on 19 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?