Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
262 views

Hello,
I need to customize the resources window (when adding/removing assigned persons).
The idea is, that a specific person has permission to populate some tasks with some persons.
For example, the leader of a team can add only people of his team, to tasks where the parent task is assigned to his team.
I can do that permissions logic, I just need to know how to disable/hide some resources when resources window is opened.

Thank you.

Igor
Top achievements
Rank 1
 answered on 03 Feb 2020
1 answer
543 views

Hi Team,
We are experiencing problem with applying partial cell styling  after exporting .xlsx. (making part of a string bold)

Example if Table.Cells[1,1] = "Filter By Physicians : Andrew Small (1000316817),Andrew Wise (1000330560),Anthony Alston (1000411264),Anthony Holden (1000182861),Anthony Kane (1000521565),Brandon Logan"

we want to make "Filter By Physicians" bold as shown in above string.

 

we are using below method for formatting cells.

protected void RadGridQMList_InfrastructureExporting(object sender, GridInfrastructureExportingEventArgs e)
{

table.Cells[c, r].Value = "test";

}

Method to export xlsx

RadGridQMList.ExportSettings.Excel.Format = GridExcelExportFormat.Xlsx;

Kindly let us know how to solve this issue. We will wait for your reply.

Thanks and Regards,
Jaswant 

 

Attila Antal
Telerik team
 answered on 03 Feb 2020
7 answers
319 views

tried rddt1.SelectedText = "bla" and it didn't work

Any suggestions?

Thank you

Vessy
Telerik team
 answered on 03 Feb 2020
2 answers
128 views
Hi,
   In code behind i gave custom skin for grid with following properties Skin ="MaterialGrid" EnableEmbeddedSkins="false" RenderMode="Lightweight", but how to give if grid is created on server side ? 
I am created grid in server side like 
 Dim grid As New RadGrid
        grid.ID = "ListReportGrid"
        ' grid.RenderMode = RenderMode.Lightweight
        grid.AutoGenerateColumns = False
        grid.EnableViewState = False

        'grid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top
        'grid.MasterTableView.CommandItemSettings.ShowPrintButton = True
        'grid.MasterTableView.CommandItemSettings.ShowExportToPdfButton = True
        'grid.MasterTableView.CommandItemSettings.ShowExportToCsvButton = True
        'grid.MasterTableView.CommandItemSettings.ShowExportToExcelButton = True
        'grid.MasterTableView.CommandItemSettings.ShowExportToWordButton = True
        'grid.MasterTableView.CommandItemSettings.ShowRefreshButton = False
        'grid.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = False
        'grid.EnableEmbeddedSkins = False
        'grid.RenderMode = RenderMode.Lightweight
        'grid.Skin =


        grid.AllowSorting = True
        grid.ClientSettings.Scrolling.AllowScroll = True
        grid.ClientSettings.Scrolling.UseStaticHeaders = True
        grid.ClientSettings.Scrolling.SaveScrollPosition = True


        'paging and virtualizaton

        grid.ClientSettings.Virtualization.EnableVirtualization = True
        grid.ClientSettings.Virtualization.InitiallyCachedItemsCount = 2000
        grid.ClientSettings.Virtualization.ItemsPerView = 100
        grid.PagerStyle.Mode = GridPagerMode.NextPrevNumericAndAdvanced

        grid.AllowPaging = True
        grid.PageSize = 1000

        grid.MasterTableView.TableLayout = GridTableLayout.Fixed
        grid.MasterTableView.PagerStyle.Visible = False

So in this how to skin as MaterialGrid ?

Thanks
M Kumar
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 03 Feb 2020
1 answer
129 views

Hi,

 

I have a grid where I defined 2 columns with custom commands. When I click those columns, the code runs at "....ItemCommand", BUT an automatic databind is somehow called (the database is called) and the grid is refreshed with data from the database.

My questions: is this the normal behavior? if yes, how can I prevent this?

 

