Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
68 views
Im building a web app using MVC3 and I need to include a scheduler.  Is it possible somehow to incorporate the RadScheduler in an MVC app ?  Is so, are there any examples I could follow ?
Plamen
Telerik team
 answered on 14 Sep 2012
2 answers
84 views
Hi guys,

Is it possible to make the HeaderContextMenu to do a postback when you check/uncheck any Column submenu item to show/hide a column?

I need the postback to be able to save the column visibility state on the user's profile. I'm using this code to do it so.

I have tried attaching a new handler to the RadGrid.HeaderContextMenu.ItemClick event, but this event doesn't fire when checking/unchecking a column in the submenu.

Thank you in advance,
JoaquĆ­n
Joaquín
Top achievements
Rank 2
 answered on 14 Sep 2012
1 answer
302 views
Hello,

recently i have been working on calebdar functionality ,in datepicker calenadar on header where monthname is displayed if we click on that header a  table is opened which contains Today ok cancel buttons along with year names, now i want to put a down arrow button on datepicker calendar header adjcent to monthname, so that we click on that the popup having today ,ok,cancel will be opened how to add that button on header how to acheive this ,i am sending calendar image where i wanted to add taht button marked in it in ellipse ,please respond .

Regards,
madhukar.
Princy
Top achievements
Rank 2
 answered on 14 Sep 2012
1 answer
74 views
I'm creating my RadChart progrmatically on postback and making a curve like this,

Dim radChart As New Telerik.Web.UI.RadChart()
  
Dim chartSeries2 As New Telerik.Charting.ChartSeries()
chartSeries2.Type = Telerik.Charting.ChartSeriesType.Line
chartSeries2.Appearance.LabelAppearance.Visible = False
chartSeries2.Appearance.LineSeriesAppearance.Color = System.Drawing.ColorTranslator.FromHtml("#123252")
  
Dim csItem As New Telerik.Charting.ChartSeriesItem
Dim csItems As New Telerik.Charting.ChartSeriesItemsCollection
  
For i = 5 To 1000
    csItem = New Telerik.Charting.ChartSeriesItem
    csItem.XValue = i
  
    'lcyNet(i) is calculated each time based on form input values
    csItem.YValue = lcYNet(i)                      
  
    csItems.Add(csItem)
Next i
  
chartSeries2.AddItem(csItems)
radChart.Series.Add(chartSeries2)


This works perfectly first time, the problem occurs when I change values and resubmit the form. The axis and curve don't update, even though my values and the ChartSeriesItem YValues definitely do.

I tried adding the current time to the end of the ChartTitle text and that updates OK every time.
Peshito
Telerik team
 answered on 14 Sep 2012
1 answer
67 views

This part of our app allows users to have video file associated with a case.  The video file is on disk, and a database record has the metadata for the video.  When they edit the record in the RadGrid, the edit template contains a video tag so they can view the video.  This works well in the basic sense, the path is pulled from the database and put in the video tag when you edit the record.

Then I tried to get clever.  I found this: http://videojs.com/ which adds some functionality.  If you read their directions, if you have an ajax situation, you need to call a js function to configure your video tag.  So I added that in a RadScriptBlock in the Edit template.  The problem is, the script only works some of the time.  It always works on the first record you edit, but then may or may not if you open other records to edit.  I've tried various things, but I don't really know what to do to get that _V_ function to be called every time the grid edits.

Any suggestions?  If nothing else, here's a good sample of how to show a video with html 5 inside a RadGrid.

All this below is inside of an update panel.

At the top of the page, the video.js reference:

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script src="http://vjs.zencdn.net/c/video.js" type="text/javascript"></script>
</telerik:RadScriptBlock>

And the grid:

