Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
244 views
Hi there @Telerik forums,

I have the following problem with the RadTreeView checkboxes:
I do have tree-structure in the database which gets presented with a RadTreeView control - a tree structure with nodes and leaves. The special situation there is the fact a node can be checked, but none of its leaves needs to be checked. You could imagine a virtual structure of access rights where a node is some major right and a leaf of this node is a right which might or might not be set. If it is set the major right must be set, but if none of the minor rights (the leaves) has been set, the major right should remain set until explicitely unset...

Well the Telerik guys say that in the RadTreeView this behaviour is not possible as the logic of the controls does not allow a node to be checked without at least one checked leaf. This post mentiones it...

My RadTreeView declaration:
<tr id="TrMenuRights" runat="server">
            <td width="30%" valign="top"><asp:Label ID="LabelMenuRights" runat="server" Text="Menürechte"/></td>
            <td style="border: 1px solid">
                <telerik:RadTreeView ID="RadTreeViewMenu" runat="server" TriStateCheckBoxes="true" OnClientNodeChecked="OnTreeNodeCheck" Height="200px" Width="100%" /> 
            </td>
</tr>

My question is: are there possibilities to achieve the requested behaviour with the RadTreeView control (or possibly with other Telerik control?)
Please consider this post as a shout of a desperated programer as my application needs this behaviour (customer's requirement!)...
Many thanks in advance for your attention.

Kind regards,
S.
mayur
Top achievements
Rank 1
 answered on 18 Apr 2015
3 answers
342 views
Hello,

I have a radgrid with a template column which has a label that has its text set during the itemDatabound Event. How can I filter on this column?


protected void rgCompany_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if(e.Item is GridDataItem)
        {
            Label contactName = e.Item.FindControl("Label1") as Label;
            MainContact mc =
                CharityChallenge_DAO.GetMainContactForCompany((e.Item.DataItem as Company).CompanyIdentifier);
            if(mc != null)
                contactName.Text = mc.FirstName + " " + mc.LastName;
        }
    }
 
    protected void rgCompany_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        List<Company> companyList = CharityChallenge_DAO.GetCompanies();
        rgCompany.DataSource = companyList ?? new List<Company>();
 
    }


      
     <telerik:RadGrid ID="rgCompany" runat="server" AutoGenerateColumns="False"
            CellSpacing="0" GridLines="None"
    oninsertcommand="rgCompany_InsertCommand" onitemcommand="rgCompany_ItemCommand"
    onneeddatasource="rgCompany_NeedDataSource"
    onupdatecommand="rgCompany_UpdateCommand" EnableLinqExpressions="False"
            AllowFilteringByColumn="True" AllowSorting="True" Height="700px"
            onitemdatabound="rgCompany_ItemDataBound"
            >
<ClientSettings>
<Selecting CellSelectionMode="None"></Selecting>
    <scrolling allowscroll="True" usestaticheaders="True" />
</ClientSettings>
 
<MasterTableView DataKeyNames="CompanyIdentifier" CommandItemDisplay="Top" ShowHeadersWhenNoRecords="true"  AllowFilteringByColumn="True"
                NoMasterRecordsText="No Companies have been added"
                InsertItemDisplay="Bottom" GridLines="None" >
  <NoRecordsTemplate><div style="text-align: center;"><span style="color: Red;">No Companies have been added</span></div></NoRecordsTemplate>
                <CommandItemSettings AddNewRecordText="Add a Company" />
                <CommandItemTemplate>
                    <span class="radGridTitleSpan">Companies</span>
                    <div style="text-align: right;">
                         <asp:LinkButton ID="btnInsert" runat="server"
            CommandName="InitInsert" class="button secondaryAction">Add New Company</asp:LinkButton>
                
                    </div>
                </CommandItemTemplate>
 