<telerik:RadGrid ID="gvProgramareExamene" runat="server" DataSourceID="SqlDataSource1" OnItemDataBound="gvProgramareExamene_ItemDataBound" OnItemCommand="gvProgramareExamene_ItemCommand" AutoGenerateColumns="False" RenderMode="Lightweight">
                <groupingsettings collapsealltooltip="Collapse all groups"></groupingsettings>
                <exportsettings>
                    <pdf pagewidth="">
                    </pdf>
                </exportsettings>
                <mastertableview datakeynames="ID_AnUniv, ID_SesiuneExamene, ID_SesiuneExameneSpecializare,ID_DetaliuPlanSemestru,ID_DetaliuPlanSemestruStudent,ID_Specializare,ID_AnStud,ID_ProfesorTitularCurs,ID_ProgramareExamen,ID_Grupe,NoteFinalizate,NoteSalvate" clientdatakeynames="ID_AnUniv, ID_SesiuneExamene, ID_SesiuneExameneSpecializare,ID_DetaliuPlanSemestru,ID_Specializare,ID_AnStud,ID_ProfesorTitularCurs,ID_ProgramareExamen,ID_Grupe,ID_Materie,NoteFinalizate,NoteSalvate" datasourceid="SqlDataSource1" enablelinqgrouping="False" showfooter="True">
                    <rowindicatorcolumn visible="False">
                    </rowindicatorcolumn>
                    <expandcollapsecolumn created="True">
                    </expandcollapsecolumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="Denumire" FilterControlAltText="Filter Denumire column" HeaderText="Denumire" ReadOnly="True" SortExpression="Denumire" UniqueName="Denumire">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="NumarSemestruDinAn" DataType="System.Int32" FilterControlAltText="Filter NumarSemestruDinAn column" HeaderText="Semestrul" SortExpression="NumarSemestruDinAn" UniqueName="NumarSemestruDinAn">
                        </telerik:GridBoundColumn>

                        <telerik:GridTemplateColumn DataField="Data" DataType="System.DateTime" FilterControlAltText="Filter DataInceputPeSpec column" HeaderText="Data" SortExpression="Data" UniqueName="Data">
                            <ItemTemplate>
                                <asp:Label ID="lblNumeIntreg" runat="server" Text='<%# Bind("NumeIntreg") %>'></asp:Label>
                                
                                <telerik:RadCheckBox ID="chkInlocuire" runat="server" Text="Inlocuire" CommandName="Inlocuire" OnCheckedChanged="chkInlocuire_CheckedChanged">
                                </telerik:RadCheckBox>

                                <telerik:RadComboBox RenderMode="Lightweight" runat="server" visible="false" ID="RadComboBox1" EnableLoadOnDemand="True" DataTextField="NumeIntreg2"
                                    OnItemsRequested="RadComboBox1_ItemsRequested" DataValueField="ID_Profesor"
                                    HighlightTemplatedItems="true" Height="140px" Width="220px" DropDownWidth="420px"
                                    OnSelectedIndexChanged="OnSelectedIndexChangedHandler">
                                    <ItemTemplate>
                                                <%# DataBinder.Eval(Container, "Attributes['NumeIntreg']")%> -- / --
                                                <%# DataBinder.Eval(Container, "Attributes['DenumireCatedra']")%>
                                    </ItemTemplate>
                                </telerik:RadComboBox>

                            </ItemTemplate>
                        </telerik:GridTemplateColumn>

                        <telerik:GridBoundColumn DataField="ID_ProfesorTitularCurs" DataType="System.Int64" FilterControlAltText="Filter ID_ProfesorTitularCurs column" HeaderText="ID_ProfesorTitularCurs" SortExpression="ID_ProfesorTitularCurs" UniqueName="ID_ProfesorTitularCurs" visible="false">
                        </telerik:GridBoundColumn>

                        <telerik:GridTemplateColumn DataField="Data" DataType="System.DateTime" FilterControlAltText="Filter DataInceputPeSpec column" HeaderText="Data" SortExpression="Data" UniqueName="Data">
                            <ItemTemplate>
                                <telerik:RadDatetimePicker RenderMode="Lightweight" ID="rdpData" CssClass="toDate" runat="server" MinDate="2020-01-01" DbSelectedDate='<%# Bind("Data") %>' Culture="ro-RO"  width="180px" FocusedDate="2020-01-01">
                                    <timeview cellspacing="-1" culture="ro-RO" endtime="21:00:00" headertext="Ora" rendermode="Lightweight" starttime="07:00:00">
                                    </timeview>
                                    <ClientEvents OnDateSelected="OnDateSelected"></ClientEvents>
                                </telerik:RadDatetimePicker>
                                <asp:Label ID="lblAtentie" runat="server" Text=" "></asp:Label>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn DataField="Sala" FilterControlAltText="Filter Sala column" HeaderText="Sala" SortExpression="Sala" UniqueName="Sala">
                            <ItemTemplate>
                                <asp:TextBox ID="txtSala" runat="server" Text='<%# Bind("Sala") %>'></asp:TextBox>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn DataField="ID_TipExaminare" DataType="System.Int32" HeaderText="Tip Examinare" SortExpression="ID_TipExaminare" UniqueName="ID_TipExaminare">
                            <ItemTemplate>
                                <asp:DropDownList ID="ddTipExaminare" runat="server" SelectedValue='<%# Eval("ID_TipExaminare") %>'>
                                    <asp:ListItem Text="Scris" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="Oral" Value="2"></asp:ListItem>
                                    <asp:ListItem Text="Practic" Value="3"></asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>

                        <telerik:GridTemplateColumn>
                            <ItemTemplate>
                                <telerik:radButton id="btnFinalizareFalse" runat="server" CommandName="FinalizareFalse" Text="Sterge Finalizare" UniqueName="FinalizareFalse" Resizable="false" OnClientClicking="onClientFinalizareFalse">
                                </telerik:radButton>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>

                        <telerik:GridTemplateColumn>
                            <ItemTemplate>
                                <telerik:radbutton id="btnDeleteColumn" runat="server" CommandName="Delete" Text="Sterge" UniqueName="DeleteColumn" Resizable="false" ConfirmText="Sterge programare?" OnClientClicking="onClientStergeProgramare">
                                </telerik:radbutton>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>

                    </Columns>
                    <groupbyexpressions>
                        <telerik:GridGroupByExpression>
                            <selectfields>
                                <telerik:GridGroupByField FieldAlias="DenumireCicluInv" FieldName="DenumireCicluInv" FormatString="" HeaderText="" />
                            </selectfields>
                            <groupbyfields>
                                <telerik:GridGroupByField FieldAlias="DenumireCicluInv" FieldName="DenumireCicluInv" FormatString="" HeaderText="" />
                            </groupbyfields>
                        </telerik:GridGroupByExpression>
                        <telerik:GridGroupByExpression>
                            <selectfields>
                                <telerik:GridGroupByField FieldAlias="DenumireFormaInv" FieldName="DenumireFormaInv" FormatString="" HeaderText="" />
                            </selectfields>
                            <groupbyfields>
                                <telerik:GridGroupByField FieldAlias="DenumireFormaInv" FieldName="DenumireFormaInv" FormatString="" HeaderText="" />
                            </groupbyfields>
                        </telerik:GridGroupByExpression>
                        <telerik:GridGroupByExpression>
                            <selectfields>
                                <telerik:GridGroupByField FieldAlias="DenumireSpecializare" FieldName="DenumireSpecializare" FormatString="" HeaderText="" />
                            </selectfields>
                            <groupbyfields>
                                <telerik:GridGroupByField FieldAlias="DenumireSpecializare" FieldName="DenumireSpecializare" FormatString="" HeaderText="" />
                            </groupbyfields>
                        </telerik:GridGroupByExpression>
                        <telerik:GridGroupByExpression>
                            <selectfields>
                                <telerik:GridGroupByField FieldAlias="DenumireAnStudiu" FieldName="DenumireAnStudiu" FormatString="" HeaderText="" />
                            </selectfields>
                            <groupbyfields>
                                <telerik:GridGroupByField FieldAlias="DenumireAnStudiu" FieldName="DenumireAnStudiu" FormatString="" HeaderText="" />
                            </groupbyfields>
                        </telerik:GridGroupByExpression>
                        <telerik:GridGroupByExpression>
                            <selectfields>
                                <telerik:GridGroupByField FieldAlias="DenumireGrupa" FieldName="DenumireGrupa" FormatString="" HeaderText="" />
                            </selectfields>
                            <groupbyfields>
                                <telerik:GridGroupByField FieldAlias="DenumireGrupa" FieldName="DenumireGrupa" FormatString="" HeaderText="" />
                            </groupbyfields>
                        </telerik:GridGroupByExpression>
                    </groupbyexpressions>
                </mastertableview>
            </telerik:RadGrid>

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="xxxxxxxxxx" SelectCommand="PE.ProgramareExamenlListBySpecializareSesiuneExamene" SelectCommandType="StoredProcedure"  OnSelecting="SqlDataSource1_Selecting">
    <SelectParameters>
        <asp:Parameter Name="ID_AnUniv" Type="Int64" />
        <asp:Parameter Name="ID_Facultate" Type="Int64" />
        <asp:Parameter Name="ID_Specializare" Type="Int64" DefaultValue="-1" />
        <asp:Parameter Name="ID_AnStudiu" Type="Int64" DefaultValue="-1" />
        <asp:QueryStringParameter Name="ID_SesiuneExameneSpecializare" QueryStringField="ID_SesiuneExameneSpecializare" Type="Int64" DefaultValue="-1" />
    </SelectParameters>
