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

I would like to select and fire the event of the first row of a grid on loading time, server side.

How to select a row is easy 

RagGrid1.Items[0].Selected = true;

but this doesn't fire the event

OnItemCommand="..."

 

any idea ?

thanks

Renato

Attila Antal
Telerik team
 answered on 26 Apr 2023
0 answers
101 views

None of the the stripping options allows me to clean the style tag from this paragraph:

 

<p style="color: #000000; margin: 0cm;">Wondzorg Nijmegen is een samenwerkingsverband tussen A-NIMO, het Canisius-Wilhelmina Ziekenhuis, ATC (Apothekers Thuiszorg Co&ouml;rdinatiecentrum), ZZG Zorggroep en NEO Huisartsenzorg.</p>

I have also tested in your demo environment.

How to achieve this?

 

Marc

 

Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 asked on 25 Apr 2023
1 answer
258 views

My page logic is that I click on an 'Apply' button, then in the Apply_Click method, I do some data binding, such as: Grid1.Datasource = xxx; Grid1.DataBind(); . And the grid can show properly on the page. But when I click on other buttons on this page (for example: click the filter on the grid) to trigger a post back, the content on the grid just disappears (The datasource is stored in a session, so it's not datasource's problem). I need to add databind() to Page_Load() to prevent this from happening. But this is very weird and feels not right. Can you help me locate the real problem?

The same issue is happening bothe in Grid and OrgChart.

Doncho
Telerik team
 answered on 25 Apr 2023
1 answer
293 views

I read this , but when I copied the code into my own project and followed the documentation, this just didn't work. The node size and the group size are weird.  No matter how I tried to edit the css settings, the height of the node just wouldn't change. Can anybody help me?

And btw I also want to ask, what do  .rocItem and .rocItemContent mean? When I use my browser's inspect function, I also see a .rocItemTemplate, what is that?

Doncho
Telerik team
 answered on 25 Apr 2023
0 answers
135 views

hi 

I use radGrid with the following code:

         <telerik:RadGrid  
                ID="RadGrid_Fibers"  
                RenderMode="Auto"
                GridLines="Both" runat="server"
                Skin="Sunset"
                DataSourceID="SqlDataSource1_SP_Tow_Prog_Fibers_Select"
                AutoGenerateColumns="False">

                <MasterTableView Width="100%" ShowFooter="True"
                    DataSourceID="SqlDataSource1_SP_Tow_Prog_Fibers_Select"
                    DataKeyNames="TowProgFibers_ID">

                    <GroupByExpressions>
                        <telerik:GridGroupByExpression>
                            <SelectFields>
                                <telerik:GridGroupByField FieldAlias="Tow_Had" FieldName="Tow_Had" FormatString="" HeaderText="" />
                            </SelectFields>
                            <GroupByFields>
                                <telerik:GridGroupByField FieldAlias="Tow_Had" FieldName="Tow_Had" FormatString="" HeaderText="" />
                            </GroupByFields>
                        </telerik:GridGroupByExpression>
                    </GroupByExpressions>


  that when a skin such as sunset is used, radGrid works without problems.

But when I don't want to use skin and Skin ="" is set with an error:

Unable to cast object of type 'Telerik.Web.UI.GridImageButton' to type 'Telerik.Web.UI.ElasticButton'

How to solve this problem? please help.

Mohamad Javad
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 24 Apr 2023
1 answer
111 views

Hello, everyone. I'm a novice. I don't how to use the <GridImageColumn>, I have a request to display qualified  photos from a remote computer.

For example, A textbox inputs 'abc',then I click the button of 'submit', the <GridImageColumn> or another control should find and display the 'abc.jpg' from the remote computer. The remote TargetFolder url just like '\\123.**.***.***\photo' and I hope it will be shown in <DetailTables> .

How should I edit the back-end code, so that I could get the pictures and also display it. I will post my code.

I'd really appreciate it if you could help me!