<CommandItemSettings AddNewRecordText="Add a Company" ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridBoundColumn FilterControlAltText="Filter column column" DataField="CompanyIdentifier" Visible="False"
            UniqueName="CompanyIdentifier">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn FilterControlAltText="Filter column1 column"  DataField="CompanyName" HeaderText="Company Name" FilterListOptions="VaryByDataType"
            UniqueName="CompanyName">
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column"  FilterListOptions="VaryByDataTypeAllowCustom"
            HeaderText="Company Contact" UniqueName="CompanyContact" AllowFiltering="True">
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn FilterControlAltText="Filter column3 column" DataField="LastUpdatedUserIdentifier" HeaderText="Last Updated User Id"
            UniqueName="LastUpdatedUserIdentifier">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn FilterControlAltText="Filter column4 column" DataField="LastUpdatedTimestamp" HeaderText="Last Updated Time"
            UniqueName="LastUpdatedTimestamp">
        </telerik:GridBoundColumn>
        <telerik:GridEditCommandColumn FilterControlAltText="Filter EditCommandColumn column">
        </telerik:GridEditCommandColumn>
    </Columns>
 
<EditFormSettings EditFormType="WebUserControl"
        UserControlName="CompanyWebCntrl.ascx">
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False">
<WebServiceSettings>
<ODataSettings InitialContainerName=""></ODataSettings>
</WebServiceSettings>
</FilterMenu>
 
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
<WebServiceSettings>
<ODataSettings InitialContainerName=""></ODataSettings>
</WebServiceSettings>
</HeaderContextMenu>
        </telerik:RadGrid>


bharath
Top achievements
Rank 1
 answered on 17 Apr 2015
4 answers
152 views
I am looking to add a context menu on the chart to allow user to filter the data being shown along with a few other things.  Is this possible and are there any examples of doing this?
Gabriel
Top achievements
Rank 1
 answered on 17 Apr 2015
3 answers
165 views

Hi

 How to  Implemented CRUD Operation using this control Grid - Form Template Edit Form.

Pavlina
Telerik team
 answered on 17 Apr 2015
11 answers
452 views
Hi All,

I am using GridDateTime Column in rad gridview and I want to change calender property of filter rad date time picker. I tried to do it like below way but its not working 

protected void dgTest_ItemCreated(object sender, GridItemEventArgs e)
   {
       if (e.Item.ItemType == GridItemType.FilteringItem)
       {
           GridFilteringItem filterItem = (GridFilteringItem)e.Item;
           RadDatePicker startDate = (RadDatePicker)filterItem["StartDate"].FindControl("RDIPFStartDate");
           startDate.Calendar.ShowRowHeaders = false;
       }
   }

Can anyone help me?.. Its urgent

Thanks in advance
Ruchi Jani
Ben
Top achievements
Rank 1
 answered on 17 Apr 2015
2 answers
152 views

I've just used the radSheduler for the first time and was impressed at how easy it was to setup from the on-line examples and demos. I am however experiencing one small problem with setting styles. I used the Telerik documentation on the subject here and everything seemed ok except that my styles are ignored but I can't figure out what I've missed.

Here is my aspx code for the Scheduler (it uses a SQLDataSource:

<telerik:RadScheduler ID="RadScheduler1" StartEditingInAdvancedForm="false" EnableExactTimeRendering="true"
    OnClientAppointmentEditing="AppointmentEditing" OnClientAppointmentInserting="AppointmentInserting"
    DataSourceID="ds_Logbook" DataDescriptionField="ProgComment"
    DataEndField="StopDate" DataKeyField="Logbook_Id" DataStartField="StartDate"
    DataSubjectField="ActivityDescription" SelectedView="MonthView" Height="100%" runat="server">
</telerik:RadScheduler>

 

Here is the DataBound event in the codebehind: 

Protected Sub RadScheduler1_AppointmentDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerEventArgs) Handles RadScheduler1.AppointmentDataBound
    e.Appointment.CssClass = "rsCategory" + Replace(e.Appointment.Subject, " ", "")
End Sub

 

Here is the CSS:  

.rsCategoryActivity1 {
    background-color: Blue;
    border-color: Blue;
    border-style: dotted;
    border-width: thin;
}
 
