Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
1.1K+ views
What will be the differences in the generated "new project" between selecting "RadControls VB.NET Web Application" and "RadControls VB.NET WebSite" in the "Create New Telerik Project" dialog box?

Thanks,

Donald
Nuttapol
Top achievements
Rank 1
 answered on 06 Sep 2016
1 answer
276 views

Please bear with me, as this is my first post.

I am trying to do a clientside validation on filename expression. I do not want to have :, /, %, etc in my file names. How do you guys do that?

Ivan Danchev
Telerik team
 answered on 05 Sep 2016
1 answer
41 views

Hi,

I'm trying to use Gantt chart with client side binding to web service. First I tried to return some hardcoded data and it works fine, the tasks are shown on the chart. But in order to get the real data I need to send some additional data to the web service. I tried to do this just as shown in the docs (LINK), but as soon as I add this parameter to the functions:

IDictionary<string, object> context

no data will be shown on the chart and the debugger doesn't stop in the functions (f.e. GetTasks). I'm 99,(9) % sure I did everything exactly like in the example.

P.S. I'm using Sharepoint 2013, don't if it's important here.

I'd grateful for any help.

Maciek

Dimitar
Telerik team
 answered on 05 Sep 2016
1 answer
111 views

Hello,

I am using Rad Grid version with Scrolling, Static Headers, and one Frozen Column. The grid shows Arabic data (from right to left).

The problem is that the grid does not show all columns. The horizontal scroll bar reaches the end, but not all columns are visible.

You can check the attached screenshot.

Appreciate your help,

Thanks,

 

 

Kostadin
Telerik team
 answered on 05 Sep 2016
1 answer
139 views
How do I disable the rename and delete options for the context menu for the Image Manager window? I see the info about using external dialogs, but how do I set that up when the ImageManager is being called from within the Editor?
Rumen
Telerik team
 answered on 05 Sep 2016
3 answers
224 views
Hello,
I want to users to be able to filter on the results in our radgrid. I enabled AllowFilteringbycolumn = "true' on my radgrid, but whenever I enter a value into the new radgrid filter boxes the loading panel spins and nothing changes. I have a searchbox that allows the user to search for their items. After that initial query returns, I want them to be able to filter on any column in the grid. So for instance if the results show all of their items, but they want to see all of them in building 1, they should be able to enter 1 into the filter textbox on the grid. How can I make this happen?

Thank you!
<telerik:RadGrid ID="RadGrid1" runat="server" EnableLinqExpressions="false" AutoGenerateColumns="true" Skin="WebBlue" AllowPaging="true" AllowSorting="true" CellSpacing="0" GridLines="Both" OnNeedDataSource="NeedDataSource" PageSize="50" OnPreRender="RadGrid1_PreRender"  AllowMultiRowSelection="false" AllowFilteringByColumn="true">
                <PagerStyle Mode="NextPrevAndNumeric" />
                <ItemStyle CssClass="UsePointer" />
                <MasterTableView CommandItemDisplay="bottom">
                    <SortExpressions><telerik:GridSortExpression FieldName="assetTag" SortOrder="Ascending" /></SortExpressions>
                    <Columns>
                        <telerik:GridTemplateColumn HeaderStyle-CssClass="commandHeader" HeaderStyle-Width="30px" Exportable="false" UniqueName="checkCol">
                            <HeaderTemplate>
                                <asp:CheckBox ID="checkAll" runat="server" onclick="CheckAll(this)" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="cboxSelect" runat="server" onclick="unCheckHeader(this); enableMassUpdate()" OnCheckedChanged="GridCheckBoxChanged" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                    <CommandItemSettings ShowExportToExcelButton="false" ShowAddNewRecordButton="false" ShowRefreshButton="false"/>
                </MasterTableView>
                <ClientSettings AllowKeyboardNavigation="true"  EnablePostBackOnRowClick="true" >
                    <Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling>
                    <Selecting AllowRowSelect="true" />
                    <ClientEvents  OnRowSelecting="RowSelecting" OnRowSelected="RowSelected" OnCommand="ClearForm"  />
                    <KeyboardNavigationSettings EnableKeyboardShortcuts="false" AllowSubmitOnEnter="false" AllowActiveRowCycle="false" ></KeyboardNavigationSettings>
                </ClientSettings>
            </telerik:RadGrid>

protected void NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {

            (source as RadGrid).DataSource = getDataGrid("RadGrid1");
        }

protected void RadGrid1_PreRender(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                GridColumn checkCol = RadGrid1.MasterTableView.GetColumnSafe("checkCol");
                checkCol.OrderIndex = 1;
                GridColumn assetDeptCol = RadGrid1.MasterTableView.GetColumn("itemDept");
                assetDeptCol.HeaderStyle.Width = Unit.Pixel(115);
                assetDeptCol.HeaderText = "item Department";
                assetDeptCol.OrderIndex = 2;
                GridColumn assetTagCol = RadGrid1.MasterTableView.GetColumn("itemTag");
                assetTagCol.HeaderStyle.Width = Unit.Pixel(100);
                assetTagCol.HeaderText = "itemTag";
                assetTagCol.OrderIndex = 3;
                GridColumn employeeCol = RadGrid1.MasterTableView.GetColumn("employee");
                employeeCol.HeaderStyle.Width = Unit.Pixel(280);
                employeeCol.HeaderText = "Employee";
                employeeCol.OrderIndex = 4;
                GridColumn buildingCol = RadGrid1.MasterTableView.GetColumn("building");
                buildingCol.HeaderStyle.Width = Unit.Pixel(100);
                buildingCol.HeaderText = "Building";
                buildingCol.OrderIndex = 6;
                GridColumn floorCol = RadGrid1.MasterTableView.GetColumn("floor");
                floorCol.HeaderStyle.Width = Unit.Pixel(70);
                floorCol.HeaderText = "Floor";
                floorCol.OrderIndex = 7;
                GridColumn roomCol = RadGrid1.MasterTableView.GetColumn("room");
                roomCol.HeaderStyle.Width = Unit.Pixel(150);
                roomCol.HeaderText = "Room";
                roomCol.OrderIndex = 8;     
                RadGrid1.Rebind();
           }
}
Eyup
Telerik team
 answered on 05 Sep 2016
