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

Hi,

I have a Radgrid name grdActionList displaying data records.
I have a buttton as BtnAdd which, when clicked, opens a RadWindow which in turn has a NavigateUrl property set to AddData.aspx.
 
The AddData.aspx has a few textboxes and a "Add records" button named BtnAddRecords.
When the BtnAddRecords is clicked, the data from the textfields are stored in the DB and the RadWindow is closed.

How can I:

  1. After the RadWindow is closed, the RadGrid is refresh / rebind.
  2. All a message is displayed in the label just above the radgrid.

 

I have written a JS in the base page as to refresh the radgrid:

function OnClientClose()
{
 $get("grdActionList").Rebind();
}

I have defined the RadWindow as:

<telerik:RadWindow ID="Window1" runat="server" EnableViewState="false" NavigateUrl="ActionPopup.aspx" Modal="true" Animation="Fade" VisibleStatusbar="false" Title="Manage Action" OnClientClose="OnClientClose" Behaviors="Close"></telerik:RadWindow>

This doesnot work!

Please help.

Thanks

Shinu
Top achievements
Rank 2
 answered on 02 Jul 2010
17 answers
343 views
Hello!

I have a project with one treeview with checkboxes enabled. I also have a control, with just one property. What i need is to add control every time a node is checked, where the control property takes value from node value checked. It means if you check the first node, the control will be added. If you check a second one, than 2 controls will be shown, and so on. If you uncheck a node, of course the respective control should disappear.

Ok, i'm able to do this, by adding controls at runtime, but this means that every time a control is added or removed the whole zone (panel) will be refreshed. If already there are 10 controls this can take a long time (because this control has a grid inside).

I need an approach to add and remove this control without refreshing the whole panel. I don't know the best way for this... Maybe by adding (and removing) a panel for each control (inside a big panel)? Or is there any better way?

Thank you!
renis cerga
Top achievements
Rank 1
 answered on 02 Jul 2010
1 answer
64 views
Hello Friends,

I am a gr8 follower of RadGrid. I have question regarding an issue which is that
"Is there any event available when we return back to the parent grid from the child grid like GOTFOCUS type of event"

Bcoz my task is that when we return back from the child grid there must be event generated in the parent grid like "GotFocus"type of event  in the parent grid so that some other task can be taken place... 
plz help me out and also plz provide some sample also....

Any help from any one will be highly appreciated.....
Regards
Abhijit
Veli
Telerik team
 answered on 02 Jul 2010
5 answers
344 views
Hello,

I need to set the calendar tooltips (to Dutch) of a DataPicker. The DataPicker is used within in an RadGrid.
I can set the attributes of the textbox, but I cannot set the attributes of the calendar control, that is, I can set them, but they are not used, the application shows the default values.

This is the relevant part of the aspx:
<!-- snapshot from the RadGrid --> 
 
<telerik:GridDateTimeColumn   
    DataField="Gebdatum" HeaderText="Geboorte datum" UniqueName="Gebdat" > 
</telerik:GridDateTimeColumn> 
 
 
And this is the code behind:

Protected Sub FormatieRadGrid_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles FormatieRadGrid.ItemCreated  
 
    If (TypeOf e.Item Is Telerik.Web.UI.GridEditableItem AndAlso e.Item.IsInEditMode) Then 
 
        'This is working  
        Dim gebdat As Telerik.Web.UI.RadDatePicker = CType(CType(e.Item, Telerik.Web.UI.GridEditableItem)("Gebdat").Controls(0), Telerik.Web.UI.RadDatePicker)  
        gebdat.Width = 80  
        gebdat.tooltip = "geboorte datum" 
        gebdat.EnableTyping = False 
 
        'This does work as it gives no exceptions, but the code seems to be ignored   
        Dim cal As Telerik.Web.UI.RadCalendar = CType(gebdat.FindControl("calendar"), Telerik.Web.UI.RadCalendar)  
        cal.ToolTip = "Toon kalender popup" 
        cal.FastNavigationSettings.EnableTodayButtonSelection = False 
        cal.FastNavigationStep = 12  
        cal.FastNavigationNextToolTip = "volgend jaar" 
        cal.FastNavigationPrevToolTip = "vorig jaar" 
        cal.NavigationNextToolTip = "volgende maand" 
        cal.NavigationPrevToolTip = "vorige maand" 
        'The calendar control still shows its defaults values in stead of the adapted ones    
 
    End If 
      
End Sub 
 
 
What am I doing wrong / why doesn't this work as expected?

Regards,
-Ruud.
Radoslav
Telerik team
 answered on 02 Jul 2010
1 answer
100 views
Hi