.rsCategoryActivity2 {
    background-color: Green;
    border-color: Green;
    border-style: dotted;
    border-width: thin;
}
 
.rsCategoryActivity3 {
    background-color: Yellow;
    border-color: Yellow;
    border-style: dotted;
    border-width: thin;
}
 
.rsCategoryActivity4 {
    background-color: Red;
    border-color: Red;
    border-style: dotted;
    border-width: thin;
}
 
.rsCategoryActivity5 {
    background-color: Orange;
    border-color: Orange;
    border-style: dotted;
    border-width: thin;
}

and here is a rendered appointment that should be shown in red but just shows up in the default skin colours:

<div id="RadScheduler1_3_0" title="Activity 4" class="rsApt rsCategoryActivity4" style="height:21px;width:500%;">
    <div class="rsAptOut" style="height:21px;">
        <div class="rsAptMid">
            <div class="rsAptIn">
                <div class="rsAptContent">
                    Activity 4<a class="rsAptDelete" href="#">delete</a>
                </div>
            </div><div class="rsAptResize rsAptResizeStart" style="z-index:80;top:0px;">
                <!-- -->
            </div><div class="rsAptResize rsAptResizeEnd" style="z-index:80;top:0px;">
                <!-- -->
            </div>
        </div>
    </div>
</div>

Can anyone help?

 

 

 

 

Geoff
Top achievements
Rank 1
 answered on 17 Apr 2015
0 answers
99 views

Hi,
I have  customize the inline editor. I want to save data in a database  on clicking  of customize button showing in red circle please see the  attach image. so how can i get the id of customize button so that can i save the data  using jquery.

Please Guide me on this issue.

gaurav
Top achievements
Rank 1
 asked on 17 Apr 2015
3 answers
110 views

Since upgrading to Telerik 2015.1.225.40, the Scheduler adds a horizontal scroll bar when switched to Week view (see attachment).

Is this a bug and/or is there a way to fix this?

Robert Helm
Top achievements
Rank 1
 answered on 17 Apr 2015
4 answers
771 views

What we currently have is an aspx page that contains a radgrid that allows users to modify a record.  The information is loaded into a user control contained within a javascript/css modal window and I would like to replace it with the RadWindow.  This is currently how it is:

<%@ Register Src="~/Common/camelScoreNotes.ascx" TagName="CamelNotes" TagPrefix="uc1" %>
 <%@ Register Src="~/Common/asiExamNotes.ascx" TagName="AsiNotes" TagPrefix="uc1" %>
<%@ Register Src="~/Common/auditWorkPapers.ascx" TagName="WorkPapers" TagPrefix="uc1" %>

 

<telerik:GridTemplateColumn UniqueName="OpenNotes" HeaderStyle-Width="40px" ItemStyle-HorizontalAlign="Center">
     <ItemTemplate>
          <div id="Div<%# FormatDateTime(Eval("Date"), 2).Replace("/", "")%>" class="audit-notes-window">
               <uc1:CamelNotes NoteDate='<%# Eval("Date").ToString%>' AuditID='<%# _hdnAuditID.Value %>' CamelScore='<%# Eval("CamelCAE_Score")%>' CamelComp='<%# Eval("CAMEL_Comp")%>' CreatedBy='<%# Eval("CreatedByName")%>' runat="server"/>
          </div>
     </ItemTemplate>
</telerik:GridTemplateColumn>
 

First, I am not sure if it is even possible?  Can I only define one RadWindow and still pass the required variables in or would each GridTemplateColumn be a new RadWindow?   Note: that I do have multiple user controls and would like to get them all being edited in a RadWindow; each require that I pass in variables.  Maybe I create 3 RadWindows (one for each of the user controls) and define its contenttemplate as the user control but how could I pass in the required information? 

 Your assistance is appreciated.

Marin Bratanov
Telerik team
 answered on 17 Apr 2015
5 answers
94 views

hi

i have wich it's fill withe some items it's apear in the first pic i wnat items o combobox apear like the second pic and thank you

Magdalena
Telerik team
 answered on 17 Apr 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?