Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
321 views
Hello,

I am unable to find an example that will do inline insert and update or form insert and update for radgrid.

I found an example http://demos.telerik.com/aspnet-ajax/grid/examples/client/insertupdatedelete/defaultcs.aspx
and implemented that feature and works fine with WCF. But what i really want it to do inline insert and update or
form insert and update from clientside.

Is there any example available or a blog entry for this?

Regards
Mac
Tsvetoslav
Telerik team
 answered on 28 Oct 2011
1 answer
119 views
How can I make my telerik:RadTicker control refresh data without having to reload the page every time there is a change to the underlying data?
Slav
Telerik team
 answered on 28 Oct 2011
3 answers
298 views
hi

I am using radtreeview with the following properties and settings but when i click on node "onnodeclick" event dosnot work.
the second problem is that the + in right of node does not work at all(expand), and also when i debug it doesn't go to nodeclick event.

     <telerik:RadTreeView ID="TreePicGroup" runat="server" DataFieldID="ID" DataFieldParentID="ParentID"
                            DataTextField="Title" CheckBoxes="true" OnNodeClick="TreePicGroup_NodeClick" OnNodeDrop="treeRole_NodeDrop"
                            EnableDragAndDrop="True" EnableEmbeddedSkins="True" Skin="Telerik"
                            dir="rtl" RegisterWithScriptManager="False" >
                        </telerik:RadTreeView>
-------------------------------------------------------------------------------------------------------------------------------------------------
C# Code

  
    protected void TreePicGroup_NodeClick(object sender, RadTreeNodeEventArgs e)
    {
        pnlMSG.Visible = false;
        pnlSetting.Visible = true;

        lblSubMenu.Text = e.Node.Text;

        if (e.Node.Text != "ريشه" && HidNewGroup.Value != "New")
        {

            DataTable dtGroup;

            CMS_PictureGallary ObjPicGroup = new CMS_PictureGallary();

            dtGroup = ObjPicGroup.GetGroup(Convert.ToInt32(cmbLibrary.SelectedValue), Convert.ToInt64(e.Node.Value));
            txtTitle.Text = dtGroup.Rows[0]["Title"].ToString();
            txtDes.Text = dtGroup.Rows[0]["Des"].ToString();
            txtDate.Value = ShamsiDate.get(dtGroup.Rows[0]["Created"].ToString(), 1);
            chkShowPic.Checked = Convert.ToBoolean(dtGroup.Rows[0]["PicPanel"]);
            if (dtGroup.Rows[0]["Link"].ToString().StartsWith("?PageID"))
            {
                CboLink.SelectedValue = "1";
                txtLinkID.Text = dtGroup.Rows[0]["Link"].ToString();
                TrLink.Visible = true;
            }
            if (e.Node.ParentNode == null)
                ChkReport.Enabled = false;
            else
            {
                ChkReport.Enabled = true;
                int Report = ObjPicGroup.Search_ReportGroup(Convert.ToInt32(cmbLibrary.SelectedValue), (dtGroup.Rows[0]["ParentID"]).ToString());
                if (Convert.ToInt32(e.Node.Value) == Report)
                    ChkReport.Checked = true;
                else
                    ChkReport.Checked = false;
            }
            //set Visible
            cboDisplay.SelectedValue = Convert.ToInt32(dtGroup.Rows[0]["checked_out"]).ToString();
            ImgPic.ImageUrl = "~/uploads/" + dtGroup.Rows[0]["BasesID"].ToString() + "/PictureGallary/Group/" + e.Node.Value.ToString() + ".jpg";


            BtnReg.Text = "ويرايش";
            pnlGroupName.Visible = true;

        }
        else
        {
            pnlGroupName.Visible = false;
            if (HidNewGroup.Value == "New")
            {
                txtTitle.Text = "";
                txtDate.Value = ShamsiDate.get(DateTime.Now.ToString(), 1);
            }
            else
                pnlSetting.Visible = false;
        }
    }
----------------------------------

Thanks NeDa
Plamen
Telerik team
 answered on 28 Oct 2011
3 answers
71 views
Plamen
Telerik team
 answered on 28 Oct 2011
3 answers
90 views
Hello,

I'm using RadScheduler, and earlier in a post I saw an example of how to use a reminder, with a dropdownlist as I am customizing.
The problem is that I did exactly as stated in the example I saved in my database and that the inforacion no problem just send me no notice, if I open the application or not orders left open the popup reminder. I spent part of the code I'm using:

<InlineEditTemplate>
                                   <tr height="20px"> 
                                        <td align="right" class="style2" valign="top"> 
                                            Recordatorio
                                        </td> 
                                        <td class="style3">
                                        <asp:DropDownList ID="cboReminder" runat="server" >
                                           <asp:ListItem Text="Ninguno" Value="Ninguno"></asp:ListItem> 
                                           <asp:ListItem Text="5 minutos" Value="5"></asp:ListItem> 
                                           <asp:ListItem Text="10 minutos" Value="10"></asp:ListItem> 
                                           <asp:ListItem Text="30 minutos" Value="30"></asp:ListItem>
                                           <asp:ListItem  Text="1 hora" Value="60" ></asp:ListItem>
                                            <asp:ListItem  Text="2 horas" Value="120" ></asp:ListItem>
                                            <asp:ListItem  Text="3 horas" Value="180" ></asp:ListItem>
                                            <asp:ListItem  Text="4 horas" Value="240" ></asp:ListItem>
                                            <asp:ListItem  Text="5 horas" Value="300" ></asp:ListItem>
                                            <asp:ListItem  Text="6 horas" Value="360" ></asp:ListItem
                                            <asp:ListItem Text="7 horas" Value="420" ></asp:ListItem>
                                            <asp:ListItem  Text="8 horas" Value="480" ></asp:ListItem>
                                            <asp:ListItem  Text="9 horas" Value="540" ></asp:ListItem>
                                            <asp:ListItem  Text="10 horas" Value="600" ></asp:ListItem>
                                            <asp:ListItem  Text="11 horas" Value="660" ></asp:ListItem>
                                            <asp:ListItem  Text="12 horas" Value="720" ></asp:ListItem>
                                            <asp:ListItem  Text="18 horas" Value="1080" ></asp:ListItem>
                                            <asp:ListItem  Text="1 día" Value="1440" ></asp:ListItem>
                                            <asp:ListItem  Text="2 días" Value="2880" ></asp:ListItem>
                                            <asp:ListItem  Text="3 días" Value="4320" ></asp:ListItem>
                                            <asp:ListItem  Text="4 días" Value="5760" ></asp:ListItem>
                                            <asp:ListItem  Text="1 semana" Value="10080" ></asp:ListItem>
                                            <asp:ListItem  Text="2 semanas" Value="20160" ></asp:ListItem>                                           
                                        </asp:DropDownList>
                                        </td>
                                    </tr>    
                                       </InlineEditTemplate>
  ahora en c#
  protected void RadScheduler1_AppointmentCommand(object sender, AppointmentCommandEventArgs e)
        { 
if (e.CommandName == "Insert")
            {
                Gestion gestion;
                gestion = new Gestion();
  
                GestionBO gestionBO;
                gestionBO = new GestionBO();
  
                string save;
  
                RadDateTimePicker Fecha = (RadDateTimePicker)e.Container.FindControl("dtpStart");
                TextBox Contacto = (TextBox)e.Container.FindControl("txtContacto");
                RadComboBox Evento = (RadComboBox)e.Container.FindControl("cboEvento");
                RadComboBox SubEvento = (RadComboBox)e.Container.FindControl("cboSubEvento");
                RadDateTimePicker FechaPromesa = (RadDateTimePicker)e.Container.FindControl("dtpEnd");
                RadComboBox Estatus = (RadComboBox)e.Container.FindControl("cboEstatus");             
                TextBox observaciones = (TextBox)e.Container.FindControl("txtObservaciones");
                DropDownList Recordatorio = (DropDownList)e.Container.FindControl("cboReminder");
                RadWindowManager RadWindowManager1 = (RadWindowManager)e.Container.FindControl("RadWindowManager1");
  
                gestion.DatFecha = Fecha.SelectedDate.Value;                
                gestion.StrContacto = Contacto.Text;
                gestion.IntEvento = Convert.ToInt32(Evento.SelectedValue);
                gestion.IntSubEvento = Convert.ToInt32(SubEvento.SelectedValue);
                gestion.DatFechaPromesa = FechaPromesa.SelectedDate.Value;                            
                gestion.IntEstatus = Convert.ToInt32(Estatus.SelectedValue);
                gestion.strReminder = Convert.ToString(Recordatorio.SelectedValue);
                gestion.StrObservacion = observaciones.Text;
  
                Appointment appointmentToUpdate = RadScheduler1.PrepareToEdit(e.Container.Appointment, RadScheduler1.EditingRecurringSeries);
                if (Recordatorio.SelectedValue != "none")
                {
                    appointmentToUpdate.Reminders.Add(new Reminder(int.Parse(Recordatorio.SelectedValue)));
                }
                RadScheduler1.UpdateAppointment(appointmentToUpdate);
  
                if (vsEvent == 0)
                {
                    gestion.Operation = 1;
                    gestion.IntCliente = Convert.ToInt32(Session["intCliente"].ToString());
                      
                }
                else
                {
                    gestion.Operation = 2;
                    HiddenField hddCliente = (HiddenField)e.Container.FindControl("hddCliente");   
                    gestion.IntCliente = Convert.ToInt32(hddCliente.Value); 
                    gestion.Id = vsId;
                }
  
                save = gestionBO.Save(gestion);
  
                if (Convert.ToInt32(save) > 0)
                {
                    RadScheduler1.DataSource = Data();
                    RadScheduler1.DataBind();
                }
                else
                {
                    RadWindowManager1.RadAlert(gestion.ErrorMessage, 330, 100, "Server RadAlert", "alertCallBackFn");
                }
  
                gestion = null;
                gestionBO = null;
            }
            if (e.CommandName == "Cancel")
            {
                vsEvent = 0;
                vsId = 0;
            }
        }

