Telerik Forums
UI for ASP.NET AJAX Forum
12 answers
638 views
On ItemCommand when e.CommandName == "Edit" I am trying to access controls in the UserControl I am using for my EditForm.

I tried to use:

Dim uc As UserControl
    
CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl)

where "GridEditFormItem.EditFormUserControlID" is the UserControl. (I know to try this because it works when I use it On ItemCommand when e.CommandName == "Update")

This line, however, comes up with uc=Nothing when I attempt to use it while e.CommandName == "Edit". Is the usercontrol called something besides "GridEditFormItem.EditFormUserControlID" when e.CommandName == "Edit"???

The usercontrol seems to be called something else when e.CommandName == "Edit" vs e.CommandName == "Update" and yet it is still within the ItemCommand event. Does anyone know how I can access the same UserControl OnItemCommand while e.CommandName == "Edit"??

 

Pavlina
Telerik team
 answered on 15 Oct 2013
1 answer
97 views
Hi,
I want to filter using radcombobox.the dropdown should contain all data and the option All and Null.
How to obtain this?

Thanks,
Erin. 
Shinu
Top achievements
Rank 2
 answered on 15 Oct 2013
3 answers
161 views
I currently have a situation where i need to insert some meta information into my HTML content, that isn't valid HTML syntax.  Ultimately this information gets removed before the final product is visible to public users and the HTML will be valid, but internal users creating the document need to be able to enter this information and not have the RadEditor rewrite it when switching between design and html view.

An example would be something like this:

<table>
[BeginRepeater]
<tr>
<td> something here</td>
</tr>
[EndRepeater]
</table>

When i switch to design mode this HTML gets re-written to look like this:

[BeginRepeater]
[EndRepeater]
<table>
<tr>
<td> something here</td>
</tr>
</table>

So my question is this, is there  a way to disable or turn off this html rewrite?

my Editor tag looks like this:

 <telerik:RadEditor ID="EMailContentEditor" runat="server" Skin="Web20"  Width="95%" ContentFilters="RemoveScripts,IndentHTMLContent" ConvertToXhtml="false" ConvertFontToSpan="false" ExternalDialogsPath="/EditorDialogs" EditModes="Design,Html" Height="600px" OnClientCommandExecuting="OnClientCommandExecuting" OnClientLoad="OnClientLoad">

Regards,
-Mark
Ianko
Telerik team
 answered on 15 Oct 2013
10 answers
172 views
Hello ...
I have a combobox outside a RadGrid and I have to take the selected value and insert it in record.

I tried to use insertcommand but I don't know how to refer to the value.

With the normal asp.net controls it was quite easy ...

I wrote a code for Iteminserting event:
e.values("fieldName") = myValue ...


Now, I am disoriented ...


Thanks
Konstantin Dikov
Telerik team
 answered on 15 Oct 2013
1 answer
78 views
Is it possible to enter a soft hyphen (&shy;) in design mode?
Ianko
Telerik team
 answered on 15 Oct 2013
2 answers
322 views

the problem is this, I added update panel to my page and even tried the RadAjax panel as well and both had the same trouble.  The site works fine without the ajax, but as soon as I ajaxify and then click on one of my link buttons on the radgrid it pulls up all the modalpopup windows on the page and I do mean all of them.  I went back and checked the modal opoups to make sure its calling the correct panels and buttons and each have there own, and like I said it calls only 1 when the page has no update panels.  The following is the code of the radgrid.

The first one is a command item button that I am calling and the second sits on the datarow to add notes.  I check all code behind and the only places I am calling the show is in this ItemCommand event.  It makes no sense that the page works perfectly fine without ajax panels but when I put them in no matter which item command I call i shows both modal pop-ups.  I would switch to Radwindow  but there is data being saved via the pop-ups.