4 answers
78 views

Hello,

 

I have a radgrid where I added a button in the ItemCreated event for the grid.

 

<p>if (e.Item is GridCommandItem)<br>            {<br>                ImageButton b = new ImageButton();<br>                b.ID = "Export";<br>                b.ImageUrl = "images/excel.png";</p><p>b.CommandName = "Export";</p><p>e.Item.Controls[0].Controls[1].Controls.Add(b);<br>            }</p>

 

When the image is clicked it calls the ItemCommand event:

protected void grdInventory_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)<br>        {<br>            if (e.CommandName == "Export")<br>            {<br>                 //do stuff<br> }<br>        }

 

I want to capture the filters or grouping for that grid and export them to excel in that event.  I'd also like to ignore the paging.  I know there is a default exportToExcel button for these grids, but I need to export to a template.  Therefore, I want to write custom code in the ItemCommand event.  Unless there is something built into radgrid that will allow me to export the results to a predefined template?

 

Thanks!

 

 

 

 

Eyup
Telerik team
 answered on 05 Sep 2016
0 answers
70 views

Hi All,

Reason why I wanted to preview it with img tag for I have a special CSS that is attached to it (I have no issue when I preview it with RadImageEditor).

<script type="text/javascript">
    var imageUploaded = false;
    function OnClientFilesUploaded(sender, args) {
      $find('<%=RadAjaxManager1.ClientID %>').ajaxRequest();
      imageUploaded = true;
  }
</script>

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnablePageHeadUpdate="false">
  <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
      <UpdatedControls>
         <telerik:AjaxUpdatedControl ControlID="imgProfile" />
      </UpdatedControls>
    </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

 

<img id="imgProfile" runat="server" alt="Profile" src="..\default.jpg" />
<telerik:RadAsyncUpload ID="AsyncUpload1" runat="server"
  OnClientFilesUploaded="OnClientFilesUploaded"    
  OnFileUploaded="AsyncUpload1_FileUploaded"
  MaxFileSize="1024000" AllowedFileExtensions="jpg,png,gif,bmp"
  AutoAddFileInputs="false" Localization-Select="Upload" />

Protected Sub AsyncUpload1_FileUploaded(sender As Object, e As FileUploadedEventArgs)
 
        Using stream As Stream = e.File.InputStream
            Dim imgData As Byte() = New Byte(stream.Length - 1) {}
            stream.Read(imgData, 0, imgData.Length)
            Dim ms As New MemoryStream()
            ms.Write(imgData, 0, imgData.Length)
            Context.Cache.Insert(Session.SessionID + "UploadedFile", ms, Nothing, DateTime.Now.AddMinutes(20), TimeSpan.Zero)
        End Using
 
''Code for updating Img src???
        
    End Sub

 

I did try to save first the file to a folder and then use the path for the img src but its not reflecting. I still need to do refresh just to make my img update its image.

I hope anyone can suggest for better solution.

 

Thanks in advance,

RJ

RJ
Top achievements
Rank 1
 asked on 02 Sep 2016
5 answers
704 views
Here's the scenario;

We'd like to allow the user to select an image, upload it. Once uploaded, we'd like to look at the dimensions and resize it so that the maximum dimension (either height or width) is 1000 px, and then save it as a stream into a database column. We don't want the user to have any additional editing capability with the image.

Wondering whether the RadImageEditor is the appropriate tool for this? We're trying to avoid using other libraries such as the system.graphics library.

Any suggestions?
RJ
Top achievements
Rank 1
 answered on 02 Sep 2016
8 answers
255 views
I have three key questions regarding the "All Fields" list in the Configuration Panel for RadPivotGrid.

1. For a DateTime field, is it possible to control the options that appear?  I have a DateTime field and the valid values for this field are month beginning dates (e.g. Jan 1 2014, Feb 1 2014, etc).  They drive some monthly reporting that is shown in the PivotGrid.  But in my field chooser I automatically also get Year, Quarter, Month, Week, Day, Hour, Minute, and Second -- which I don't want.  I have searched but can't seem to find a way to suppress them.  Is this possible?  If so, how?

2.  Regarding the rest of the fields -- can I order them how I like after they have been added to the All Fields list (so that the ordering is just shown in the All Fields list)?  I am hoping to be able to sort them alphabetically for easy reference.

3.  If a field exists in a DataTable that is the DataSource for the PivotGrid, is there a way I can exclude that field from the All Fields list?

I think these questions should be pretty straightforward.   If needed, however, I *can* provide a working solution which illustrates them.

Thanks -
Erik Dahl
Kostadin
Telerik team
 answered on 02 Sep 2016
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?