Take that example because that just as I am working with my RadScheduler1_AppointmentCommand've seen other examples where they use one. Js and more things but the truth is more complicated me and I will make things move more what I'm doing, I hope and I can help if I have an error or a solution as this I saw was easier for me what I'm working.
Plamen
Telerik team
 answered on 28 Oct 2011
7 answers
221 views
Hello,
I have a problem of doing custom paging in RadGrid that content another RadGrid, I need to have custom paging for the inside RadGrid , can you help me or show me some code that is working, I follow this example http://demos.telerik.com/aspnet-ajax/grid/examples/programming/custompaging/defaultcs.aspx
and it works for one RadGrid not with multiples.
Thanks,
Nabeel.
Mira
Telerik team
 answered on 28 Oct 2011
3 answers
91 views
In my RadGrid no matter what page I am on next page always navigates to the second page.  If I have more than 10 pages and click the [...] the buttons change appropriatly but when they are clicked they return to the page they initally would have navigated to.

Richard
Pavlina
Telerik team
 answered on 28 Oct 2011
7 answers
536 views
I know I must be missing something. If I make changes to a datagriditem in the ItemDataBound event of the RadGrid the changes are not visible the first time the page loads, I don't see the changes to the DataItem until I refresh the grid via the CommandItem for refresh. I have verified that the ItemDataBound event is fired and the values that I am replacing do infact have the correct values.

background:
I have a class that creates the RadGrid. It is then instantiated and loaded into the .aspx page via the code behind for the .aspx. This is a master/detail datagrid if that makes any difference.

Update: I pulled up a grid with multiple entries and all but the first griditem was loaded correctly on the initial load. After a refresh the first item was correct.

protected void Page_Init(object source, EventArgs e)
{
    this.__activeBatchesRadGrid = ActiveBatchesRadGrid.GridDefinition("ActiveBatchesRadGrid");
    this.PlaceHolder1.Controls.Add(this.__activeBatchesRadGrid);
    this.__activeBatchesRadGrid.ItemDataBound += new GridItemEventHandler(ActiveBatchesRadGrid_ItemDataBound);
}
 
private void ActiveBatchesRadGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
    GridDataItem _dataItem = e.Item as GridDataItem;
    if (_dataItem == null) return;
 
    BatchStatusType _batchStatus = EnumUtils.GetValueFromName<BatchStatusType>(_dataItem["BatchStatusName"].Text);
 
    Dictionary<BatchStatusType, BatchStatusType> _batchStatusTypes =
        BatchTransitions.GetBatchStatusTransition(_batchStatus);
         
    GridButtonColumn _btnPromote =
        ((GridButtonColumn) this.__activeBatchesRadGrid.MasterTableView.GetColumn("MasterPromoteRecord"));
 
    GridButtonColumn _btnDelete =
        ((GridButtonColumn)this.__activeBatchesRadGrid.MasterTableView.GetColumn("MasterDeleteRecord"));
 
    foreach (KeyValuePair<BatchStatusType, BatchStatusType> _item in _batchStatusTypes)
    {
        _btnPromote.Text = _item.Value.ToString();
        _btnPromote.ConfirmText = string.Format("Are you sure you want to promote this batch to {0} status?",
                                               _item.Value);
 
        _btnDelete.Text = string.Format("Demote batch to {0} status.", _item.Key.ToString());
        _btnDelete.ConfirmText = string.Format("Are you sure you want to demote this batch to {0} status?",
                                              _item.Key);
    }
}
Tim
Top achievements
Rank 2
 answered on 28 Oct 2011
1 answer
168 views
I have three dockzones in a pageview. The dockzones are contained in three RadPanes.  The RadPanes are positioned side by side horizontally.  The dockzones are set to vertical orientation.  When I have three RadDocks 1 each in the three dockzones all is well. By that I mean all three RadDocks are positioned at the top of the DockZones.. When I add a second RadDock to the DockZone1 the other RadDocks in DockZone2 and DockZone3 reposition themselves vertically towards the middle of their dockzones.

I am using a JavaScript function to set the heights of the three panes to the max height of the tallest pane in which the three dockzones reside.  This is to ensure that all three RadPanes have the same height.

I realize that the setting of the heights is probably the problem, but it cures other visual problems. 

So how do I keep the heights of the three panes and thus the RadDocks equal and align all content vertically to the top when there is an uneven amount of content (in height) in the three docks?

Thanks.
Slav
Telerik team
 answered on 28 Oct 2011
2 answers
311 views
Hi there,
I'm using the 2011.2.1018.35 version of the dll (Q2, 2011 release I think)

As the subject title says - how do I change the text of the 'Select' button which appears next to the file upload text field ?
I would also like to know how to hide it completely, but changing the text from "Select" to something like "Browse" would be good.

Thanks a lot  :)
Scott
Top achievements
Rank 1
 answered on 28 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?