</asp:SqlDataSource>

 

protected void gvProgramareExamene_ItemCommand(object sender, GridCommandEventArgs e)
        {
            GridDataItem item = e.Item as GridDataItem;

            // using DataKey
            object objID_ProgramareExamen = item.GetDataKeyValue("ID_ProgramareExamen");

            long ID_ProgramareExamen = objID_ProgramareExamen == DBNull.Value ? -1 : Convert.ToInt64(objID_ProgramareExamen);


            if (e.CommandName == "FinalizareFalse")
            {
                new ProgramareExamenProfesorController().ProgramareExamenUpdateNoteFinalizate(ID_ProgramareExamen, false);
            }
            else if (e.CommandName == "Delete")
            {
                if (ID_ProgramareExamen != -1)
                {
                    new ProgramareExamenProfesorController().ProgramareExamenDelete(ID_ProgramareExamen);
                }
            }

}

Cata
Top achievements
Rank 1
 answered on 02 Feb 2020
2 answers
199 views

Trying to sample filtering in this demo and it's not working. 

UI for ASP.NET AJAX 

Spreadsheet

Filter and Sort

Click on top of column "ID" and then click on Filter, select to filter contains "21"....nothing happens.

Same thing basically with Sort range A to Z or Z to A

 

 

Darlene
Top achievements
Rank 1
 answered on 31 Jan 2020