<telerik:RadPageView runat="server" ID="RadPageView3">
                 <telerik:RadAjaxPanel ID="RadAjaxPanel3" runat="server" LoadingPanelID="RadAjaxLoadingPanel1" BackColor="#FFFFFF">                 
                     <div class="ContentRow">
                        <div class="column c1 ">
                            <telerik:RadLabel ID="labcrate" runat="server" Text="LabCrate" CssClass="LabOnRight" ForeColor="#000000"></telerik:RadLabel>
                        </div>
                        <div class="column c2 ">
                             <telerik:RadTextBox ID="txtCrate" runat="server"></telerik:RadTextBox>
                        </div>
                         <div class="column c3 ">
                            <telerik:RadButton ID="btnSubmit" runat="server" Text="Submit" AutoPostBack ="true"></telerik:RadButton>
                        </div>
                    </div>

                     <telerik:RadGrid RenderMode="Lightweight" runat="server" ID="RG_Carrier" Height="740px" AllowPaging="true" PageSize="10" AllowAutomaticDeletes="false"
                        AllowAutomaticUpdates="false" AllowAutomaticInserts="false" AllowFilteringByColumn="false" AllowMultiRowSelection="true"  OnNeedDataSource="RadGrid_NeedDataSource" >
                         <PagerStyle Position="Bottom" AlwaysVisible="true" PageSizes="10,20,30"></PagerStyle>
                        <ClientSettings EnableAlternatingItems="true" AllowKeyboardNavigation="False" EnablePostBackOnRowClick="true">
                            <Selecting AllowRowSelect="false" />
                            <Scrolling AllowScroll="true" UseStaticHeaders="true"></Scrolling>
                        </ClientSettings>
                         <AlternatingItemStyle BackColor ="LightBlue" />
                          <MasterTableView DataKeyNames="CrateNo" AutoGenerateColumns="false" CommandItemDisplay="Top" EditMode="PopUp">
                            <CommandItemSettings ShowAddNewRecordButton="false" />
                            <Columns>
                                  <telerik:GridBoundColumn AllowFiltering="false" FilterControlWidth="120px" AutoPostBackOnFilter="true" DataField="CrateNo" UniqueName="CrateNo" HeaderText="CrateNo">
                                    <HeaderStyle Width="150px" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn AllowFiltering="false" DataField="Qty" UniqueName="Qty" HeaderText="Qty">
                                    <HeaderStyle Width="60px" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn AllowFiltering="false" FilterControlWidth="120px" AutoPostBackOnFilter="true" DataField="ProductName" UniqueName="ProductName" HeaderText="ProductName">
                                    <HeaderStyle Width="150px" />
                                </telerik:GridBoundColumn>  

                                
                            </Columns>                                     
                               <DetailTables>
                                <telerik:GridTableView DataKeyNames="CratePhoto" ClientDataKeyNames="CratePhoto" runat="server" CommandDisplay="None" AutoGenerateColumns="true" AllowPaging="false" EditMode="PopUp">
                                    <Columns>
                                        <telerik:GridImageColumn DataType="System.String" 
  DataImageUrlFormatString="" 
  ImageAlign="Middle" ImageHeight="110px" ImageWidth="90px" HeaderText="CratePhoto">
</telerik:GridImageColumn>
    
                                    </Columns>
                                </telerik:GridTableView>
                            </DetailTables>
                        </MasterTableView>

                    </telerik:RadGrid>
                     
                      </telerik:RadAjaxPanel>
            </telerik:RadPageView>

Attila Antal
Telerik team
 answered on 24 Apr 2023
1 answer
195 views

Does the functionality exist to format a range of cells as a table like can be done in Excel?

I use the data provider to read the format of an existing Excel file.

But, a range of cells formatted as a table is not copied into the RadSpreadsheet.

Attila Antal
Telerik team
 answered on 24 Apr 2023
12 answers
2.7K+ views
I'm unclear as to what is causing this error but until recently this error was never being thrown. 
Here's the details:
1. Clicking on  a nav bar to load an .ascx page that's inside another .ascx page
2. Page never loads and appears to hang.
3. No server side errors are found during debugging so it appears to be client side

