Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
194 views
Can someone please explain when to use RadSkinManager and ASP.NET Themes - I've been reading the documentation and it's not clear which should be used, if not both simultaneously. Can I get a clear explanation of how RadSkinManager works with ASP.NET Themes? This would be very helpful.

Thank you in advance.
Derek
Top achievements
Rank 1
 answered on 07 Jun 2012
1 answer
94 views
Greetings,

Im developing an application that uses RadGrid with a custom user control. Within this control, Im using a 2nd grid to display notes for the selected record in the 1st grid. The 2nd grid is using the the OnNeedDataSource event. How can pass the record ID opened in the 1st grid to the 2nd grid in the user control?
Andrey
Telerik team
 answered on 07 Jun 2012
8 answers
151 views
I am on a team developing an app using mostly the RadGrid and RadComboBox.  We want to provide users with the ability to email pages in the site as an attachement. We of course don't expect or allow any interaction after the page is mailed, just want the html to render what was already displayed, similar to a screen print.   We have done this in the past by using a public image and style folder and adjusting the paths so that when they open the attachment, the code pulls in the images and styles from the public folder on the same site.  We also strip out javascript and anything that could throw an error or cause the display to change. I got pulled in on this project and am brand new to Teleriks controls but the question is can I do the same thing with a page containing these controls?  Upon doing a minimal proof of concept, I did not get very far with this.  Is it possible and if so, how?
whit
Top achievements
Rank 1
 answered on 07 Jun 2012
4 answers
98 views
Is there a way to cancel the postback from the OnClientNodeEdited event handler for the OnNodeEdit server event?  I need to be able to selectively cancel this postback in the client code, but I haven't found a way that works yet.

There is no set_cancel() in the arguments passed.  Setting cancelBubble and returnValue on the window.event don't work.  Calling node.endEdit() or _cancelEvent() both throw an error.

I even tried setting the node's _originalText and _originalTextHtml to its _text value to see if it would keep it from being detected as modified.

Any suggestions would be welcome.
Marbry
Top achievements
Rank 1
 answered on 07 Jun 2012
3 answers
124 views
I have a RadTreeView on a page which I have coded as follows:

<telerik:RadTreeView ID="radTreeView" runat="server" Width="100%" AutoGenerateColumns="true" OnNodeClick="radTreeView_OnNodeClick">
<
WebServiceSettings Path="BuildTrgMP.aspx" Method="GetChildNodes" />

</telerik:RadTreeView>

I have coded the GetChildNodes webservice call on the server side and this all works fine: when the user clicks a + on the tree, the little whirly appears which the webservice is called to populate the tree, which it does so correctly.
What I want to do is the opposite situation: when the user clicks a - on the tree, I want it to invalidate everything under that node such that the next time the + is clicked, the webservice is again called so that the list is updated from the database.
At the moment clicking the + just reopens the list which has previously been cached in the browser and the webservice is not called to refill the list.
How do I use OnClientNodeCollapsing (or any other approach) to invalidate the list such that pressing + causes the webservice to be called again ?

Thanks
Graham Plowman

Plamen
Telerik team
 answered on 07 Jun 2012
4 answers
122 views
Hi,
  I have used RADEditor context menu functionality. I have provided some text and right click on RADEditor control, it shows IE popup menu and my context menu in background of IE menu. It behaves like normal asp.net extbox. I dont want to display IE popup menu in the control. How to implement this functionality?
Rumen
Telerik team
 answered on 07 Jun 2012
0 answers
104 views
Dear All 

I have a Total Quantity label at RadGrid Footer.

I want to highlight and then fade out the text when the Total value changed ?!

How to do such function using Javascript ?

To understand my need, check this link, check this effect "Fade, single direction, no memory"
 

Thanks
Noha
Top achievements
Rank 1
 asked on 07 Jun 2012
5 answers
131 views
Hi,

I am using RadEditor in a UserControl, which is opening in a ModalPopup.

RadEditor is working fine on Parent Page. On ModalPopup it is throwing following error when trying to expand color toolbox. Color window is not opening at all.

