Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
102 views

I have a rather complex site, starting with a page that includes RadTabStrip, that dynamically loads user controls based on the tab.  Within the user control, there are various controls - however, specifically one has a repeater.

Within the Repeater, I am attempting to add a command button (update) using a CommandArgument.  However within the code behind using the 'OnItemCommand' I am unable to reference any of the controls within the repeater.  They are always null/empty. 

Ways I have attempted to locate:

Dim c1 As String = CType(repeaterControl.Items(e.Item.ItemIndex).FindControl("txComments"), RadTextBox).Text

---------
Dim lb As LinkButton = CType(e.CommandSource, LinkButton)
Dim txBoxValue As String = CType(lb.Parent.FindControl("txComments"), RadTextBox).Text

-----------
Dim txComments As String = CType(e.Item.FindControl("txComments"), RadTextBox).Text

I have tried many different way to attempt to gain this information - but they all appears empty.  I have found that this is due to the user controls being loaded dynamically - but I am working within an establish project, and unable to change that part.  Is there a way to locate these controls within this type of set up.

Please assist and I have been researching this for days.

 

Rob
Top achievements
Rank 1
 asked on 12 Mar 2022
0 answers
86 views

Hi,

I'd like to dynamically change names of the second-level headers in RadGrid, but I've got no idea how to access to headers which are GridBoundColumn, not GridColumnGroup. When my grid have only GridBoundColumn headers there are no problem, but i've added GridColumnGroup and it stopped working. 

Could you help me to understand how to get headers of each level separately? Thanks!

 protected void RadGrid1_PreRender(object sender, EventArgs e)
            {   
                GridHeaderItem headerItem = STOCKTb.MasterTableView.GetItems(GridItemType.Header)[0] as GridHeaderItem;          
                Act = "select distinct Неделя_планир from REF_DATE where [Год-мес] = 202202 order by Неделя_планир";
                sqlCmd1 = new SqlCommand(Act, SqlConn);
                sqlDataAdap1 = new SqlDataAdapter(sqlCmd1);
                dtRecord1 = new DataTable();
                sqlDataAdap1.Fill(dtRecord1);
                if (dtRecord1.Rows.Count == 4)
                {
                    for (int i = 1; i < 5; i++)
                    {
                        headerItem[""+ i +""].Text = "Неделя " + Convert.ToString(dtRecord1.Rows[i-1][0]);
                        headerItem["1" + i + ""].Text = "Факт " + Convert.ToString(dtRecord1.Rows[i - 1][0]);
                    }
                }
                else if (dtRecord1.Rows.Count == 5)
                {
                    
                    for (int i = 1; i < 6; i++)
                    {
                        headerItem["" + i + ""].Text = "Неделя " + Convert.ToString(dtRecord1.Rows[i-1][0]);
                        headerItem["1" + i + ""].Text = "Факт " + Convert.ToString(dtRecord1.Rows[i - 1][0]);
                    }                    
                }              
            }

   <ColumnGroups>
                <telerik:GridColumnGroup HeaderText="Product Details" Name="21" HeaderStyle-HorizontalAlign="Center">
                </telerik:GridColumnGroup>
                <telerik:GridColumnGroup HeaderText="Location" Name="22">
                </telerik:GridColumnGroup>
                <telerik:GridColumnGroup HeaderText="Category" Name="23">
                </telerik:GridColumnGroup>
                <telerik:GridColumnGroup HeaderText="Order Details" Name="24" 
                    HeaderStyle-HorizontalAlign="Center">
                </telerik:GridColumnGroup>
                                    <telerik:GridColumnGroup HeaderText="Order Details" Name="25"
                    HeaderStyle-HorizontalAlign="Center">
                </telerik:GridColumnGroup>
            </ColumnGroups>
								<Columns>
									<telerik:GridBoundColumn DataField="Ассортимент_код"   HeaderText="Ассортиментная позиция">
										<ItemStyle Width="270px" />
									</telerik:GridBoundColumn>
									<telerik:GridBoundColumn Aggregate="Sum" DataField="1"   HeaderText="Неделя 9" ColumnGroupName="21" FooterText="Итого, кг: ">
										<ItemStyle Width="65px" />
									</telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn Aggregate="Sum" DataField="11"   HeaderText="Неделя 9" ColumnGroupName="21" FooterText="Итого, кг: ">
										<ItemStyle Width="65px" />
									</telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn Aggregate="Sum" DataField="2"   HeaderText="Неделя 10" ColumnGroupName="22" FooterText="Итого, кг: ">
										<ItemStyle Width="65px" />
									</telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn Aggregate="Sum" DataField="12"   HeaderText="Неделя 10" ColumnGroupName="22" FooterText="Итого, кг: ">
										<ItemStyle Width="65px" />
									</telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn Aggregate="Sum" DataField="3"   HeaderText="Неделя 11" ColumnGroupName="23" FooterText="Итого, кг: ">
										<ItemStyle Width="65px" />
									</telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn Aggregate="Sum" DataField="13"   HeaderText="Неделя 11" ColumnGroupName="23" FooterText="Итого, кг: ">
										<ItemStyle Width="65px" />
									</telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn Aggregate="Sum" DataField="4"   HeaderText="Неделя 12" ColumnGroupName="24" FooterText="Итого, кг: ">
										<ItemStyle Width="65px" />
									</telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn Aggregate="Sum" DataField="14"   HeaderText="Неделя 12" ColumnGroupName="24" FooterText="Итого, кг: ">
										<ItemStyle Width="65px" />
									</telerik:GridBoundColumn>
								</Columns>


 