we have a radgrid populated by a database view. There is a need for a  menu on gridviewrows(documents). When selecting a document, we want a modal popup form that contains different actions like approve and reject documents, show version history and download the document selected.

I struggle to find out how to do different things that is not update/create/delete actions on the selected gridviewrow. Can you recommend how to solve this?

Regards,
daaland1972
Veli
Telerik team
 answered on 02 Jul 2010
1 answer
118 views
Hi all.
I have a radgrid binding on the client by row. with a yahoo-style scrolling
http://demos.telerik.com/aspnet-ajax/grid/examples/client/virtualscrollpagingclientbinding/defaultcs.aspx

Now every time when I drag the scroll to bottom, all data is retrieved and binding again. In my OnRowDataBound I have a lot of javascript code, so the performance isn't good. I would like to copy the existed data bound rows, bind the new I add these to the grid. How can I do that?
Veli
Telerik team
 answered on 02 Jul 2010
1 answer
103 views
i am using telerik redmenu in asp.net 2.0 ,which is taking too much time to load , which is causing a long time in my page loading process
how to optimize my page plz help as soon as possible..
Yana
Telerik team
 answered on 02 Jul 2010
1 answer
155 views
hi

i was wondering how can i change the loading image

when i add this control in my page
<telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" /> 

and i want to set the modal=true so the user cant click to any other buttons or controls

thanks
regards
Dimo
Telerik team
 answered on 02 Jul 2010
1 answer
88 views
Is there a way to hide some telerik components from Design View in visual studio? Like the RadScriptManager, RadSkinManager etc etc.

Dimo
Telerik team
 answered on 02 Jul 2010
1 answer
158 views
I am recieving the following error when I upgrade past version v.21010.1.216.35.  I have tried this with v.2010.1.519.35 and v.2010.2.623.35.

The page loads fine with the 216 but when I upgrade to a newer version I recieve "Script controls may not be registered after PreRender"  My app doesn't change I just use the telerik upgrade option in the file menu.

ASPX Page
<script type="text/javascript" language="javascript">  
        function RowDeleted(sender, eventArgs) {  
            PageMethods.MarkRecordDeleted(eventArgs.getDataKeyValue("ContactRecId"));  
        }  
    </script> 
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">  
    <label>Type of contact</label>   
    &nbsp;&nbsp;&nbsp;<telerik:RadComboBox ID="ddlContactTypes" AutoPostBack="true" runat="server"   
        EmptyMessage="Select Contact Type" DataSourceID="LLBLGenProDataSource2" 
        ondatabound="ddlContactTypes_DataBound" DataTextField="ContactType"   
        DataValueField="ContactTypeRecId">  
    </telerik:RadComboBox> 
    <br /> 
    <br /> 
    <div id="TagInstructions" style="width:90%;font-family:Trebuchet MS, Arial, MS Sans Serif; font-size:smaller;color:#666666;">  
        Email Body Tags:<br /> 
        {0} = Quantity Needed, {1} = Product ID, {2} = Available Inventory, {3} = Reserved Amount, {4} = Reorder Point, {5} = Total Inventory<br /> 
        {6} = Product Name, {7} = Ordered by First Name, {8} = Ordered By Last Name, {9} = Order date, {10} = Order ID, {11} = Quantity Multipler</div> 
    <br /> 
 
    <telerik:RadGrid ID="RadGrid1" runat="server" OnItemCreated="RadGrid1_ItemCreated" 
        AllowPaging="True" AllowSorting="True" DataSourceID="LLBLGenProDataSource1"   
        GridLines="None" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"   
        AllowAutomaticUpdates="True" AutoGenerateDeleteColumn="False"   
        MasterTableView-CommandItemDisplay="Top" > 
        <ClientSettings> 
        <ClientEvents OnRowDeleted="RowDeleted"></ClientEvents> 
        </ClientSettings> 