this._getPopupVisibilityController() is undefined

Here's the line where error occured
this._getPopupVisibilityController().set_activePopup(this); 
Rumen
Telerik team
 answered on 07 Jun 2012
1 answer
378 views
How can I disable and change the color of a radbutton after click.
Princy
Top achievements
Rank 2
 answered on 07 Jun 2012
0 answers
181 views
   public void bindcontroltogrid(RadGrid gridtobind, RadTextBox rdtextgrid, RadComboBox rdcmbgrid,int count)
        {
            DataTable dt = new DataTable();
            List<TransactionSetupDL.TrTypeAttrDL> ob=new List<TransactionSetupDL.TrTypeAttrDL>();
         
                     int j = 0;
             ob = (List<TransactionSetupDL.TrTypeAttrDL>)HttpContext.Current.Session["lstobjTrTypeAttrdlofgrid"]; 
         
            lstvisiblelement = (List<TransactionSetupDL.TrTypeAttrDL>)HttpContext.Current.Session["lstvisiblelementofgrid"];
            //gridtobind.MasterTableView.DataSource = new string[] {"a"};
            //gridtobind.MasterTableView.TableLayout = GridTableLayout.Auto;
            //gridtobind.ClientSettings.Scrolling.AllowScroll = true;
            //gridtobind.ClientSettings.Scrolling.ScrollHeight = 100;
            //gridtobind.MasterTableView.ShowHeadersWhenNoRecords = true;
            //gridtobind.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = true;
            //gridtobind.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;
            //gridtobind.MasterTableView.EditMode = GridEditMode.PopUp;
            //gridtobind.MasterTableView.InsertItemDisplay = GridInsertItemDisplay.Bottom;
            //gridtobind.MasterTableView.AllowAutomaticInserts = true;
            //gridtobind.MasterTableView.AllowAutomaticDeletes = true;
            //gridtobind.AutoGenerateDeleteColumn = true;
            //gridtobind.AutoGenerateEditColumn = true;
            //gridtobind.ShowHeader = true;
            //gridtobind.MasterTableView.ShowHeader = true;
            
            //gridtobind.MasterTableView.IsItemInserted = true;
        
            //gridtobind.MasterTableView.ClientDataKeyNames = new string[] { "EmployeeID" };
            //gridtobind.AllowPaging = true;
            //gridtobind.GridLines = GridLines.Both;
            //gridtobind.AllowSorting = true;


          //  gridtobind.ClientSettings.Selecting.AllowRowSelect = true;
          //gridtobind.ClientSettings.ClientEvents.OnRowSelected="rowSelected";


          DataRow dr = dt.NewRow() ;
            Control container = new Control();
            for (int i = 0; i < lstvisiblelement.Count; i++)
            {
              
                GridTemplateColumn tc = new GridTemplateColumn();
                GridDropDownColumn ddc = new GridDropDownColumn();
              


                ControlType = (BaseBLDL.Global.controlType)lstvisiblelement[i].ControlType;
                switch (ControlType)
                {
                    case BaseBLDL.Global.controlType.bpTxtControl:




                     //   tc.HeaderTemplate = new AddTemplateToGridView(ListItemType.Header, lstvisiblelement[i].NameStr, ControlType, lstvisiblelement[i].DefaultVal, lstvisiblelement[i].AttrDefId, ob[i].Editable, rdcmbgrid, rdtextgrid);


                     //   tc.ItemTemplate = new AddTemplateToGridView(ListItemType.Item, lstvisiblelement[i].NameStr, ControlType, lstvisiblelement[i].DefaultVal, lstvisiblelement[i].AttrDefId, lstvisiblelement[i].Editable, rdcmbgrid, rdtextgrid);


                        //tc.UniqueName = lstvisiblelement[i].NameStr;
                    //    tc.HeaderTemplate.InstantiateIn(container);
                       
                    //    tc.ItemTemplate.InstantiateIn(container);


                        //dt.Columns.Add(lstvisiblelement[i].Label);
                   


                         // dr[lstvisiblelement[i].Label] =tc;


                        //dt.Rows.Add(dr);


                        //gridtobind.MasterTableView.Columns.Add(tc);


                        //tc.UniqueName = lstvisiblelement[i].Label;
                       // gridtobind.MasterTableView.Columns.AddAt(j, tc);
                    //    gridtobind.MasterTableView.Columns[j].HeaderText = lstvisiblelement[i].NameStr;
                      //  gridtobind.MasterTableView.Columns[j].UniqueName = lstvisiblelement[i].NameStr;
                        
                            dt.Columns.Add(lstvisiblelement[i].Label).Namespace = Convert.ToString(lstvisiblelement[i].AttrDefId);
                        
                        //gridtobind.MasterTableView.Columns[j].HeaderStyle.Width = lstvisiblelement[i].ColWidth;
                        
                        break;
                    case BaseBLDL.Global.controlType.bpCmbControl:








                    //    tc.HeaderTemplate = new AddTemplateToGridView(ListItemType.Header, lstvisiblelement[i].NameStr, ControlType, lstvisiblelement[i].DefaultVal, lstvisiblelement[i].AttrDefId, lstvisiblelement[i].Editable, rdcmbgrid, rdtextgrid);


                       // tc.ItemTemplate = new AddTemplateToGridView(ListItemType.Item, lstvisiblelement[i].NameStr, ControlType, lstvisiblelement[i].DefaultVal, lstvisiblelement[i].AttrDefId, lstvisiblelement[i].Editable, rdcmbgrid, rdtextgrid);
                      


                        //Control containercmb = new Control();
                        //tc.UniqueName = lstvisiblelement[i].NameStr;
                      //  tc.HeaderTemplate.InstantiateIn(containercmb);
                     //   tc.ItemTemplate.InstantiateIn(containercmb);
                        
                


                        //dt.Columns.Add(lstvisiblelement[i].Label);


                        //dr[lstvisiblelement[i].Label] = tc;


                        //dt.Rows.Add(dr);






                        //tc.UniqueName = lstvisiblelement[i].Label;
                       // gridtobind.MasterTableView.Columns.AddAt(j , tc);
                       
                        //gridtobind.MasterTableView.Columns[j].HeaderText = lstvisiblelement[i].NameStr;
                        //gridtobind.MasterTableView.Columns[j].UniqueName = lstvisiblelement[i].NameStr;
                        //if (lstvisiblelement[i].Label != "Item")
                        //{
                        if (lstvisiblelement[i].Label!="Item")
                        {
                            dt.Columns.Add(lstvisiblelement[i].Label).Namespace = Convert.ToString(lstvisiblelement[i].AttrDefId);
                        }
                        else
                        {
                        tc.HeaderTemplate = new AddTemplateToGridView(ListItemType.Header, lstvisiblelement[i].NameStr, ControlType, lstvisiblelement[i].DefaultVal, lstvisiblelement[i].AttrDefId, lstvisiblelement[i].Editable, rdcmbgrid, rdtextgrid);
                        
                        tc.ItemTemplate = new AddTemplateToGridView(ListItemType.Item, lstvisiblelement[i].NameStr, ControlType, lstvisiblelement[i].DefaultVal, lstvisiblelement[i].AttrDefId, lstvisiblelement[i].Editable, rdcmbgrid, rdtextgrid);
                        Control containercmb = new Control();
                        tc.UniqueName = lstvisiblelement[i].Label;
                        tc.HeaderText = lstvisiblelement[i].Label;
                        tc.EditItemTemplate = new AddTemplateToGridView(ListItemType.EditItem, lstvisiblelement[i].NameStr, ControlType, lstvisiblelement[i].DefaultVal, lstvisiblelement[i].AttrDefId, lstvisiblelement[i].Editable, rdcmbgrid, rdtextgrid);
                        tc.EditItemTemplate.InstantiateIn(containercmb);




                        tc.ItemTemplate.InstantiateIn(containercmb);
                        gridtobind.MasterTableView.Columns.Add(tc);
                       
                     //   gridtobind.MasterTableView.Columns.AddAt(3, tc);
                        }
                        //}
                        //gridtobind.MasterTableView.Columns[j].ItemStyle.Width = lstvisiblelement[i].ColWidth;
                        
                        break;


                }
                j++;


            }
            //for (int i = 0; i <= count; i++)
            //{
            // 
            //    dr = dt.NewRow();
            //}
           
            HttpContext.Current.Session["datatable"] = dt;
            HttpContext.Current.Session["lsttrtypeattr"] = lstvisiblelement;
            gridtobind.MasterTableView.DataSource = dt;
         
        }


        public class AddTemplateToGridView : ITemplate
        {
            ListItemType _type;
            string _colName;
            string _DefaultVal;
            int _AttrDefId;
            bool _Editable;
            string _columnName;
            ListItemType _templateType;


            BaseBLDL.Global.controlType _controltype;
            RadComboBox _cmboxgrid;
            RadTextBox _rdtextbox;
            //ListItemType type, string colname,
            public AddTemplateToGridView(ListItemType type, string colname,BaseBLDL.Global.controlType controltype, string DefaultVal, int AttrDefId, bool Editable, RadComboBox cmboxgrid, RadTextBox rdtextbox)
            {
                //_type = type;


                //_colName = colname;
                _controltype = controltype;
                _DefaultVal = DefaultVal;
                _AttrDefId = AttrDefId;
                _Editable = Editable;
                _cmboxgrid = cmboxgrid;
                _rdtextbox = rdtextbox;
                _templateType = type;


              
                _columnName = colname;
            }
            void ITemplate.InstantiateIn(System.Web.UI.Control container)
            {
                switch (_templateType)
                {
                    case ListItemType.Header:
                        //Creates a new label control and add it to the container.
                        Label lbl = new Label();            //Allocates the new label object.
                        lbl.Text = _columnName;             //Assigns the name of the column in the lable.
                        container.Controls.Add(lbl);        //Adds the newly created label control to the container.
                        break;
                }


                switch (_templateType)
                {
                    case ListItemType.Item:


                        switch (_controltype)
                        {


                            case BaseBLDL.Global.controlType.bpTxtControl:


                                if (_AttrDefId == 13)
                                {
                                    Label lb = new Label();
                                    lb.Text = "1";
                                    lb.ID = _columnName;
                                   
                                    lb.ClientIDMode = ClientIDMode.Static;
                                    container.Controls.Add(lb);
                                }
                                else
                                {
                                    _rdtextbox = new RadTextBox();
                                    _rdtextbox.ID = _columnName;
                                    _rdtextbox.Text = _DefaultVal;
                                    _rdtextbox.Enabled = _Editable;
                                    _rdtextbox.ClientIDMode = ClientIDMode.Static;
                                    container.Controls.Add(_rdtextbox);
                                }
                                break;


                            case BaseBLDL.Global.controlType.bpCmbControl:
                                if (_AttrDefId == 17)
                                {
                                    _rdtextbox = new RadTextBox();
                                    _rdtextbox.ID = _columnName;
                                    _rdtextbox.ClientIDMode = ClientIDMode.Static;
                                    _rdtextbox.Text = _DefaultVal;
                                    _rdtextbox.ClientIDMode = ClientIDMode.Static;
                                    container.Controls.Add(_rdtextbox);
                                }
                                else
                                {
                                    _cmboxgrid = new RadComboBox();
                                    _cmboxgrid.ID = "Item";
                                    _cmboxgrid.Items.Add(new RadComboBoxItem("hello"));
                                    //_cmboxgrid.Items.Add(new RadComboBoxItem("Select Item"));
                                    _cmboxgrid.DataBinding += new EventHandler(_cmboxgrid_DataBinding);
                                    container.Controls.Add(_cmboxgrid);
                                }
                                break;
                        }
                        break;
                }
            }


            void _cmboxgrid_DataBinding(object sender, EventArgs e)
            {
                 RadComboBox lb = (RadComboBox)sender;
                 GridViewRow container = (GridViewRow)lb.NamingContainer;
                 if (container.DataItem is DataRowView)
                 {
                     DataRowView dvr = container.DataItem as DataRowView;
                     if (DataBinder.Eval(container.DataItem, "Item", "{0:N0}").ToString() != "")
                         lb.Text = DataBinder.Eval(container.DataItem, "Item", "{0:N0}").ToString();
                     else
                         lb.Text = "lb";
                 }
            }








            void txt_DataBinding(object sender, EventArgs e)
            {


                //    RadComboBox lnk = (RadComboBox)sender;
                //    GridViewRow container = (GridViewRow)lnk.NamingContainer;
                //    object dataValue = DataBinder.Eval(container.DataItem, _colName);
                //    if (dataValue != DBNull.Value)
                //    {
                //        lnk.Text = dataValue.ToString();
                //        lnk.EmptyMessage = "asddas";
                //        lnk.Text = "sdfsdf";
                //    }


            }




        }