Alina
Top achievements
Rank 1
 updated question on 12 Mar 2022
1 answer
266 views

I have a radcombobox and I add items with radcomboboxitems, how can I set a tooltip for each item in c#?

 

RadComboBox vRadComboBoxControl = new RadComboBox();

vRadComboBoxControl.ID = vCampo.CL_CAMPO;
vRadComboBoxControl.AutoPostBack = true;
vRadComboBoxControl.EmptyMessage = "Seleccionar";
vRadComboBoxControl.Width = Unit.Percentage(100);
vRadComboBoxControl.Filter = RadComboBoxFilter.Contains;
vRadComboBoxControl.ToolTip = vCampo.NB_TOOLTIP;

 

vRadComboBoxControl.Items.AddRange(oCatalogoValorNegocio.Obtener_C_CATALOGO_VALOR(ID_CATALOGO_LISTA: vIdCatalogoLista).Select(x => new RadComboBoxItem(x.NB_CATALOGO_VALOR.ToString(), x.ID_CATALOGO_VALOR.ToString())));
                           
Peter Milchev
Telerik team
 answered on 10 Mar 2022
1 answer
153 views

Hi There,

I have been reviewing quite a few forum posts and trying different suggestions, but I haven't found a solution that works for my situation. Help would be greatly appreciated. It's probably something simple that I'm missing.

I have a page that includes RadScriptManager, RadAjaxManager, RadSplitter, RadPane (with regular local content), RadSplitBar, and RadPane2 (contains other aspx pages like an iframe).

When RadPane2 contains another page, even if it's not an AJAX page, JavaScript calls to the RadAjaxManager from the primary page only fire the first time. I'm trying to call a method on the code behind page to update an item in a RadMenu.

If I have all the content is on one page without referring to a separate page, I can make multiple calls to the RadAjaxManager without problems.

Pieces of the code:

 <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
                <AjaxSettings>
                  <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="rmCounts"></telerik:AjaxUpdatedControl>
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
</telerik:RadAjaxManager>

 

        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server" >
        <script type="text/javascript" language="JavaScript">
             function countUpdate() {
                var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
                ajaxManager.ajaxRequest("updateCounts");
                return false;      }
        </script>
        </telerik:RadCodeBlock>

Example code behind method:

        public void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            updateCountsCodeBehind();
        }

 

Thanks,

Dan

Dan
Top achievements
Rank 1
Iron
 answered on 09 Mar 2022
0 answers
394 views

Good morning,

recently I downloaded latest version of Telerik dll files (2022.1.302.40) into my local machine. Change my web config files to pickup latest version:

<dependentAssembly>
      <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4" />
      <bindingRedirect oldVersion="2022.1.119.40" newVersion="2022.1.302.40" />
          </dependentAssembly>

 

However when I begin to build solution received a lot of errors:

1.Namespace 'Telerik' could not be found(are you missing a using directive or an assembly reference?)

2.the type or namespace  name 'Telerik' could not be found in the global namespace

3. When i open any aspx page see error: Could not load or assembly 'Telerik.Web.UI, version =2022.1.119.40 or one of its dependencies.

For some reason i think it is pointing to the previous version but cannot find where.

Please help me out with this.

Thanks.

Vitaly. 

Vitaly
Top achievements
Rank 1
Iron
Iron
 asked on 09 Mar 2022
19 answers
3.6K+ views

By default, RadSpell offers the following three dictionaries: English (en-US), German (de-DE) and French (fr-FR). All other dictionaries are provided by our customers and can be downloaded from the links below:

 

Please, note that some of the dictionaries can be incomplete and they are not supported by Telerik. If you create a new properly working dictionary and share it with our community, we will gladly award you for your work.

Starting from Q3 2010, we provide support for NHunspell and OpenOffice dictionaries for RadSpell. You can find how to enable this feature in the following code library project: Using OpenOffice spell provider in RadSpell.

Best regards,
The Telerik team

Rumen
Telerik team
 updated question on 09 Mar 2022
1 answer
417 views

When a user drags and drops a file from a third-party file management application we use into our own ticketing system the file is empty (0 KB in size).  This is an issue with their application for which I'm building a workaround.

The RadAsyncUpload control allows this file to be added to the upload files collection, and uploaded to the site.  An error is received when attempting to access this file, as one would expect.

Using the OnClientFileDropped event, I can read the file size property.  If it's 0, add it to an array that is then read in the OnClientFileUploading event.  If the current filename exists in this array, I cancel the upload. 

My preference would be to handle this all within the OnClientFileUploading event.  As of yet, I've been unable to read the file size within this event, and I'm presuming it is not available there.

Again, assuming I cannot get the file size property in this event, is there an event that occurs after the args.set_cancel(true) method is triggered, where I can remove these canceled uploads from the displayed list?

 

Doncho
Telerik team
 answered on 07 Mar 2022
1 answer
189 views

2022.1.119.45

<telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="CheckBox1" runat="server" OnCheckedChanged="ToggleRowSelection"
                                            AutoPostBack="True" />
                                    </ItemTemplate>
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="headerChkbox" runat="server" OnCheckedChanged="ToggleSelectedState"
                                            AutoPostBack="True" />
                                    </HeaderTemplate>
</telerik:GridTemplateColumn>

 

 

<input id="ctl00_ContentPlaceHolder2_grdAccounts_ctl00_ctl04_CheckBox1" type="checkbox" name="ctl00$ContentPlaceHolder2$grdAccounts$ctl00$ctl04$CheckBox1" onclick="javascript:setTimeout('__doPostBack(\'ctl00$ContentPlaceHolder2$grdAccounts$ctl00$ctl04$CheckBox1\',\'\')', 0)">

 

I've tried the template and the gridcheckboxcolumn.

 

Nothing displays no matter what approach I take.  I am using a NeedDataSource method.

 

I've searched the forums and tried pretty much everything I've found.

 

Please help.

Thanks,
Jason

Doncho
Telerik team
 answered on 07 Mar 2022
2 answers
645 views

Could not find file 'F:\01MAR2022\App_Data\RadUploadTemp\1646320159823WOW Event Welcome Sign_Headshots.pdf.tmp'

What could be the cause of such error, time out?

WaldenGajo
Top achievements
Rank 2
Iron
 answered on 07 Mar 2022
0 answers
134 views

Hi, I have a RadWindow which appears when the button is clicked. 

The code in aspx is:

<telerik:RadWindow ID="rwSubmitForReview" Title="Submit For Review" runat="server" Localization-PinOff="Pin off" Width="305px" Height="250px" InitialBehaviors="Pin" >

Code in aspx.cs is

string script = "function f(){$find(\"" + rwSubmitForReview.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
ScriptManager.RegisterStartupScript(this, this.GetType(), "key", script, true);

When i start to scroll down in the main page, the window disappears and i notice the top attribute follows the scroll? Please refer to the red highlighted line. How can I make it stop scrolling?

The telerik version is 2022.1.119.40.

Eugene
Top achievements
Rank 1
 asked on 04 Mar 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?