Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
73 views
Hi All
Im working on a web app for client which organizes tournaments, lasting 2-3 days. He wants to have one large scheduler where where he will schedule and see all the matches. Since the matches are on multiple locations I have the following structure:

date: 02.17.2015                                                                                                         
                                         Location 1           Location 2           Location 3

8:00                                appointment1                                   appointment2               

8:15                                                                                                                             
.
.
.
date: 02.18.2015                                                                                                         
                                       Location 1           Location 2           Location 3

8:00                                                                                                                             

8:15                                                                                                                             
.
.
.
This is already implemented and working properly with the following setup 
<MultiDayView UserSelectable="false" GroupBy="Date, MatchLocation" GroupingDirection="Vertical" />

However, since one tournament may last for 3 days starting from the mornings till the evening, making the scheduler huge and you need to scroll endlessly. They want to save space on this form, and want me to have different start time for each day. For instance most of the tournaments start at the evening of the first day, then continue early next day, and last few hours (finals only) starting late in the third day. Is there any way to set up start and end time for each day in such multi day view?? So instead of the structure above I have something like this:

date: 02.17.2015                                                                                                         
                                         Location 1           Location 2           Location 3

18:30                                appointment1                                   appointment2               

18:45                                                                                                                             
.
.
.
21:45                                                                                                                             
                                                                                                                           
date: 02.18.2015                                                                                                         
                                        Location 1           Location 2           Location 3

8:00                                                                                                                             

8:15                                                                                                                             
.
.
.
21:45                                                                                                                            

date: 02.19.2015                                                                                                         
                                        Location 1           Location 2           Location 3

13:00                                                                                                                             

13:15                                                                                                                             
.
.
.
16:00                                                                                                                           

I would really appreciate your help
Boyan Dimitrov
Telerik team
 answered on 20 Feb 2015
12 answers
375 views
Hi,
I am trying to bind RadHtml Chart ,in one of my Column I am having a special character like ' ( ' , so When I am having this(special character) in my column  chart  is  not binding but in earlier version of telerik it used  to bind as expected (2013 version) but after upgrading it to 2014 its not supporting,please let me know the solution for this.

Thanks,
Chary.
Danail Vasilev
Telerik team
 answered on 20 Feb 2015
1 answer
222 views
Dear All
    I have used Rad Treeview in ASP.NET, I want to refresh my treeview and it can persist old node selection.
How to do it ?
Help will really appreciating.

Thanks
koolprasad
Boyan Dimitrov
Telerik team
 answered on 20 Feb 2015
13 answers
337 views
I coudln't really come up with a good title for this, so bear with me as I describe what I'm trying to do.

We have a RadGrid setup to use Batch Edit. Each of the columns uses a GridTemplateColumn with a RadComboBox in the EditItemTemplate. The issue is that we want to filter the remaining comoboxes based on what was entered in a previous one. So lets say the first combobox is jobs, and the second one employees.  By default both show all jobs and employees, however if someone picked a Job I then need to rebind the Employees comobo and filter it so it only shows Employees assigned to that Job.

Just the same we have another scenario where there's a combobox in one column and a description in the next.  If the user changes the selected item in the dropdown we want to update the description column to match what was selected in the first column.

I'm assuming this has to be done in JavaScript as it would need to be done client side.  I just can't find any info on how I would do that or if it's even possible.

Thanks in advance.
Konstantin Dikov
Telerik team
 answered on 20 Feb 2015
1 answer
93 views
Hello,

I'm having problem binding the data to the grid when I filter using the operator EndsWith.

In the database the values of the column have the Leading Spaces, and I had problem making iit work for IsEqualTo also but I fixed it by padding leading spaces to the right of the input string. (as shown below)



But, I'm not sure how I should do it for the EndsWith Filter Operator.

I'm able to get the rows from the database by using where condition like '%ABC'.

But the rows are not binding to the grid.

Please advice.

Regards,
Sandy
Kostadin
Telerik team
 answered on 20 Feb 2015
5 answers
809 views

I am trying to take a RadGrid results with a GridClientSelectColumn and a Button that when clicked Loops through the selected records and then pulls the ID so that I can run a routine on the record (Actually plan to copy it to another table)

I can't for the life of me figure out what I am doing wrong.  I get a Null Exception error anytime I try to get and assign the variable the Value of the ID field.  

I am a little rusty with VB/.Net so any help would be appreciated....  if we can figure this out the next thing will be opening up the database source and copying the data from the loop through to the other table! 