<telerik:RadGrid ID="CaseVideosRadGrid" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellSpacing="0" DataSourceID="VideosSqlDataSource" GridLines="None">
<MasterTableView DataKeyNames="VideoID" DataSourceID="VideosSqlDataSource"  AllowAutomaticDeletes="True" AllowAutomaticUpdates="True" EditMode="PopUp">
<CommandItemSettings 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:GridEditCommandColumn FilterControlAltText="Filter EditCommandColumn column" ItemStyle-Width="50px" HeaderStyle-Width="50px">
            <HeaderStyle Width="50px"></HeaderStyle>
            <ItemStyle Width="50px"></ItemStyle>
        </telerik:GridEditCommandColumn>
        <telerik:GridButtonColumn ConfirmText="Delete this Video? This cannot be undone." ConfirmDialogType="RadWindow"
            ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
            <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" Width="50" />
        </telerik:GridButtonColumn>
        <telerik:GridBoundColumn DataField="VideoID" DataType="System.Int32" FilterControlAltText="Filter VideoID column" HeaderText="VideoID" ReadOnly="True" SortExpression="VideoID" UniqueName="VideoID" Visible="false">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="videoAdrIdx" DataType="System.Int32" FilterControlAltText="Filter videoAdrIdx column" HeaderText="Address" SortExpression="videoAdrIdx" UniqueName="videoAdrIdx" Visible="false">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="videoInspectionTypeIdx" DataType="System.Int32" FilterControlAltText="Filter videoInspectionTypeIdx column" HeaderText="Inspection Type" SortExpression="videoInspectionTypeIdx" UniqueName="videoInspectionTypeIdx" Visible="false">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="videoDiskFilename" FilterControlAltText="Filter videoDiskFilename column" HeaderText="Video" SortExpression="videoDiskFilename" UniqueName="videoDiskFilename">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="videoBatch" DataType="System.Int32" FilterControlAltText="Filter videoBatch column" HeaderText="Batch" SortExpression="videoBatch" UniqueName="videoBatch" ReadOnly="True">
            <ItemStyle HorizontalAlign="Center" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="videoCaption" FilterControlAltText="Filter videoCaption column" HeaderText="Caption" SortExpression="videoCaption" UniqueName="videoCaption">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="videoLocation" FilterControlAltText="Filter videoLocation column" HeaderText="Location" SortExpression="videoLocation" UniqueName="videoLocation">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="videoFieldNotes" FilterControlAltText="Filter videoFieldNotes column" HeaderText="Field Notes" SortExpression="videoFieldNotes" UniqueName="videoFieldNotes" Visible="false">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="videoCreatedOn" DataType="System.DateTime" FilterControlAltText="Filter videoCreatedOn column" HeaderText="Date" SortExpression="videoCreatedOn" UniqueName="videoCreatedOn" DataFormatString="{0:d}" ReadOnly="True">
        </telerik:GridBoundColumn>
   </Columns>
 
<EditFormSettings CaptionFormatString="Edit Info for Video: {0}" CaptionDataField="videoDiskFilename" EditFormType="Template">
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
    <FormTemplate>
        <br />
        <table cellspacing="2" border="0" width="100%">
            <tr>
                <td rowspan="5">
                    <video id='example_video_<%# Eval("VideoID") %>' class="video-js vjs-default-skin" controls width="320" height="240" preload="auto">
                        <source type="video/mp4" src='<%# Eval("FullPath") %>'>
                    </video>
                    <telerik:RadScriptBlock runat="server">
                     <script type="text/javascript">
 
                         var myPlayer = _V_('example_video_<%# Eval("VideoID") %>');
 
                    </script>
                    </telerik:RadScriptBlock>
                </td>
                <td>
                    <table cellspacing="2" border="0" width="100%">
                        <tr>         
                            <td class="formlabel">
                                Inspection:
                            </td>
                            <td>
                                <asp:DropDownList ID="InspectionDropDownList" runat="server" DataSourceID="MiscListSqlDataSource" DataTextField="mscName" DataValueField="mscIdx" SelectedValue='<%# Bind( "videoInspectionTypeIdx") %>' AppendDataBoundItems="True">
                                    <asp:ListItem Value="-1" Text="---"></asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>         
                            <td class="formlabel">
                                Location:
                            </td>
                            <td>
                                <asp:TextBox ID="LocationTextBox" runat="server" Text='<%# Bind( "videoLocation") %>' MaxLength="255"></asp:TextBox>                
                            </td>
                        </tr>
                        <tr>         
                            <td class="formlabel">
                                Address:
                            </td>
                            <td>
                                 <asp:DropDownList ID="videoAddressDropDownList" runat="server" DataSourceID="AddressSqlDataSource" DataTextField="adrFullname" DataValueField="adrIdx" AppendDataBoundItems="True"  SelectedValue='<%# Bind( "videoAdrIdx") %>'>
                                    <asp:ListItem Value="-1" Text="---"></asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                    </table>
                
                </td>
            </tr>
        </table>
        <table cellspacing="2" border="0" width="100%">
             <tr>         
                <td class="formlabel">
                    Caption:
                </td>
                <td >
                    <asp:TextBox ID="CaptionTextBox" runat="server" Text='<%# Bind( "videoCaption") %>' Width="500" MaxLength="255"></asp:TextBox>                
                </td>
            </tr>
             <tr>         
                <td class="formlabel">
                    Field Notes:
                </td>
                <td >
                    <asp:TextBox ID="FieldNotesTextBox" runat="server" Text='<%# Bind( "videoFieldNotes") %>' Width="500" TextMode="MultiLine"></asp:TextBox>                
                </td>
            </tr>
       </table>
        <table style="width: 100%">
            <tr>
                <td align="right" colspan="2">
                    <asp:Button ID="Button1" Text='<%# Iif (TypeOf Container is GridEditFormInsertItem, "Insert", "Update") %>'
                        runat="server" CommandName='<%# Iif (TypeOf Container is GridEditFormInsertItem, "PerformInsert", "Update") %>'>
                    </asp:Button
                    <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
                    </asp:Button>
                </td>
            </tr>
        </table>
    </FormTemplate>
    <PopUpSettings Width="800" Modal="true"  />
</EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
</telerik:RadGrid>
Antonio Stoilkov
Telerik team
 answered on 14 Sep 2012
1 answer
118 views
HI, I have a project in Visual Studio 2012 and fw 4, I'm using some grids between entity framework and generated automatic crud operations, when I test the App in my pc this work fine, in the azure emulator work fine too, bue when I deploy to the cloud services the App does not work, and I get the next error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.



 But if I only used the grid to show data the App go fine!