2 answers
194 views

Hello,
When a child's task start/stop date is changed, parent task is changed as well.
I need to disable this behavior. I want a parent task start/stop date to be changed only directly.
I tried this:

protected void RadGantt1_TaskUpdate(object sender, Telerik.Web.UI.Gantt.TaskEventArgs e)
{  
  while (((List<Telerik.Web.UI.Gantt.ITask>)e.Tasks).Count>1)
  {
    ((List<Telerik.Web.UI.Gantt.ITask>)e.Tasks).RemoveAt(0);
  }
}

 

This works, but for all changes. So when % of completed is changed on a child, this is not changed on the parent task.
I need to know, what is the change when TaskUpdate is triggered on the server. 
Or another solution.
Thank you.

Igor
Top achievements
Rank 1
 answered on 31 Jan 2020
2 answers
162 views

I created a page with the RadAsyncUpload control and it looks like this:

 

My aspx code is this:

<%@ Page Title="Telerik Upload" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="TelerikUpload.aspx.cs" Inherits="ImportMPV2_WebTest.TelerikUpload" %>
 
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
 
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    <Scripts>
        <asp:ScriptReference Path="Scripts/PageScripts/TelerikUpload_aspx.js"></asp:ScriptReference>
    </Scripts>
</asp:ScriptManagerProxy>
 
<div style="margin:20px">
    File:
    <telerik:RadAsyncUpload
        AllowedFileExtensions="xlsx"
        EnableInlineProgress="true"
        HttpHandlerUrl="~/UploadHandler.ashx"
        ID="RadAsyncUpload1"
        MaxFileInputsCount="1"
        MultipleFileSelection="Disabled"
        OnClientFileSelected="OnClientFileSelected"
        OnClientFileUploaded="OnClientFileUploaded"
        OnFileUploaded="RadAsyncUpload1_FileUploaded"
        runat="server">
        <FileFilters>
            <telerik:FileFilter Description="Excel Files(xlsx)" Extensions="xlsx" />
        </FileFilters>
    </telerik:RadAsyncUpload>
</div>
 
<div style="margin:20px">
    Sheet:
    <telerik:RadComboBox ID="SheetCb" name="SheetCb" runat="server" OnClientLoad="sheetCbLoad">
    </telerik:RadComboBox>
</div>
 
<div style="margin:20px">
    <telerik:RadButton AutoPostBack="true" runat="server" Text="Import">
    </telerik:RadButton>
</div>
 
 
<div style="margin:20px">
    <pre>
    <asp:label id="lblUploadResults" runat="server"></asp:label>
    </pre>
</div>
 
<div style="margin:20px">
    <pre>
    <asp:label id="lblSSISResults" runat="server"></asp:label>
    </pre>
</div>
 
</asp:Content>

 

Can anyone tell me how to fix the button?

 

Rumen
Telerik team
 answered on 31 Jan 2020
1 answer
103 views

In RadGrid1_InfrastructureExporting function , I m not able to apply styling on partial text of  a particular cell.

Ex - if cell[1,1] = hello world. How to make "hello" as bold.

Vessy
Telerik team
 answered on 31 Jan 2020
1 answer
177 views
How to send data to database using checkbox in radgrid while the submit button is in the other form or page
Eyup
Telerik team
 answered on 31 Jan 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?