Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
149 views

RadGrid1 + SqlDataSource1(SQL NOT USED parameter) = WORK

GridView1 (Standart) + SqlDataSource1(SQL USED parameter) = WORK

RadGrid1 + SqlDataSource1 (SQL USED parameter) = NOT WORK

Problem: Only telerik not updated schema and not set data in Grid(empty). Standalone GridView - worked. It is bub or please give informations what is user parameters in mySQL query.

Manual dont worked (https://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/column-types/defaultcs.aspx)

 

RadGrid1

<telerik:RadGrid ID="RadGrid1" runat="server" Culture="ru-RU" DataSourceID="SqlDataSource1" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" OnDeleteCommand="RadGrid1_DeleteCommand" OnEditCommand="RadGrid1_EditCommand" AllowAutomaticDeletes="True" Skin="Glow" CellSpacing="-1" GridLines="Both" Width="603px">
<GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
        <ExportSettings>
            <Pdf PageWidth="">
            </Pdf>
        </ExportSettings>
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="SqlDataSource1">
            <Columns>
                <telerik:GridBoundColumn DataField="id" DataType="System.Int32" FilterControlAltText="Filter id column" HeaderText="id" ReadOnly="True" SortExpression="id" UniqueName="id">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="title" FilterControlAltText="Filter title column" HeaderText="title" SortExpression="title" UniqueName="title">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="type" FilterControlAltText="Filter type column" HeaderText="type" SortExpression="type" UniqueName="type">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="city" FilterControlAltText="Filter city column" HeaderText="city" SortExpression="city" UniqueName="city">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="address" FilterControlAltText="Filter address column" HeaderText="address" SortExpression="address" UniqueName="address">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="area" DataType="System.Single" FilterControlAltText="Filter area column" HeaderText="area" SortExpression="area" UniqueName="area">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="comment" FilterControlAltText="Filter comment column" HeaderText="comment" SortExpression="comment" UniqueName="comment">
                </telerik:GridBoundColumn>
            </Columns>
            <GroupByExpressions>
                <telerik:GridGroupByExpression>
                </telerik:GridGroupByExpression>
            </GroupByExpressions>
        </MasterTableView>
</telerik:RadGrid>

 

SqlDataSource1

<asp:SqlDataSource ID="SqlDataSource1"
    runat="server"
    ConnectionString="<%$ ConnectionStrings:xesko %>"
      ProviderName="<%$ ConnectionStrings:xesko.ProviderName %>"
    SelectCommand="SELECT id, title, type, city, address, area, comment FROM building WHERE (id IN (SELECT id_building FROM user_atributes WHERE (id_user = @id_user)))"
 
  <SelectParameters>
    <asp:Parameter Name="id_user" Type="Int32" DefaultValue="100" />
  </SelectParameters>
 
</asp:SqlDataSource>

 

GridView1 - standart - work

<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1"></asp:GridView>

 

USED:

Visual Studio 2017 (15.5.7)

MySQL server 5.6

MySQL for Visual Studio 2.0.5 (MySQL Database (MySQL Data Provider))

MySQL Connector/ NET  6.9.9

Telerik ASP.NET Ajax 2017.2.503

 

 

andalit
Top achievements
Rank 1
 answered on 01 Mar 2018
0 answers
87 views

Hi,

I've an aspx page that contains a telerik grid, after an upgrade of Telerik.Web.UI.dll I started to get the following exception
"chrome.app is not available" I don't know if this related to inner call by the grid or other component.

the upgrade were from version 2013.1.* to 2014.3.1209.45.

How can I fix the issue ?

majdee
Top achievements
Rank 1
 asked on 01 Mar 2018
9 answers
114 views

When selecting a full table, by a standard, we get text selection, but we get the table selected (we can copy/paste the table)

Ive seen on docs you can change cell selection type to MultiCell, then you can shift+click and select cells, and its pretty much the same as the above however the visual selection is slightly different. In this case, however you cannot select texts manually like before.

I know you can change this selection type during runtime, but only in the backend is that right ?

What would be a good aproach to solve this problem ? Only do cell selection when shift is pressed, else do a normal selection.

Would apreciate any help !!

Best regards to Telerikers :)

Rumen
Telerik team
 answered on 01 Mar 2018
