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

when I create a dynamically control within RadWizard, for example:

// Code Behind

Label mylabel = new Label ();             

myetiqueta.ID = "lbl" + step.UniqueID; // step is a variable type RadWizardStep             

etiqueta.Text = "Any Value"             

step.Controls.Add (label); // Add control

if I want to access control in the code behind, for example

RadWizard.WizardSteps [0] .Controls [0];
I do not have access to control, is there any solution?

Plamen
Telerik team
 answered on 23 Jun 2015
1 answer
336 views

I know I can do this with code, but is there no way to populate a Datasource InsertParameter from a control?  In this case I want to update the datasource of a second grid with a value in the selected row of the first grid.

<asp:SqlDataSource ID="dsCommodities" runat="server" ConnectionString="<%$ ConnectionStrings:Market_Directory.My.MySettings.dbConnStr %>" DeleteCommand="DELETE FROM [Commodity] WHERE [CommodityID] = @CommodityID" InsertCommand="INSERT INTO [Commodity] ([CommodityName], [SortOrder], [Published], [MaterialID]) VALUES (@CommodityName, @SortOrder, @Published, @MaterialID)" SelectCommand="SELECT [CommodityID], [CommodityName], [SortOrder], [Published], [MaterialID] FROM [Commodity] WHERE ([MaterialID] = @MaterialID) ORDER BY [SortOrder]" UpdateCommand="UPDATE [Commodity] SET [CommodityName] = @CommodityName, [SortOrder] = @SortOrder, [Published] = @Published, [MaterialID] = @MaterialID WHERE [CommodityID] = @CommodityID">
    <DeleteParameters>
        <asp:Parameter Name="CommodityID" Type="Int32" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter Name="CommodityName" Type="String" />
        <asp:Parameter Name="SortOrder" Type="Int32" />
        <asp:Parameter Name="Published" Type="Boolean" />
        <asp:ControlParameter ControlID="grdMaterials" DefaultValue="-1" Name="MaterialID" PropertyName="SelectedValue" Type="Int32" />
    </InsertParameters>
    <SelectParameters>
        <asp:ControlParameter ControlID="grdMaterials" DefaultValue="-1" Name="MaterialID" PropertyName="SelectedValue" Type="Int32" />
    </SelectParameters>
    <UpdateParameters>
        <asp:Parameter Name="CommodityName" Type="String" />
        <asp:Parameter Name="SortOrder" Type="Int32" />
        <asp:Parameter Name="Published" Type="Boolean" />
        <asp:Parameter Name="MaterialID" Type="Int32" />
        <asp:Parameter Name="CommodityID" Type="Int32" />
    </UpdateParameters>
</asp:SqlDataSource>

 

Viktor Tachev
Telerik team
 answered on 23 Jun 2015
3 answers
87 views

I've implemented StripFormattingOptions and StripFormattingOnPaste (set to AllExceptNewLines) to strip formatting and OnClientPasteHTML to display an alert to the user that the formatting is being stripped from the pasted text. This works fine in IE and Firefox, but in Chrome and Safari the OnClientPasteHTML also fires when the user hits the Enter key while in the Rad Editor.

 

Has anybody else seen this behavior and what can I do to resolve it (other than removing the alert)?

Ianko
Telerik team
 answered on 23 Jun 2015
1 answer
144 views

From what I can tell OnBatchEditCellValueChanged triggers on blur of the field. Am I correct in this assumption? 

Konstantin Dikov
Telerik team
 answered on 23 Jun 2015
1 answer
183 views

I am using the following code in my template to show social share buttons for FB, Twitter and LinkedIn.  A peculiar thing I am noticing is that the FB button doesn't always show and I am not observing any pattern for when it appears or hides.

<telerik:RadSocialShare ID="SocialShare" runat="server">
    <MainButtons>
        <telerik:RadFacebookButton />       
        <telerik:RadTwitterButton />
      <telerik:RadLinkedInButton />
    </MainButtons>
</telerik:RadSocialShare>

Has anyone else noticed this behaviour and found a solution?

Danail Vasilev
Telerik team
 answered on 23 Jun 2015
3 answers
334 views