protected void cmbTrNo_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            List<TransactionSetupDL.TrTypeAttrDL> lsttrtypeattrvisibletogrid = (List<TransactionSetupDL.TrTypeAttrDL>)Session["lsttrtypeattr"];
            DataTable dt = (DataTable)Session["datatable"];
            dt.Rows.Clear();
           string query= objbpTrGrid.createSelectQry(Convert.ToInt32(cmbTrNo.SelectedValue), false, false);
           DataTable dtgentr = objgentrdetbl.GetDataTable(query);
           //DataTable dt = (DataTable)Session["datatable"];
           //dt.Rows[0].Delete();
        // ArrayList  arrylstgentr= objgentrdetbl.Select(objbpTrGrid.createSelectQry(Convert.ToInt32(cmbTrNo.SelectedValue), false, false));
           if (Session["dt"] == null)
           {
            
               for (int i = 0; i < dtgentr.Rows.Count; i++)
               {
                   DataRow dr = dt.NewRow();
                   dt.Rows.InsertAt(dr, i);
                  
                   for (int j = 0; j < dt.Columns.Count; j++)
                   {
                  
                       //DataColumn col = dtgentr.Columns[dt.Columns[j].ColumnName];
                       for (int k = 0; k < lsttrtypeattrvisibletogrid.Count; k++)
                       {
                           
                       
                       if (Convert.ToString(lsttrtypeattrvisibletogrid[k].AttrDefId) == dt.Columns[j].Namespace)
                       { 
                       
                       DataColumn col = dtgentr.Columns[lsttrtypeattrvisibletogrid[k].NameStr];
                       if (col != null)
                       {
                         
                           dt.Rows[i][dt.Columns[j].ColumnName] = dtgentr.Rows[i][col].ToString();
                             
                      
    




                       }
}


                       }


                   }
               }
           }
            else
           {


                dt = (DataTable)Session["dt"];
               dt.Rows.Clear();
               for (int i = 0; i < dtgentr.Rows.Count; i++)
               {
                   DataRow dr = dt.NewRow();
                   dt.Rows.InsertAt(dr, i);
                   for (int j = 0; j < dt.Columns.Count; j++)
                   {
                       for (int k = 0; k < lsttrtypeattrvisibletogrid.Count; k++)
                       {
                           if (Convert.ToString(lsttrtypeattrvisibletogrid[k].AttrDefId) == dt.Columns[j].Namespace)
                           {


                               DataColumn col = dtgentr.Columns[lsttrtypeattrvisibletogrid[k].NameStr];
                               if (col != null)
                               {


                                   dt.Rows[i][j] = dtgentr.Rows[i][col].ToString();
                               }
                           }
                       }
                   }
               }
            
           }
       
           Session["datatable"] = dt;
            
            RadGrid1.Rebind();
            Session["dt"] = dt;
        }


        protected void RadGrid1_DataBinding(object sender, EventArgs e)
        {
            DataTable t = (DataTable)Session["datatable"];
        if (t != null)
        {
            for (int i = 0; i < t.Rows.Count; i++)
            {
                RadGrid1.EditIndexes.Add(i);
              
            }
          
          
        }
     
    
          
        }
Muhammad
Top achievements
Rank 1
 asked on 07 Jun 2012
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?