Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
225 views

Dear Telerk Support,

 I have been using latest Telerik Control (i.e. UI for ASP.NET AJAX Q1 2015 [2015.1.401.40]) within one of my project.

 The problem I'm having is with RadNumeric Text Box.

 My RadNumeric text box is as defined below:

<telerik:RadNumericTextBox SkinID="UnitRadNumericTextBox" runat="server"
      Font-Size="12px" style="vertical-align: middle;border-top:1px solid #cccccc; border-right: 1px solid #cccccc;border-bottom: 1px solid #cccccc;border-left:1px solid #cccccc;background-color: #fff;" Font-Names="Trebuchet MS"  Height="22px" Border="1px solid #8384a0"
     Value="0.00" NumberFormat-DecimalDigits="2"
     Width="92%" MinValue="1" MaxValue="9999.99" >
    <FocusedStyle HorizontalAlign="Right" />
    <EnabledStyle HorizontalAlign="Right" />
</telerik:RadNumericTextBox>

 

Problem here is that, for this new DLL, when I click on this RadNumeric TextBox, 0  does not gets selected as whole as it was earlier when we press TAB to redirect to this RadNumeric Textbox.

 Actually , when we click on this text box & write 1, it becomes 10 & not 1.

 This is the problem in new DLL, when I reverted my entire package to old DLL (i.e. 2015.1.225.40) it all went good.

Please help.

 Thanks

 Ajay

Viktor Tachev
Telerik team
 answered on 08 Jun 2015
2 answers
62 views

Hi Team,

I am using radgrid in "put all fields in edit" mode, achieving through the below code .

        protected void RadGrid1_PreRender(object sender, EventArgs e)
        {
            RadGrid1.AllowMultiRowEdit = true;
            RadGrid1.MasterTableView.EditMode = GridEditMode.InPlace;
            foreach (GridDataItem dataItem in RadGrid1.Items)
            {
                dataItem.Edit = true;
            }
            RadGrid1.Rebind();
         }

 

Also I used  "RadGrid1.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;" , in order to create a new row to the grid.

Now I need to read all newly entered values from a button.

Please help.

 

Ramesh

Ramesh
Top achievements
Rank 1
 answered on 08 Jun 2015
5 answers
165 views

hi,

 I am using radwindow but when it opens then some part of border is not visible.

 As you can see attached image in which "Search" radwindow is opened but its bottom-right-corner border is invisible.

Behind the "Search" radwindow there is light blue colored editor, its basically IBM Daeja Viewone plug-in.

If i move this "Search" radwindow away from DaejaViewone then border appears.

Also when i set "ShowContentDuringLoad" property "true" then also border appears even if radwindow opens over DaejaViewone.

 

So please provide me the solution for getting visible radwindow border over Daeja Viewone.

Marin Bratanov
Telerik team
 answered on 08 Jun 2015
4 answers
1.0K+ views
Good day , i have tried to add the built-in export buttons to my radgrid, for some reason the are not showing. I have added the following tag under the tableview element

<CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true"
 
                ShowExportToCsvButton="true" ShowExportToPdfButton="true"></CommandItemSettings>

Is there any other settings i have to enable for the built-in export buttons to work?. I would like to use the built in ones because i have many grids throughout my project and dont want to manually add 5 export buttons for every i grid.

Any help would be greatly appreciated
Eyup
Telerik team
 answered on 08 Jun 2015
1 answer
223 views

I'm having a problem with the grid of the RadFileExplorer not refreshing after I've created a new directory and added it to the viewpaths and treeview of the fileexplorer. What I'm trying to accomplish is to create a directory for a file to be uploaded by the RadFileExplorer, but I want to prefix the directory name with the current system date.  I'm using a RadTextBox to allow the user to enter the variable portion of the directory name. The fileexplorer grid will refresh as expected until after I create the new directory. Once I create the new directory, the grid does not refresh. I've searched for and found possible solutions in the forums, like using the clearFolderCache and refresh methods, but they did not work. Any Ideas?

The page element looks like the following:

<telerik:RadTextBox ID="RadDirSuffix" runat="server" OnTextChanged="RadDirSuffix_TextChanged" AutoPostBack="True" LabelWidth="64px" Resize="None" Width="160px"></telerik:RadTextBox>