Here's the error message from Google Chrome's Developer Tools Console:
Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500 Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_rsm_TSM&compre…e35%3aen-US%3a7263e9c6-5962-41bc-b839-88b704bfcf0d%3aea597d4b%3ab25378d2:6
Error.create Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_rsm_TSM&compre…e35%3aen-US%3a7263e9c6-5962-41bc-b839-88b704bfcf0d%3aea597d4b%3ab25378d2:6
Sys.WebForms.PageRequestManager._createPageRequestManagerServerError Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_rsm_TSM&compre…35%3aen-US%3a7263e9c6-5962-41bc-b839-88b704bfcf0d%3aea597d4b%3ab25378d2:15
Sys.WebForms.PageRequestManager._parseDelta Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_rsm_TSM&compre…35%3aen-US%3a7263e9c6-5962-41bc-b839-88b704bfcf0d%3aea597d4b%3ab25378d2:15
Sys.WebForms.PageRequestManager._onFormSubmitCompleted Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_rsm_TSM&compre…35%3aen-US%3a7263e9c6-5962-41bc-b839-88b704bfcf0d%3aea597d4b%3ab25378d2:15
(anonymous function) Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_rsm_TSM&compre…e35%3aen-US%3a7263e9c6-5962-41bc-b839-88b704bfcf0d%3aea597d4b%3ab25378d2:6
(anonymous function) Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_rsm_TSM&compre…e35%3aen-US%3a7263e9c6-5962-41bc-b839-88b704bfcf0d%3aea597d4b%3ab25378d2:6
Sys.Net.WebRequest.completed Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_rsm_TSM&compre…e35%3aen-US%3a7263e9c6-5962-41bc-b839-88b704bfcf0d%3aea597d4b%3ab25378d2:6
_onReadyStateChange Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_rsm_TSM&compre…e35%3aen-US%3a7263e9c6-5962-41bc-b839-88b704bfcf0d%3aea597d4b%3ab25378d2:6

Any ideas how I should try to trouble shoot this? Is it a page lifecycle issue?
Jason
Archana
Top achievements
Rank 1
Iron
 answered on 21 Apr 2023
1 answer
164 views

Is there a purpose of the Save Icon on the Home tab toolbar?

I would like to capture some kind of event when a user clicks this icon to direct it to my SaveWorkbook method override in my custom provider.

But, I don't see any such method implemented that can override.

If no ability exists to do this, why then is the icon even there?

 

Doncho
Telerik team
 answered on 21 Apr 2023
0 answers
110 views

So I have a organization chart and a button. When I click on the button, I will fill in a DataTable stored in ViewState to be the data source of the org chart. Since I'm still having the problem in another post that nobody replied yet: Databinding keeps disappearing when post back in UI for ASP.NET AJAX | Telerik Forums  So I add some handling in Page_Load to avoid the org chart from becoming blank.

My Page logic is as follows:


<Telerik:RadButton ID="btn1" OnClick="btn_click">
...
<Telerik:RadOrgChart ID="OrgChart1">



protected DataTable table1 { get { if (ViewState["table1"] != null) return (DataTable)ViewState["table1"]; else

return null; } set { ViewState["table1"] = value; } } protected DataTable table2 { get { if (ViewState["table2"] != null) return (DataTable)ViewState["table2"]; else return null; } set { ViewState["table2"] = value; } } protected void Page_Load(object sender, EventArgs e) { if (!PostBack) // do something

if (table1 != null && table2!=null) { OrgChart1.GroupEnabledBinding.NodeBindingSettings.DataFieldID = "aaa"; OrgChart1.GroupEnabledBinding.NodeBindingSettings.DataFieldParentID = "bbb"; OrgChart1.GroupEnabledBinding.NodeBindingSettings.DataCollapsedField = "ccc"; OrgChart1.RenderedFields.NodeFields.Add(new OrgChartRenderedField() { DataField = "A" }); OrgChart1.GroupEnabledBinding.NodeBindingSettings.DataSource = table1; OrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataFieldNodeID = "aaa"; OrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataFieldID = "ddd"; OrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataSource = table2; OrgChart1.DataBind(); } }



protected void btn_click(object sender, EventArgs e) {

               // do something to provide data for table1 and table2

                OrgChart1.GroupEnabledBinding.NodeBindingSettings.DataFieldID = "aaa";
                OrgChart1.GroupEnabledBinding.NodeBindingSettings.DataFieldParentID = "bbb";
                OrgChart1.GroupEnabledBinding.NodeBindingSettings.DataCollapsedField = "ccc";
                OrgChart1.RenderedFields.NodeFields.Add(new OrgChartRenderedField() { DataField = "A" });
                OrgChart1.GroupEnabledBinding.NodeBindingSettings.DataSource = table1;

                OrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataFieldNodeID = "aaa";
                OrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataFieldID = "ddd";
                OrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataSource = table2;

                OrgChart1.DataBind();

}

    

And then, when the page is post back, suddenly there are duplicate group names in the org chart as you can see in the screenshot.

Can somebody help me?

yuki
Top achievements
Rank 2
Iron
Iron
Iron
 updated question on 21 Apr 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?