ASPX page 
<telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="True" AllowFilteringByColumn="True" AllowPaging="True"
               AllowSorting="True" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" OnItemCommand="RadGrid1_ItemCommand" OnPreRender="RadGrid1_PreRender"
               PageSize="100" Skin="Metro">
               <exportsettings hidestructurecolumns="true">
               </exportsettings>
               <clientsettings>
                   <Selecting AllowRowSelect="True" />
               </clientsettings>
               <mastertableview datakeynames="ID" width="100%">
                   <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                   <Columns>
 
                      <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn">
              </telerik:GridClientSelectColumn>
 
 
 
 
 
                       <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True" SortExpression="ID" UniqueName="ID">
                           <columnvalidationsettings>
                               <ModelErrorMessage Text="" />
                           </columnvalidationsettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="ContactServiceID" FilterControlAltText="Filter ContactServiceID column" HeaderText="ContactServiceID" SortExpression="ContactServiceID" UniqueName="ContactServiceID" DataType="System.Int32">
                           <columnvalidationsettings>
                               <ModelErrorMessage Text="" />
                           </columnvalidationsettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="CategoryName" FilterControlAltText="Filter CategoryName column" HeaderText="CategoryName" SortExpression="CategoryName" UniqueName="CategoryName">
                           <columnvalidationsettings>
                               <ModelErrorMessage Text="" />
                           </columnvalidationsettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="DateCreated" FilterControlAltText="Filter DateCreated column" HeaderText="DateCreated" SortExpression="DateCreated" UniqueName="DateCreated" DataType="System.DateTime">
                           <columnvalidationsettings>
                               <ModelErrorMessage Text="" />
                           </columnvalidationsettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="DateDeleted" FilterControlAltText="Filter DateDeleted column" HeaderText="DateDeleted" SortExpression="DateDeleted" UniqueName="DateDeleted" DataType="System.DateTime">
                           <columnvalidationsettings>
                               <ModelErrorMessage Text="" />
                           </columnvalidationsettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="UserCreated" FilterControlAltText="Filter UserCreated column" HeaderText="UserCreated" SortExpression="UserCreated" UniqueName="UserCreated">
                           <columnvalidationsettings>
                               <ModelErrorMessage Text="" />
                           </columnvalidationsettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="UserDeleted" FilterControlAltText="Filter UserDeleted column" HeaderText="UserDeleted" SortExpression="UserDeleted" UniqueName="UserDeleted">
                           <columnvalidationsettings>
                               <ModelErrorMessage Text="" />
                           </columnvalidationsettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="FirstName" FilterControlAltText="Filter FirstName column" HeaderText="FirstName" SortExpression="FirstName" UniqueName="FirstName">
                           <columnvalidationsettings>
                               <ModelErrorMessage Text="" />
                           </columnvalidationsettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="LastName" FilterControlAltText="Filter LastName column" HeaderText="LastName" SortExpression="LastName" UniqueName="LastName">
                           <columnvalidationsettings>
                               <ModelErrorMessage Text="" />
                           </columnvalidationsettings>
                       </telerik:GridBoundColumn>
                   </Columns>
                   <ItemStyle BackColor="#DFDFDF" />
                   <HeaderStyle BackColor="#FFFFFF" ForeColor="#767676" />
                   <AlternatingItemStyle BackColor="#FFFFFF" />
               </mastertableview>
 
                       <ClientSettings EnableRowHoverStyle="true">
                         <Selecting AllowRowSelect="True"></Selecting>
                         
                       </ClientSettings>
 
 
           </telerik:RadGrid>




Code behind:   **** Note I have Remarked out all of my attempted tries.  I know for a fact the ID is NOT null and is an integer.


Protected Sub BTNrestore_Click(sender As Object, e As EventArgs) Handles BTNrestore.Click
 
 
      
    ' If IDs = String.Empty Then
    ' IDs = CType(dataItem.FindControl("Id"), TextBox).Text
     'IDs = IDs & "," & CType(dataItem.FindControl("Id"), TextBox).Text
 
    Dim strAmount As String
 
    For Each item As GridDataItem In RadGrid1.SelectedItems
        ' Dim lblID As Integer = CType(CType(item.FindControl("ID"), Label).Text, Integer)
        ' Dim lblID As Integer = CType(item.FindControl("ID"), Integer) 
        ' Dim txtBox As TextBox = DirectCast(item("ID").FindControl("ID"), TextBox)
        ' strAmount = txtBox.Text
        ' MsgBox(strAmount)
 
        'Dim itemID As GridDataItem = TryCast(e.ItemID, GridDataItem)
        'Dim itemValue As String = itemID("ID").Text
 
 
        Response.Write(strAmount & " ")
 
 
    Next
 
 
 