Click on Upload to browse for the file you wish to upload.
<telerik:RadFileExplorer Runat="server" ID="RadFileExplorer1" OnItemCommand="RadFileExplorer1_ItemCommand" OnClientFolderChange="OnClientFolderChange" ></telerik:RadFileExplorer>

and the code behind is as follows:

protected void RadDirSuffix_TextChanged(object sender, EventArgs e)
{
RadTextBox tb = (RadTextBox)sender;
string userdir = "Safeco";
string targetdir = Properties.Settings.Default.TargetDirectory + "/" + userdir + "/" + FilePrefix.Text + tb.Text;

// Check to see if the directory exists and create it if not
if (!(Directory.Exists(Server.MapPath(targetdir))))
{
Directory.CreateDirectory(Server.MapPath(targetdir));
}

// point the telerik file explorer to the new directory
RadFileExplorer1.Configuration.ViewPaths[0] = targetdir;
RadFileExplorer1.Configuration.UploadPaths[0] = targetdir;
RadFileExplorer1.Configuration.DeletePaths[0] = targetdir;

// add new directory to treeview
RadTreeNode root = RadFileExplorer1.TreeView.Nodes[0];
RadTreeNode newDir = new RadTreeNode();
newDir.Text = FilePrefix.Text + tb.Text;
newDir.Selected = true;
root.Nodes.Add(newDir);
}

Vessy
Telerik team
 answered on 08 Jun 2015
1 answer
87 views

How set the first item in my RadComboBox font.bold = true when i call "RadComboBox1_SelectedIndexChanged"?

I dont now what the RadComboBoxItem have text or value. Load dynamic....

Only that i want server side set the first item font bold to true, but first when i call SelectedIndexChanged

 

Aneliya Petkova
Telerik team
 answered on 08 Jun 2015
0 answers
106 views

Hi,
I have to design a "send mail functionality" using Telerik Rad Grid. I want 4 columns in it.

1st Column: under Edit Item Template: "To"
2nd Column: under Edit Item Template: "CC"
3rd column: under Edit Item Template: "Subject"
4th Column: under Edit Item Template: "Content/Msg"

When I click on "Add" button, I shall able to manually enter above 4 fields in "Edit Item Template" of Rad Grid Template columns.

When I click on "Save" button these columns should be visible inside Rad Grid "Item template/Columns"

I tried to design the .aspx code, based on functionality:

<%@ Register TagPrefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<body>
    <form id="form1" runat="server">
    <div>
 