<MasterTableView AutoGenerateColumns="False" DataKeyNames="ContactRecId"  ClientDataKeyNames="ContactRecId" 
            DataSourceID="LLBLGenProDataSource1" EditMode="EditForms" EditFormSettings-ColumnNumber="3" CommandItemSettings-AddNewRecordText="Add new contact">  
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
    <Columns> 
    <telerik:GridEditCommandColumn ItemStyle-Width="20px" ButtonType="LinkButton"></telerik:GridEditCommandColumn> 
        <telerik:GridBoundColumn DataField="ContactRecId" DataType="System.Int32"   
            HeaderText="ContactRecId" ReadOnly="True" Display="false" SortExpression="ContactRecId"   
            UniqueName="ContactRecId">  
        </telerik:GridBoundColumn> 
        <telerik:GridTemplateColumn EditFormColumnIndex="0" EditFormHeaderTextFormat="" Display="false">  
            <EditItemTemplate> 
                <b>Contact Details</b> 
            </EditItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridBoundColumn DataField="Name" HeaderText="Name"  ColumnEditorID="txteditor"   
            SortExpression="Name" UniqueName="Name">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Address1" HeaderText="Address 1"  ColumnEditorID="txteditor"   
            SortExpression="Address1" UniqueName="Address1">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Address2" HeaderText="Address 2"  ColumnEditorID="txteditor"   
            SortExpression="Address2" UniqueName="Address2">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Address3" HeaderText="Address 3"  ColumnEditorID="txteditor"   
            SortExpression="Address3" UniqueName="Address3">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="City" HeaderText="City"  ColumnEditorID="txteditor"   
            SortExpression="City" UniqueName="City">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="State" HeaderText="State"  ColumnEditorID="txteditor"   
            SortExpression="State" UniqueName="State">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="PostalCode" HeaderText="Postal Code"  ColumnEditorID="txteditor"   
            SortExpression="PostalCode" UniqueName="PostalCode">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Country" HeaderText="Country"  ColumnEditorID="txteditor"   
            SortExpression="Country" UniqueName="Country">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Phone" HeaderText="Phone"  ColumnEditorID="txteditor"   
            SortExpression="Phone" UniqueName="Phone">  
        </telerik:GridBoundColumn> 
        <telerik:GridTemplateColumn EditFormHeaderTextFormat="" Display="false">  
            <EditItemTemplate> 
                <br /><a href="EditProductEmailTargets2.aspx?c=<%# Eval("ContactRecId") %>">Assign Specific EMail Targets</a> 
            </EditItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn EditFormColumnIndex="1" EditFormHeaderTextFormat="" Display="false">  
            <EditItemTemplate> 
                <b>Below Reorder Point Email</b> 
            </EditItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridBoundColumn DataField="ReorderTo" HeaderText="To"   
            SortExpression="ReorderTo" UniqueName="ReorderTo" EditFormColumnIndex="1" ColumnEditorID="txteditor" Display="false">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="ReorderCc" HeaderText="CC"   
            SortExpression="ReorderCc" UniqueName="ReorderCc" EditFormColumnIndex="1" ColumnEditorID="txteditor" Display="false">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="ReorderBcc" HeaderText="BCC"   
            SortExpression="ReorderBcc" UniqueName="ReorderBcc" EditFormColumnIndex="1" ColumnEditorID="txteditor" Display="false">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="ReorderFrom" HeaderText="From"   
            SortExpression="ReorderFrom" UniqueName="ReorderFrom" EditFormColumnIndex="1" ColumnEditorID="txteditor" Display="false">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="ReorderSubject" HeaderText="Subject"   
            SortExpression="ReorderSubject" UniqueName="ReorderSubject" EditFormColumnIndex="1" ColumnEditorID="txteditor" Display="false">  
        </telerik:GridBoundColumn> 
        <telerik:GridHTMLEditorColumn HeaderText="Body" DataField="ReorderBody" SortExpression="ReorderBody" UniqueName="ReorderBody" EditFormColumnIndex="1" Display="false"></telerik:GridHTMLEditorColumn> 
        <telerik:GridTemplateColumn Visible="false" ReadOnly="true" HeaderText="Reorder Body" SortExpression="ReorderBody" UniqueName="ReorderBody" EditFormColumnIndex="1" Display="false">  
            <EditItemTemplate> 
            <asp:TextBox ID="txtReorderBody" runat="server" Width="300px" TextMode="MultiLine" Height="150px" Text='<%# Bind("ReorderBody")%>'></asp:TextBox> 
            </EditItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn EditFormColumnIndex="2" EditFormHeaderTextFormat="" Display="false">  
            <EditItemTemplate> 
                <b>Below Zero Inventory Email</b> 
            </EditItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridBoundColumn DataField="ZeroInventoryTo" HeaderText="To" ColumnEditorID="txteditor"   
            SortExpression="ZeroInventoryTo" UniqueName="ZeroInventoryTo" EditFormColumnIndex="2" Display="false">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="ZeroInventoryCc" HeaderText="CC"  ColumnEditorID="txteditor" 
            SortExpression="ZeroInventoryCc" UniqueName="ZeroInventoryCc" EditFormColumnIndex="2" Display="false">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="ZeroInventoryBcc" HeaderText="BCC"  ColumnEditorID="txteditor" 
            SortExpression="ZeroInventoryBcc" UniqueName="ZeroInventoryBcc" EditFormColumnIndex="2" Display="false">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="ZeroInventoryFrom" HeaderText="From"  ColumnEditorID="txteditor" 
            SortExpression="ZeroInventoryFrom" UniqueName="ZeroInventoryFrom" EditFormColumnIndex="2" Display="false">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="ZeroInventorySubject" HeaderText="Subject"  ColumnEditorID="txteditor" 
            SortExpression="ZeroInventorySubject" UniqueName="ZeroInventorySubject" EditFormColumnIndex="2" Display="false">  
        </telerik:GridBoundColumn> 
          
        <telerik:GridHTMLEditorColumn HeaderText="Body" DataField="ZeroInventoryBody" ColumnEditorID="htmleditor1"  SortExpression="ZeroInventoryBody" UniqueName="ZeroInventoryBody" EditFormColumnIndex="2" Display="false"></telerik:GridHTMLEditorColumn> 
          
        <telerik:GridClientDeleteColumn ItemStyle-Width="20px" ConfirmText="Are you sure you want to delete this contact?" HeaderStyle-Width="35px" ButtonType="ImageButton" /> 
    </Columns> 
 