Any ideas??



Thank you
Tsvetoslav
Telerik team
 answered on 14 Sep 2012
1 answer
86 views
Would anyone be willing to show me how to write the code to use SPContext in order to get the UserName (without Domain) of the currently logged in SharePoint user, and then to Query a SQL Server external content source for items in a field called "Assignee" where the logged in name is contained in the Assignee? 

Further, could you then tell me how to load that query into a RadGrid by default.... But to be able to clear the filter (or apply a new one) when desired?
Marin
Telerik team
 answered on 14 Sep 2012
1 answer
86 views
Hello , I wouls like to use the Play/Pause (images) button in Toggle button examples. Please advise how i can get these images. Thanks and Regards,
Vaneeth
Princy
Top achievements
Rank 2
 answered on 14 Sep 2012
2 answers
75 views
Hi Team,

  My requirement is : I have search page, in this page I have 2 filed set, in first field set I'm using "

JQuery :: Client-side Collapse/expand" below some  textboxes like title,number,etc..textbox controls. so user can enter data any text box control and click on Search button Filed set 2 open with releated filter condition data can be populated in radgrid. This can be working fine for me.

 

My problem is :  defautly Close Hide Search Criteria [Expand panel] below
                                               Search Criteria
Title :  
                                                   Number :  
 like some text box have and below 2 buttons Search and Cancel
 If I enter in "Title" text box as "AAA" and click on Search button open a field set 2  Search Results and displaying radgrid with releated data[in rad grid I have columns S.No,Title,Number...] ok, means everything is working fine for me.

now when I click on "+" image button Open Show Search Criteria [Collapse panel]  here I hide the Search Criteria field set and only display Field set 2 means Search result field set area only I display. here in rad grid when I want to do sorting perform on columns [Title] column is sorting and panel also "Expand" please can you help me in this issue.

for you reference below  I mention my JQuery script
<script language="javascript" type="text/javascript" src="../JS/jquery-1.4.1.min.js"></script>
<script language="javascript" type="text/javascript" src="../JS/jquery.tooltip.js"></script>
-------------------------------------------------------------------------------------------------------------------------------------------
// Expand collapse
        function ExpandCollapseDivFilters() {
            var lbl = document.getElementById("<%= lblfilterTitle.ClientID %>");
            var pnl = document.getElementById("<%= pnlFilter.ClientID %>");
            var img = document.getElementById("<%= img.ClientID %>");

            //debugger;

            var divstyle = pnl.style.display;
            if (divstyle.toLowerCase() == "block" || divstyle == "") {
                $(pnl).slideUp("slow");
                img.src = "../Images/Buttons/Open1.gif";
                img.alt = "Open";

                lbl.innerHTML = "Show Search Criteria";
            }
            else {
                  $(pnl).slideDown("slow");
                img.src = "../Images/Buttons/Close1.gif";
                img.alt = "Close";

                lbl.innerHTML = "Hide Search Criteria";
            }
        }
--------------------------------------------------------------------------------------------------------------------------------------------
 <table id="divToggle" style="background-color: Blue; height: 25px; width:100%;" onclick="ExpandCollapseDivFilters();">
            <tr>
                <td align="left">
                    <img id="img" runat="server" src="~/Images/Buttons/Close1.gif" alt="Close" />
                    <asp:Label ID="lblfilter" runat="server" />
                    <span id="lblfilterTitle" class="labelContent" runat="server"></span>
                </td>
            </tr>
        </table>
 <asp:Panel ID="pnlFilter" runat="server">
  // here I'm writing Field set 1 means  here I define my textbox controls[Search Criteria]
</asp:Panel>
                         <fieldset style="display: none" id="SearchResults" runat="server">
                                <legend >
                                    <asp:Label ID="lblResults" runat="server" Text="Search Results" CssClass="legend"></asp:Label>
                                </legend>
                                <uc:SearchControl ID="uscSearchControl" runat="server" /> // in this user control I have  Rad grid      
                       </fieldset>
Now I hope you can be clear ...
Advance Thanks
Mr. Perfect
Vasil
Telerik team
 answered on 14 Sep 2012
3 answers
42 views
hi .. i'm a web designer and my company just bought telerik and we're using it in one of our applications ... i want to change the grid's css "and every thing else" to the look i designed .. i tried using your online style builder http://stylebuilder.telerik.com 

and choose one of the existing skins to create new one from it .. but when i open the options for editing the grid "fine-tune" i can see very few options to edit  -for example when i choose "Grid Wrapper" all the options i can see are background and box but still i can't edit/add every thing i want .. i can either put a background color or image .. but i want to use css3 background gradient also , box-shadow, border-radius ,etc... "not necessarily for the Grid Wrapper or the grid control alone but for every thing" and any other css3 attributes  .. how can i do that , i wanna have full control over the design/skin ... and "even" when i try to edit the background options provided for the "Grid Wrapper"  nothing happens "IE9 and Chrome" , nothing changes i wait and hit save and wait but it doesn't change even after saving


please help me get full control over the skin
Galin
Telerik team
 answered on 14 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?