<telerik:RadGrid ID="RGGST" runat="server"  AutoGenerateColumns="false">
          <mastertableview commanditemdisplay="None" autogeneratecolumns="false" datakeynames="MailID"
            insertitempageindexaction="ShowItemOnCurrentPage" ShowFooter="True">
                    <CommandItemSettings AddNewRecordText="New" />
                                    <Columns>
                                         
                                        <telerik:GridTemplateColumn UniqueName="MailTo" HeaderText="ID">
                                            <ItemTemplate>
                                                <asp:Label ID="DeptProject" Text='<%# Eval("ChatTo") %>' runat="server"></asp:Label>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                               <wssawc:PeopleEditor AllowEmpty="true" ValidatorEnabled="true" ID="peTo"
                                              runat="server" ShowCreateButtonInActiveDirectoryAccountCreationMode="true" SelectionSet="User"
                                              SharePointGroup="To" Width="275px" MultiSelect="true" AutoPostBack="false" CommaSeparatedAccounts='<%# Bind("ChatTo") %>' />
                                              <asp:CustomValidator ID="CustomValidator2" runat="server" ErrorMessage="To is required."
                                              ClientValidationFunction ="validateSecond" EnableClientScript="true" Display="None"
                                              ControlToValidate="peTo" SetFocusOnError="true"></asp:CustomValidator>
                                            </EditItemTemplate>
                                        </telerik:GridTemplateColumn>
 
                                         <telerik:GridTemplateColumn UniqueName="MailCc" HeaderText="Project/Phase/Dept Code">
                                            <ItemTemplate>
                                                <asp:Label ID="ProjPhaseDeptCode" Text='<%# Eval("ChatCc") %>' runat="server"></asp:Label>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <wssawc:PeopleEditor AllowEmpty="true" ValidatorEnabled="true" ID="peCc"
                                               runat="server" ShowCreateButtonInActiveDirectoryAccountCreationMode="true" SelectionSet="User"
                                               SharePointGroup="Cc" Width="275px" MultiSelect="true" AutoPostBack="false" CommaSeparatedAccounts='<%# Bind("ChatTo") %>' />
                                                <asp:CustomValidator ID="CustomValidator2" runat="server" ErrorMessage="To is required."
                                              ClientValidationFunction ="validateSecond" EnableClientScript="true" Display="None"
                                              ControlToValidate="peCc" SetFocusOnError="true"></asp:CustomValidator>
                                            </EditItemTemplate>
                                        </telerik:GridTemplateColumn>
                  
                                         <telerik:GridTemplateColumn UniqueName="MailSubject" HeaderText="Subject">
                                            <ItemTemplate>
                                                <asp:Label ID="GSTTaxCode" Text='<%# Eval("ChatSubject") %>' runat="server"></asp:Label>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <asp:TextBox ID="txtChatSubj" runat="server"></asp:TextBox>
                                                <%--<RequiredFieldValidator ForeColor="Red" Text="*This field is required"></RequiredFieldValidator>--%>
                                            </EditItemTemplate>
                                        </telerik:GridTemplateColumn>
 
                                       <telerik:GridTemplateColumn UniqueName="MailContent" HeaderText="Content">
                                            <ItemTemplate>
                                                <asp:Label ID="GSTTaxCode" Text='<%# Eval("ChatContent") %>' runat="server"></asp:Label>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <asp:TextBox ID="txtChatSubj" runat="server"></asp:TextBox>
                                                <%--<RequiredFieldValidator ForeColor="Red" Text="*This field is required"></RequiredFieldValidator>--%>
                                            </EditItemTemplate>
                                        </telerik:GridTemplateColumn>                                      
                                         
                                    </Columns>
                                    <EditFormSettings>
                                        <EditColumn ButtonType="ImageButton" />
                                    </EditFormSettings>
                                    <PagerStyle AlwaysVisible="True" PageSizeControlType="RadComboBox" />
                   </mastertableview>
            </telerik:RadGrid>
 
 
    </div>
    </form>
</body>
<wssawc:PeopleEditor /> this control is share point control.

Please reply how to achieve it? Thanks in advance.

Priyanka
Top achievements
Rank 1
 asked on 08 Jun 2015
2 answers
104 views

I am using Telerik RadGrid in my project.

I have a "Datetime" column (CreatedDate) in RadGrid, in which records are shown from SQL Database using DataSource.

 

<asp:ObjectDataSource ID="odsDocumentHistoryAdmin" runat="server" SelectMethod="Query" TypeName="atQuest.Projects.ABC.IPRRequest" SortParameterName="orderBy">
    <SelectParameters>
        <asp:ControlParameter ControlID="ddlStatus" Name="status" PropertyName="SelectedValue"
            Type="Int32" ConvertEmptyStringToNull="true"  />
        <asp:ControlParameter ControlID="txtSearch" Name="searchValue" PropertyName="Text"
            Type="String" ConvertEmptyStringToNull="true" />
    </SelectParameters>
</asp:ObjectDataSource>
 
<telerik:RadGrid ID="qgDocumentHistoryAdmin" runat="server" DataSourceID="odsDocumentHistoryAdmin"
            AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True" ShowGroupPanel="True"
            CellSpacing="0" GridLines="None" Width="100%" Skin="Outlook">
            <ClientSettings AllowDragToGroup="True" />
            <GroupingSettings CaseSensitive="false"></GroupingSettings>
            <MasterTableView AllowFilteringByColumn="true" AllowMultiColumnSorting="false" AutoGenerateColumns="false"
                CommandItemDisplay="Top" DataKeyNames="RequisitionNo" EnableGroupsExpandAll="true"
                GroupLoadMode="Client" PageSize="50">
                <CommandItemSettings ShowAddNewRecordButton="false" ShowExportToExcelButton="true" />
                <SortExpressions>
                    <telerik:GridSortExpression FieldName="RequisitionNo" SortOrder="Descending" />
                </SortExpressions>
                <PagerStyle AlwaysVisible="True" PageSizeControlType="RadComboBox" Position="Bottom" PageSizes="50,100,150,200" />
                <Columns>
 
                    <telerik:GridBoundColumn DataField="CreatedDate" HeaderText="Submit Date" SortExpression="CreatedDate"
                        UniqueName="CreatedDate" FilterDelay="2000" ShowFilterIcon="false" DataFormatString="{0: dd/MM/yyyy hh:mm:ss tt}">
                    </telerik:GridBoundColumn>
 
                </Columns>
            </MasterTableView>
            <ExportSettings SuppressColumnDataFormatStrings="True" IgnorePaging="True" ExportOnlyData="True" Excel-Format="ExcelML" OpenInNewWindow="True" FileName="eAPDocHistory" Excel-FileExtension="xls">
            </ExportSettings>
        </telerik:RadGrid>