End Sub






Eyup
Telerik team
 answered on 20 Feb 2015
1 answer
179 views
I have a global setting in web.config
<add key="Telerik.Web.UI.RenderMode" value="lightweight" />

and with Q1 2015 beta you seemed to add a lightweight mode for date & time picker which causes undesired rendering behaviour in our project. I wonder how set a global render mode for those controls only?
I tried
<add key="Telerik.Web.UI.RenderMode" value="lightweight" />
<add key="Telerik.Web.UI.Calendar.RenderMode" value="classic" />

but it didn't help.
Viktor Tachev
Telerik team
 answered on 20 Feb 2015
3 answers
154 views
Hi,
I am try to update all grids in our project to have consistency in look and feel.
I am looking for guidance for setting width of RadGrid and Columns. Found this link http://www.telerik.com/community/forums/aspnet/grid/best-practice-for-grid-and-column-widths.aspx but it does not exist now. Is there any other resource available?

Thanks
Tushar
Pavlina
Telerik team
 answered on 20 Feb 2015
1 answer
286 views
Hi all,

I'd like to reorder my edit column to put it on the far right of my grid.

My radGrid is generated like this :

<MasterTableView>
<Columns>   
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" ><ItemStyle CssClass="MyImageButton" width="20" /></telerik:GridEditCommandColumn>
</Columns>
</MasterTableView>

Then I add up dynamically columns in the even NeedDataSource.

The problem is, My edit column is on the far left and not on the far right. I've tried the following snippet without much success :