The open sub menu function only works when the >
image is selected, not anywhere in the item (as would be expected)

But when going back the user can select any area in
the menu item and it will go back correctly (as you would expected)

 

It has been like this for some years or am I doing something wrong? 

James Shelton Agar
Top achievements
Rank 2
 answered on 23 Jun 2015
1 answer
652 views

Hi,

 I have master page and there are  child pages that is using ajaxmanager. Now  we had requirement to add one button on master page and if user click on this button, whole page don't need to be refresh. I was trying to add ajaxmanager on Masterpage but there was an error saying only one instance of ajaxmanager can be used. Is there any other way?

 Thank you.

 Best regards,

Ei Wai

 

Viktor Tachev
Telerik team
 answered on 23 Jun 2015
13 answers
702 views
Hi

I am trying to make my radgrid (which is wrapped in a usercontrol) "readonly".
For this I need to remove the "Add New Record" button and the "Edit" and "Delete" columns of the grid.
I have got the following code to work where the "Edit" and "Delete" columns get removed for the master as well as all the detail tables (I have 4 levels of details), but when it comes to removing the "Add New Record" from the command item bar only the button on the MasterTable gets removed.  Any ideas what I am missing here or how I could hide  the button  on detail tables?

protected override void OnPreRender(EventArgs e)
{
  //Complete normal prerender stuff.
  base.OnPreRender(e);
 
  if (ReadOnly)
  {
    MakeGridReadOnly(MasterTableView);
  }
 
}
 
private static void MakeGridReadOnly(GridTableView radGridTableView)
{
  HideAddNewCommandButton(radGridTableView);
  HideEditDeleteColumns(radGridTableView);
 
  foreach (var detailView in radGridTableView.DetailTables )
  {
    MakeGridReadOnly(detailView);
  }
 
}
 
private static void HideAddNewCommandButton(GridTableView radGridTableView)
{
  if (radGridTableView.GetItems(GridItemType.CommandItem).Length <= 0) return;
  var commandItem = radGridTableView.GetItems(GridItemType.CommandItem)[0];

  var newRecordButton = commandItem.FindControl("AddNewRecordButton");
  if (newRecordButton != null)  newRecordButton.Visible = false;
 
  var initInsertButton = commandItem.FindControl("InitInsertButton");
  if (initInsertButton != null) initInsertButton.Visible = false;
 
}
 
private static void HideEditDeleteColumns(GridTableView radGridTableView)
{
  try
  {
    GridColumn editColumn = radGridTableView.Columns.FindByUniqueName("EditCommandColumn");
    if (editColumn != null)
      editColumn.Visible = false;
  }
  catch
  {
  }
 
  try
  {
    GridColumn deleteColumn = radGridTableView.Columns.FindByUniqueName("DeleteCommandColumn");
    if (deleteColumn != null)
      deleteColumn.Visible = false;
  }
  catch
  {
  }
}
Eyup
Telerik team
 answered on 23 Jun 2015
0 answers
159 views

Hello,

      I use the onbeforeunload javascript event in asp.net page. What i want is to custom message display and change the button name when message come if page leaving or close, this is not achievable in firefox higher version and this is drawback for firefox higher version.

Default message when page leaving : This page is asking you to confirm that you want to leave - data you have entered may not be saved.

I want to know that any work can be achieved from telerik side. I think you understand my query.

If any work can be achieved that will be appreciated thing.

Pl. help me  and suggest any work which can be work properly.

Thanks

 Jiten Mutum

 

 

 
 
 
Jiten
Top achievements
Rank 1
 asked on 23 Jun 2015
1 answer
161 views

Currently I am working with a RadGrid that is using batch update that is attached to a SqlDataSoure to load, update and delete. Everything is working fine but normally the users spend around 20 minutes to review and update everything they need before hit "Save Changes", during this process new records are inserted in the database so the data displayed on the screen is not the same of the database. When the user finally hit "Save Changes" the grid refresh first the dataset and after that perform the updates generating errors because records that were not displayed are updated.

 Is there a way to tell the grid to load the data only when it is not postback? Like doing it in the OnNeedDatasource in the code behind.

Pavlina
Telerik team
 answered on 22 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?