Protected Sub myradgrid_ItemCommand(sender As Object, e As GridCommandEventArgs) Handles myradgrid.ItemCommand
       If (e.CommandName = "Tran") Then     (this is a command item template button)
           Dim IssueIDs As String = ""
           For Each item As GridDataItem In myradgrid.Items
               Dim cb As CheckBox = item.FindControl("cbTransfer")
               Dim IssueId As String = item.GetDataKeyValue("intIssuedID").ToString
               If cb.Checked = True Then
                   IssueIDs += IssueId & ","
               End If
           Next
 
           'Check to see if they checked anything
           If IssueIDs = Nothing Then
               ScriptManager.RegisterClientScriptBlock(Page, GetType(Page), "OpenWindow", "noCheckbox();", True)
           Else
               'Get the Issued Ids remove end comma to put in variable
               IssueIDs = IssueIDs.Remove(IssueIDs.Length - 1, 1)
               HFIssuedId.Value = IssueIDs
               FindEquip(IssueIDs)
           End If
       End If
 
       If (e.CommandName = "EditNotes") Then  ( this is a row link button  in radgrid)
           Dim Id As Integer = e.CommandArgument
 
           HFNotesID.Value = Id
 
           If CheckAdmin() = True Then
               GetNotes()
           End If
           pnlNotes_MPE.Show()
       End If
 
       If e.CommandName = "ExportToExcel" Then
           IsExport = True
           myradgrid.Columns(0).Visible = False
           myradgrid.Columns(3).Visible = False
           myradgrid.MasterTableView.GetColumn("NOTES").Visible = True
           myradgrid.ExportSettings.FileName = Replace(HFDigSig.Value, "'", "''") & "-iPBRHR"
       End If
   End Sub

This is the fillEquip of the 1st Item command that calls the popup.

'get the items that where transferred to another user.
   Private Sub FindEquip(ByVal EquipId As String)
       
       sql = "statement"
     
       myRadItems.DataSource = getReader(sql)
       myRadItems.DataBind()
 
       pnlpop_MPE.Show()
   End Sub





































Kevin
Top achievements
Rank 1
 answered on 15 Oct 2013
1 answer
90 views
i have this code

<div style="width:100%; height:100%;">
<table style="height:100%; width:100%;" border="0" cellspacing="0" cellpadding="0">
    <tr style="height:100%; width:100%;">
        <td style="height:100%; width:100%;">
<telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" Height="100%" DataSourceID="SqlDataSource1" GridLines="None" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True">
    <ClientSettings>
        <Scrolling AllowScroll="True" UseStaticHeaders="true" ></Scrolling>
    </ClientSettings>
 
    <MasterTableView AutoGenerateColumns="True" DataKeyNames="ID" DataSourceID="SqlDataSource1" >
        <Columns>
            
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
            </td>
        </tr>
</table>  
    </div>

what i want is that the rad grid can get a horital and vertical scroll bar and static header and footer nasd the columns dont get on each other i tried many thing but nothing worked. Can anybody help.

Best Regards.
Carlos Sequeira
Konstantin Dikov
Telerik team
 answered on 15 Oct 2013
2 answers
136 views

I've emails saved in database like this : XXXXXX <XXXX@main.com>
The RadGrid does not load the email between <>.

onlye show XXXXX.

How I can resolve this issue?

regards
July
Top achievements
Rank 2
 answered on 15 Oct 2013
3 answers
130 views
I would like to store different RadGrids' settings in one storage provider key file per user. i.e. all settings throughout the application for a user would be in one file. I am using the custom grid settings provider as per your demo and using the loadcustomsettings and savecustomsettings events to manage the custom settings. However when I add a setting for a grid it overwrites the entire file deleting any other settings that are added from other pages. I was hoping that using customsettings.add would just add/update that setting and leave the others alone. i.e. it would only affect the controlsetting with the provided name.

Here is the code I have for the persistence events. The same code exists on all the pages that have grids except the name when adding the settings is different (e.g. clinics, users, patients etc).

void PersistManager_LoadCustomSettings(object sender, PersistenceManagerLoadStateEventArgs e)
        {
            GridSettingsPersister loadPersister = new GridSettingsPersister(RadGrid1);
            string settings = (string)e.CustomSettings.ControlSettings[0].Value;
            loadPersister.LoadSettings(settings);
            RadGrid1.Rebind();
        }
 
        void PersistManager_SaveCustomSettings(object sender, PersistenceManagerSaveStateEventArgs e)
        {
            GridSettingsPersister savePersister = new GridSettingsPersister(RadGrid1);
            e.CustomSettings.Add(new Telerik.Web.UI.ControlSetting() { Name = "clinics", Value = savePersister.SaveSettings() });
        }
Daniel
Telerik team
 answered on 15 Oct 2013
1 answer
121 views

Hi,
How to set confirmation on delete. I want to show a window asking for delete confirmation when user clicks delete button.

Thanks,
Dawson. 
Princy
Top achievements
Rank 2
 answered on 15 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?