protected void radGridTranslation_DataBound(object _sender, EventArgs _event)
{
    GridColumnCollection l_columns = radGridTranslation.MasterTableView.Columns;
    GridColumn l_editColumn = l_columns.FindByUniqueName("EditCommandColumn");
    if (l_editColumn != 
    {
        l_editColumn.OrderIndex = 
    }  
}

I've found this example :http://www.telerik.com/help/aspnet-ajax/grid-reordering-columns.html

But I don't want to have to use a script to change anything. I should be able to do it right in my Code behind.

Could you help me please ?
Eyup
Telerik team
 answered on 20 Feb 2015
1 answer
461 views
My Grid expands outside my div container whenever I click Edit or Add New Record. How can I keep the grid inside the div? It doesn't look good when it goes outside the div. The div class name is WebpageManagementBox. The grid also has a class name of  webpageManagementGrid. I have attached a picture of what it looks like.

Here is the markup for the div and grid:
<div class="WebpageManagementBox">
      
       <br /><br />
       <asp:Label ID="lblRolePrompt" Text="Select Role to associate web pages:" CssClass="box_Labels" runat="server"></asp:Label>
       <br />
       <telerik:RadDropDownList ID="ddlRoles" runat="server" CssClass="wepageManagementDropDown" Width="200px" DataTextField="role" DataValueField="ID" AutoPostBack="true" OnItemSelected="ddlRoles_ItemSelected"></telerik:RadDropDownList>
       <br />
       <br />
        
       <telerik:RadGrid ID="RadGridwebpagemanagement" CssClass="webpageManagementGrid" MasterTableView-DataKeyNames="ID" runat="server"
           AllowFilteringByColumn="True" AllowSorting="True"
           GroupPanelPosition="Top" 
           OnNeedDataSource="RadGridwebpagemanagement_NeedDataSource"
           OnUpdateCommand="RadGridwebpagemanagement_UpdateCommand" OnItemDataBound="RadGridwebpagemanagement_ItemDataBound" OnDeleteCommand="RadGridwebpagemanagement_DeleteCommand"
           OnInsertCommand="RadGridwebpagemanagement_InsertCommand" OnItemCommand="RadGridwebpagemanagement_ItemCommand" OnPreRender="RadGridwebpagemanagement_PreRender">
           <ClientSettings>
               <Scrolling AllowScroll="True" UseStaticHeaders="True" />
               <Selecting AllowRowSelect="true" />
           </ClientSettings>
           <GroupingSettings CaseSensitive="false" />
           <MasterTableView AutoGenerateColumns="false" CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add New Webpage" 
                InsertItemPageIndexAction="ShowItemOnCurrentPage">
 
               <columns>
                    
                   <telerik:GridBoundColumn DataField="webpage_name" HeaderText="Web Page" UniqueName="webpage_name" ItemStyle-Font-Names="Arial" ItemStyle-Font-Bold="true"
                               FilterControlWidth="200px">
                               <HeaderStyle Width="230px" Font-Names="Arial" />
                               <ItemStyle Width="230px" />
                   </telerik:GridBoundColumn>
                   
                   <telerik:GridCheckBoxColumn DataField="add_privledge" HeaderText="Allow Adds" UniqueName="add_privledge"
                               FilterControlWidth="120px">               
                               <HeaderStyle Width="120px" Font-Names="Arial" />
                               <ItemStyle Width="120px" />
                   </telerik:GridCheckBoxColumn>
                    
                   <telerik:GridCheckBoxColumn DataField="edit_privledge" HeaderText="Allow Edits" UniqueName="edit_privledge"
                               FilterControlWidth="120px">               
                               <HeaderStyle Width="120px" Font-Names="Arial" />
                               <ItemStyle Width="120px" />
                  </telerik:GridCheckBoxColumn>
 
                    <telerik:GridCheckBoxColumn DataField="delete_privledge" HeaderText="Allow Deletes" UniqueName="delete_privledge"
                             FilterControlWidth="120px">               
                               <HeaderStyle Width="120px" Font-Names="Arial" />
                               <ItemStyle Width="120px" />
                   </telerik:GridCheckBoxColumn>                  
 
                  <telerik:GridEditCommandColumn ButtonType="LinkButton" EditText="Edit" CancelText="Cancel" ItemStyle-Width="50px" HeaderStyle-Width="50px" FilterControlWidth="50px" />
                  <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                       ConfirmTitle="Delete" ButtonType="LinkButton" Text="Delete" CommandName="Delete" ItemStyle-Width="50px" HeaderStyle-Width="50px" FilterControlWidth="50px" />
                    
               </columns>
               
               <EditFormSettings EditFormType="Template">
               <FormTemplate>   
                   
                  
                   <div id="divGridEdit" class="divGrid">
                           <b>Add New Role to Webpage Association</b>
                           <br /><br />
                           <table>
 
                               <tr>
                                   <td><asp:Label Text="Web Page:" runat="server"></asp:Label></td>
                                   <td>
                                      <asp:DropDownList ID="ddlWebPages" DataSourceID='sqlDataSourceWebpages'
                                              AppendDataBoundItems="True" DataTextField="webpage_name" DataValueField="ID"
                                              SelectedValue='<%# Bind("security_webpage_id") %>' runat="server">
                                     <asp:ListItem Text=" " Value=""></asp:ListItem>
                                          
                                        </asp:DropDownList>
 
 
                                   </td>
                               </tr>
                               
                               <tr>
                                   <td><br /></td>
                                   <td></td>
                               </tr>
                               <tr>
                                    <td><asp:Label Text="Allow Add:" runat="server"></asp:Label></td>
                                    <td><uc1:CheckBoxNullableChecked ID="chkboxAllowAdd" Checked='<%# Bind("add_privledge") %>' runat="server" />
                                    </td>
                               </tr>
                               <tr>
                                    <td><asp:Label Text="Allow Edit:" runat="server"></asp:Label></td>
                                    <td><uc1:CheckBoxNullableChecked ID="chkboxAllowEdit" Checked='<%# Bind("edit_privledge") %>' runat="server" />
                                    </td>
                               </tr>
                               <tr>
                                    <td><asp:Label Text="Allow Delete:" runat="server"></asp:Label></td>
                                    <td><uc1:CheckBoxNullableChecked ID="chkboxAllowDelete" Checked='<%# Bind("delete_privledge") %>' runat="server" /></td>
                               </tr>
 
                               <tr>
                                   <td><asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                       CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'  runat="server" /></td>
                                   <td><asp:Button ID="btnCancel" Text="Cancel" runat="server" CommandName="Cancel" CausesValidation="false" /></td>
                               </tr>
                           </table>
                       </div>            
 
               </FormTemplate>
           </EditFormSettings>
 
 
           </MasterTableView>
           <ClientSettings>
               <ClientEvents OnRowDblClick="rowDblClick" />
           </ClientSettings>
               
       </telerik:RadGrid>
 
 
   </div>

Here is the css for the div and the grid.
.WebpageManagementBox {
  
    
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
box-shadow: 10px 10px 5px #424542;
  
width: 48%;
height: 61%;
background-color: #BCC7D8;
background-color: #D6D3CE;
position:absolute;
top: 200px;
left: 440px;
padding-left: 20px;
opacity: 1.0;
margin: 0 auto;
-moz-border-radius: 15px;
border-radius: 15px;
border: 1px solid #3145CE;
  
}
.webpageManagementGrid {
    position: absolute;
    top: 110px;
    left: 35px;
    width: 92%;
    font-family: Arial;
}
Eyup
Telerik team
 answered on 20 Feb 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?