<EditFormSettings> 
<EditColumn UniqueName="EditCommandColumn1"></EditColumn> 
</EditFormSettings> 
</MasterTableView> 
    </telerik:RadGrid> 
          
    <telerik:GridTextBoxColumnEditor ID="txteditor" runat="server" TextBoxStyle-Width="300px"></telerik:GridTextBoxColumnEditor> 
      
    </telerik:RadAjaxPanel> 
    <llblgenpro:LLBLGenProDataSource ID="LLBLGenProDataSource1" runat="server"   
        DataContainerType="EntityCollection"   
          
        EntityCollectionTypeName="AFPI.Inventory.DAL.CollectionClasses.ContactCollection, AFPI.Inventory.DAL">  
        <InsertParameters> 
            <asp:ControlParameter ControlID="ddlContactTypes" Name="ContactTypeRecId"   
                PropertyName="SelectedValue" /> 
        </InsertParameters> 
        <SelectParameters> 
            <asp:ControlParameter ControlID="ddlContactTypes" DefaultValue=""   
                Name="ContactTypeRecId" PropertyName="SelectedValue" /> 
            <asp:Parameter DefaultValue="" Name="DeletedDate" ConvertEmptyStringToNull="true" /> 
        </SelectParameters> 
        <UpdateParameters> 
            <asp:ControlParameter ControlID="ddlContactTypes" Name="ContactTypeRecId"   
                PropertyName="SelectedValue" /> 
        </UpdateParameters> 
    </llblgenpro:LLBLGenProDataSource> 
      
      
    <llblgenpro:LLBLGenProDataSource ID="LLBLGenProDataSource2" runat="server"   
        DataContainerType="EntityCollection"   
        EntityCollectionTypeName="AFPI.Inventory.DAL.CollectionClasses.ContactTypeCollection, AFPI.Inventory.DAL">  
          
    </llblgenpro:LLBLGenProDataSource> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">  
    </telerik:RadAjaxLoadingPanel> 
Code Behind
protected void ddlContactTypes_DataBound(object sender, EventArgs e)  
        {  
            ddlContactTypes.Items.Remove(1);  
            if (Request.QueryString["ct"] != null)  
            {  
 
                if (ddlContactTypes.Items.FindItemByValue(Request.QueryString["ct"].ToString()) != null)  
                {  
                    ddlContactTypes.Items.FindItemByValue(Request.QueryString["ct"].ToString()).Selected = true;  
                }  
            }  
        }  
 
        protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)  
        {  
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
            {  
                GridEditableItem item = (GridEditableItem)e.Item;  
                RadEditor ReorderBody = (RadEditor)item["ReorderBody"].Controls[0];  
                ReorderBody.Height = Unit.Pixel(200);  
                ReorderBody.Width = Unit.Pixel(300);  
                ReorderBody.AutoResizeHeight = false;  
 
 
                RadEditor ZeroInventoryBody = (RadEditor)item["ZeroInventoryBody"].Controls[0];  
                ZeroInventoryBody.Height = Unit.Pixel(200);  
                ZeroInventoryBody.Width = Unit.Pixel(300);  
                ZeroInventoryBody.AutoResizeHeight = false;  
            }  
        }    
 
 
        [WebMethod]  
        public static void MarkRecordDeleted(int RecId)  
        {  
            Guid? userGuid = UserUtil.getCurrentUserGuid(Membership.GetUser());  
 
            ContactEntity ent = new ContactEntity(RecId);  
            ent.DeletedBy = userGuid;  
            ent.DeletedDate = DateTime.Now;  
            ent.Save();  
        } 

This is the only page it happens on.  I don't see where I'm adding a control after PreRender either?

Thanks,

Sebastian
Telerik team
 answered on 02 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?