8 answers
347 views

Hello

I get sometimes a runtime error in production:

Message: Object reference not set to an instance of an object.
StackTrace:    at Telerik.Web.UI.RadEditor.<get_Text>b__b(Match m)
   at System.Text.RegularExpressions.RegexReplacement.Replace(MatchEvaluator evaluator, Regex regex, String input, Int32 count, Int32 startat)
   at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator)
   at System.Text.RegularExpressions.Regex.Replace(String input, String pattern, MatchEvaluator evaluator, RegexOptions options)
   at Telerik.Web.UI.RadEditor.get_Text()
   at xyz.CN_BL.cnExportMethodsBL.writeEXTFlat(List`1 toWriteInSheet, SpreadsheetDocument xlDoc, WorkbookPart workbookPart, WorksheetPart& worksheetPart, Int32 iColIndex, ExtWert extW, Stamm st, Sheet sh, UInt32& indexRow, AdminTexte at, Int32 aktSprache) in C:\Projekte\xyz\CN_BL\cnExportMethodsBL.cs:line 11826
   at xyz.CN_BL.cnExportMethodsBL.doExport(IObjectScope myScope, String& strShortenFileNameToUse, MemoryStream& mStream, Int32[] Export_Ids, Int32[] Export_IdsStamm, exportMode ExportMode, exportTyp ExportTyp, exportTyp ExportTypOriginal, Sprache aktSprache, Boolean bModulWFAktiv, Int32 FirmaId, Int32 ExportSprache, String strFileName, String& strError) in C:\Projekte\xyz\Web\CN_BL\cnExportMethodsBL.cs:line 6640
   at xyz.CN_BL.FileFunctions_BL.startExportBackground(Object Param) in C:\Projekte\xyz\Web\CN_BL\FileFunctions_BL.cs:line 1212
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart(Object obj)

The error does not occur every time. My guess: the more data is processed, the more likely the w3wp.exe crashes, or more specific, the special export thread crashes.
I can not reproduce the error in the development environment.

Creation of the error:
The user wants to export data. The web server starts a separate thread for writing datas into an excel file (via MemoryStream). Codesnippet from the export method:

Loop, which calls the writeEXTFlat() methods multiple times

{
// static method writeEXTFlat()
  ... some code ...

  Line 11826:  Telerik.Web.UI.RadEditor re = new Telerik.Web.UI.RadEditor();

  ... more code without touching RadEditor ...

  foreach (int i =0; x < exportRecs; i++)
  {

     ... more code without touching RadEditor ...

     re.Content = strExportDataWithHTML;
     string strToExport = re.Text;

     ... more code without touching RadEditor ...
  }

}

My question : Any idea why this error can happen? It makes totaly no sense to me. strExportDataWithHTML is always at least an empty string.

TIA
Markus

Markus
Top achievements
Rank 1
 answered on 01 Mar 2018
1 answer
230 views
Is it possible to use persistence framework to persist column settings when the radgrid is set AutoGeneratedColumns =true? 
Marc
Top achievements
Rank 1
 answered on 28 Feb 2018
8 answers
171 views
Hi, 
I have used radgrid to display some search records. However, I am not able to records like "<keyword>" which are however returned from the stored procedure and part of the datasource that is used to bind.

<telerik:GridHyperLinkColumn DataTextFormatString="{0}" DataNavigateUrlFields="Id"
                                                                    DataNavigateUrlFormatString="/sites/abc/xyz/vhj/Pages/view.aspx?id={0}&ReturnUrl=/Pages/Search.aspx"
                                                                    UniqueName="ItemTitle" DataTextField="Title" HeaderText="Title" SortExpression="Title"
                                                                    HeaderStyle-CssClass="ms-toolbar" HeaderStyle-Width="17%" HeaderStyle-HorizontalAlign="Left"
                                                                    ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" SortAscImageUrl="/_layouts/Images/abc/SortAsc.gif"
                                                                    SortDescImageUrl="/_layouts/Images/abc/SortDesc.gif" DataType="System.String" >
                                                                </telerik:GridHyperLinkColumn>
This is my column definition.

Can you please let me know if there is a workaround for this or this is a feature?
Vibhu
Top achievements
Rank 1
 answered on 28 Feb 2018
2 answers
75 views

Hello,

I followed this example to create a column chart: https://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/chart-types/column-chart

Now I only want one column per serie, how can I archieve that?

Thanks.

Daniel
Top achievements
Rank 1
 answered on 27 Feb 2018
2 answers
569 views
Hi there,

Here is a problem I met when using RadAsyncUpload. The files under \App_Data\RadUploadTemp were not completed removed after the timespan specified in TemporaryFileExpiration (10 minutes). In my project, I uploaded 19 files, only 17 files were removed from the temp folder after 15 mins. The other two files were still left in the folder. We did not use UploadedFile.SaveAs() in our project, we use read via Input Stream instead.

According to this thread, http://www.telerik.com/forums/how-to-delete-temporary-file,  the files are supposed to be removed completed, while it is not true in my project. Is there any way to ensure all the files under the temp folder be removed after a certain amount of time? Please help. Any suggestions is much appreciated. 
Richard
Top achievements
Rank 1
 answered on 27 Feb 2018
11 answers
1.5K+ views
Hi,

SelectedIndexChanged event of RadGrid is not fired.
Please help me with an example how to fire SelectedIndexChanged event of RadGrid.
Attila Antal
Telerik team
 answered on 27 Feb 2018
1 answer
132 views

I am trying to apply the modal setting for advanced insert, and it pops up, but with no background, see attached image.

 

My code for the template is:

 

<AdvancedInsertTemplate>
                        <div class="rsAdvancedEdit rsAdvancedModal" style="position: relative">
                            <div class="rsModalBgTopLeft"></div>
                            <div class="rsModalBgTopRight"></div>
                            <div class="rsModalBgBottomLeft"></div>
                            <div class="rsModalBgBottomRight"></div>
                            <div class="rsAdvContentWrapper">
                                <telerik:RadComboBox ID="InsertComboBox" runat="server" Label="Ordre                "
                                    DataSourceID="Insert" DataTextField="Titel" DataValueField="ID" Text='<%# Bind("Subject") %>' Skin="Metro">
                                </telerik:RadComboBox>
                                <telerik:RadDateTimePicker ID="StartInput" runat="server" Width="50%" Skin="Metro" SelectedDate='<%# Bind("Start") %>'>
                                    <Calendar runat="server" Enabled="false"></Calendar>
                                    <TimeView runat="server" StartTime="16:00" Interval="00:15" Columns="4"></TimeView>
                                    <DateInput runat="server" Label="Tænd"></DateInput>
                                    <DatePopupButton Visible="false" />
                                </telerik:RadDateTimePicker>
                                <br />
                                <telerik:RadDateTimePicker ID="EndInput" runat="server" DateInput-Label="Sluk" Skin="Metro"
                                    TimeView-Interval="00:30" TimeView-Columns="6" SelectedDate='<%# Bind("End") %>'>
                                    <Calendar runat="server" Enabled="false"></Calendar>
                                    <TimeView runat="server" StartTime="16:00" Interval="00:15" Columns="4"></TimeView>
                                    <DateInput runat="server" Label="Sluk"></DateInput>
                                    <DatePopupButton Visible="false" />
                                </telerik:RadDateTimePicker>
                                <br />
                                <telerik:RadSchedulerRecurrenceEditor ID="InsertRecurrenceEditor" runat="server" Visible="true" RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' Skin="Metro"></telerik:RadSchedulerRecurrenceEditor>
                                <asp:HiddenField runat="server" ID="OriginalRecurrenceRule" />
                                <asp:Panel runat="server" ID="ButtonsPanel" CssClass="rsAdvancedSubmitArea">
                                    <div class="rsAdvButtonWrapper">
                                        <telerik:RadImageButton ID="InsertButton" runat="server" Text="Tilføj" CommandName="Insert" Skin="Metro">
                                        </telerik:RadImageButton>
                                        <telerik:RadImageButton ID="InsertCancelButton" runat="server" Text="Luk" CausesValidation="false" CommandName="Cancel" Skin="Metro">
                                        </telerik:RadImageButton>
                                    </div>
                                </asp:Panel>
                            </div>
                        </div>
                    </AdvancedInsertTemplate>
Peter Milchev
Telerik team
 answered on 27 Feb 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?