Few records in Database "DateTime" column have NULL value and few records have proper date and time.

When I run my Web Page, everytime I get "01/01/0001 12:00:00 AM" datetime format in RadGrid "DateTime" column, for all the records.

Despite of proper records in Database, output is not as per expectation.

 

I am new to ASP.NET as well as Telerik Controls. Please reply what I am missing in my code.

Thanks in advance.

Priyanka
Top achievements
Rank 1
 answered on 08 Jun 2015
1 answer
273 views

Hi all, I wanted to use a radgrid as a way to enter data for a couple columns (Using DropDown's) and the CommandItem as the button to insert new rows. 

I don't want to attach a Datasource to this, I just want to enter data, then loop through the rows and insert to SQL. I saw other posts about this with no answer or links to broken pages.

 <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateEditColumn="True" CellSpacing="0"  GridLines="None">
                    <ClientSettings>
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
        <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" DataSourceID="sdsDisks">
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                    </telerik:GridEditCommandColumn>
                <telerik:GridDropDownColumn FilterControlAltText="Filter Disk_Speed column" HeaderText="Disk Speed" UniqueName="Disk_Speed">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text="" />
                    </ColumnValidationSettings>
                </telerik:GridDropDownColumn>
                <telerik:GridDropDownColumn FilterControlAltText="Filter Disk_Size_In_GB column" HeaderText="Disk Size in GB" UniqueName="Disk_Size_In_GB">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text="" />
                    </ColumnValidationSettings>
                </telerik:GridDropDownColumn>
                </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn1 column" UniqueName="EditCommandColumn1">
                </EditColumn>
            </EditFormSettings>
            </MasterTableView>
        </telerik:RadGrid>

Angel Petrov
Telerik team
 answered on 08 Jun 2015
1 answer
452 views
I have a Telerik RadGrid and trying to export the contents to Excel / CSV but depending upon what I do / try, get one of two errors and hoping someone could help.
Error 1:  "Unhandled exception at line 15, column 9936 in http://localhost:4940/Telerik.Web.UI.WebResource.axd?"I get this error when trying to export the contents using the following ImageButton click event.....Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal args As Web.UI.ImageClickEventArgs) Handles ImageButton1.Click
        Try
            Dim s As String = String.Empty
            Dim exp As InvReport = New InvReport()            s = exp.GenerateInvReport()            Response.ClearContent()
            Response.ContentType = "text/comma-separated-values"
            Response.AddHeader( _
                "content-disposition", _
                "attachment; filename=" + _
                "export.csv")
            Response.Buffer = True
            Response.Write(s)
            Response.Flush()        Catch ex As Exception
            Response.Clear()
            Response.Write(ex.ToString())
            Response.Flush()
            Response.End()
        End Try        Response.End()
    End Sub
Error 2:When researching, I see that the Telerik Grid has a built in feature to allow you to export the grid's contents.  However:  this doesn't work either.  When I try the following:RadGrid1.ExportSettings.ExportOnlyData = True
RadGrid1.ExportSettings.IgnorePaging = True
RadGrid1.ExportSettings.OpenInNewWindow = True
RadGrid1.MasterTableView.ExportToCSV()
It appears the grid is "exported", but instead of opening the "Open / Save" dialog box, it just shows the contents in the same window, just one big grid without any paging.  It doesn't open a new window or anything. 
Kostadin
Telerik team
 answered on 08 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?