Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
228 views
Dear Sir/Madam,

Please response to my email: Kassaiefarshad@yahoo.com

I have got a RadListView and I have created a Generic List, then I have bound my ListView to Generic List.
You can see part of RadListView as follow:
<telerik:RadListView ID="RadListViewKnowledgeOwners" runat="server"
                        ItemPlaceholderID="ListViewContainer" dir="rtl" Width="600px">
                    <LayoutTemplate>
                                    <asp:PlaceHolder runat="server" id="ListViewContainer" />
                    </LayoutTemplate>
                    <ItemTemplate>
   ...............
 
<table  width="170">
  <tr style="height: 30px;">
       <td>
                <% if (DataBinder.Eval(Container.DataItem , "ScientificResume") != string.Empty)%>
                 <% {%>
                       <a
                              href='http://kms/Resume/<;;%# Eval("ScientificResume")%>'
                              target="_blank">Resume</a>
                   <% }
                        else
                          { %>
                           Resume
                    <% } %>
    </td>
 </tr>
                       </tr>
As you can see in my code :
                      <% if (DataBinder.Eval(Container.DataItem, "ScientificResume") != string.Empty)%>
 
System getting error to me and it doesn't recognize "Container.DataItem". What is "Container.DataItem" in above line of code?

If this approach is not true please guide me how can I do it inside RadListView?

Any help appreciated.
Farshad Kassaie.
Kassaiefarshad@yahoo.com
Richard
Top achievements
Rank 1
 answered on 17 May 2012
0 answers
53 views
I've placed a feature request here that asks Telerik to consider improving Input control to allow it to work as a Tagging input box, common in the Facebook platform. You can see a demo of what I'm asking for here

This control would have the following features:

- Good design
- Allows telerik Themes
- Controls tag duplicates (case sensitive also)
- Allow to add new tags directly
- Allows autocomplete
- Able to bind with data like the other controls
- Has client side methods and events
- Allows tags to have a name and value
- Ability to re-arrange tags by drag and drop
- Ability to provide initial tags on creation

If you like this idea, as I do, please vote for it in the PITS.
Hugo Augusto
Top achievements
Rank 2
Iron
Veteran
Iron
 asked on 17 May 2012
1 answer
94 views
      <telerik:RadGrid ID="RadGrid1" runat="server"
            Width="950px" oninsertcommand="RadGrid1_InsertCommand" 
            onitemcommand="RadGrid1_ItemCommand" onitemcreated="RadGrid1_ItemCreated" 
            oniteminserted="RadGrid1_ItemInserted" 
            onneeddatasource="RadGrid1_NeedDataSource" CellSpacing="0" 
            GridLines="None">
       <MasterTableView  EditMode="InPlace"   >
<CommandItemSettings ExportToPdfText="Export to PDF" ></CommandItemSettings>


<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>


<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
       <Columns><telerik:GridTemplateColumn UniqueName="ADDCombo"><%--<ItemTemplate></ItemTemplate>--%></telerik:GridTemplateColumn></Columns>


<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
       </MasterTableView>


<FilterMenu EnableImageSprites="False"></FilterMenu>


<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
        </telerik:RadGrid>


and on code behind i am creating a dynamic row like that

    public void bindcontroltogrid(RadGrid gridtobind, RadTextBox rdtextgrid, RadComboBox rdcmbgrid)
        {
         
            int j = 0;
            string[] a = {"a" };
            gridtobind.DataSource = null;
            lstvisiblelement = (List<TransactionSetupDL.TrTypeAttrDL>)HttpContext.Current.Session["lstvisiblelementofgrid"];
            gridtobind.MasterTableView.DataSource = 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.InPlace;
            gridtobind.AllowAutomaticDeletes = true;
            gridtobind.AutoGenerateDeleteColumn = true;
            gridtobind.AutoGenerateEditColumn = true;
            
          
            Control container = new Control();
            for (int i = 0; i < lstvisiblelement.Count; i++)
            {
                GridTemplateColumn tc = new GridTemplateColumn();
                ControlType = (BaseBLDL.Global.controlType)lstvisiblelement[i].ControlType;
                switch (ControlType)
                {
                    case BaseBLDL.Global.controlType.bpTxtControl:








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






                        tc.ItemTemplate.InstantiateIn(container);
           




                        //  gridtobind.MasterTableView.Columns[j].HeaderStyle.Width = lstvisiblelement[i].ColWidth;
                        gridtobind.MasterTableView.Columns.AddAt(j, tc);
                        gridtobind.MasterTableView.Columns[j].HeaderText = lstvisiblelement[i].Label;


                        break;
                    case BaseBLDL.Global.controlType.bpCmbControl:












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




                        Control containercmb = new Control();


                        tc.ItemTemplate.InstantiateIn(containercmb);


                        //  gridtobind.MasterTableView.Columns[j].ItemStyle.Width = lstvisiblelement[i].ColWidth;




                        gridtobind.MasterTableView.Columns.AddAt(j, tc);
                        gridtobind.MasterTableView.Columns[j].HeaderText = lstvisiblelement[i].Label;


                    
                        break;


                }
                j++;


            }
            gridtobind.Rebind();
            
        }
        public class AddTemplateToGridView : ITemplate
        {
            ListItemType _type;
            string _colName;
            string _DefaultVal;
            int _AttrDefId;
            bool _Editable;
            BaseBLDL.Global.controlType _controltype;
            RadComboBox _cmboxgrid;
            RadTextBox _rdtextbox;
            //ListItemType type, string colname,
            public AddTemplateToGridView(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;
            }
            void ITemplate.InstantiateIn(System.Web.UI.Control container)
            {




                switch (_controltype)
                {
                    case BaseBLDL.Global.controlType.bpTxtControl:
                        if (_AttrDefId == 13)
                        {
                            Label lb = new Label();
                            lb.Text = "1";


                            container.Controls.Add(lb);
                        }
                        else
                        {
                            _rdtextbox = new RadTextBox();


                            _rdtextbox.Text = _DefaultVal;
                            _rdtextbox.Enabled = _Editable;


                            container.Controls.Add(_rdtextbox);
                        }
                        break;


                    case BaseBLDL.Global.controlType.bpCmbControl:
                        if (_AttrDefId == 17)
                        {
                            _rdtextbox = new RadTextBox();
                            _rdtextbox.Text = _DefaultVal;
                            container.Controls.Add(_rdtextbox);
                        }
                        else
                        {
                            _cmboxgrid = new RadComboBox();


                            _cmboxgrid.Items.Add(new RadComboBoxItem("Select Item"));


                            container.Controls.Add(_cmboxgrid);
                        }
                        break;
                }


            }

now i want to create same row again on add new record button click that is previously created on the code that i above posted 
with combo box and textbox controls kindly help
Tsvetoslav
Telerik team
 answered on 17 May 2012
5 answers
123 views
Hi,

My assignment is to give edit functionality in a grid. when the user clicks on edit user will see textboxes and checkboxlists from which he can manipulate data.

In the Form template I have a CheckBoxList.

<EditFormSettings EditFormType = "Template">
<FormTemplate>
<asp:CheckBoxList  ID= "List2"  runat="server" selectedvalue = '<%# EVal("ApprovedValues")%>' datasource= "sqldatasource1"
datatextfield="value" datavaluefield= "value" tabindex="2">
</asp:heckBoxList>

my problem here is the approvedvalues that i get from the grid can look like a,b,c. I want to recognize all these values and select them from the list coming from sqldatasource1. Also if the approvedvalue has data that does not exist in the sqldatasource1 list I am getting an error.

"list2 has a selected value which is invalid because it does not exist in the list of items."

can anyone help?
Thanks
rms
Top achievements
Rank 1
 answered on 17 May 2012
1 answer
89 views
hi.
i have a scenario like http://demos.telerik.com/aspnet-ajax/tooltip/examples/loadondemand/defaultcs.aspx 
the problem is that all telerik controls like radcombox, RadListBox ecc don't wok. (in your demo radcombobox works!)
i can only see them but they are not enable.
instead, radbotton works.
i try to change z-index value but this not solve the problem.
can you helm me please?
thanks

Marin Bratanov
Telerik team
 answered on 17 May 2012
5 answers
65 views
Dear Telerik Team,

It is customary that when you see a modal dialog, you press spacebar to accept/dismiss the same. However this space bar trick does not work with RadConfirm boxes and it just moves the window up and down.

Any workarounds and/or plans to roll-out a fix for the same?
Marin Bratanov
Telerik team
 answered on 17 May 2012
1 answer
63 views
I'm running RadEditorSharepoint v4.5.6.0 in our production environment.  Does that employ the now unsupported ASP.NET radEditor?  We're updating soon, but in the meantime all the tools appear to have been disabled in the UI.  I checked the ListToolsFile and nothing seems off.  Both "EnhancedToolbar" and "BasicToolbar" are enabled. 

I saw something similar to this where the developer fixed it by replacing the default script manager with the radscriptmanager, but I'm not sure I know how to do that from a MOSS list form. 

We're going to try updating the version and hoping for the best, but if anyone has some relevant advice, I'd love to hear it. 

Something similar to this happened with the new version on an associate's machine, but in that case it was only him, so we chalked it up to some kinda javascript caching or permissions issue; however, this is happening for everyone and I've checked it in IE 8, 8 compatibility view, and 7, so I don't think it's a browser problem.
Rumen
Telerik team
 answered on 17 May 2012
5 answers
333 views
Hello

I have a project that has used a custom theme for quite a while. I recently updated from telerik 2nd 2010 to 3rd 2011 and am now showing grid lines on all of my radgrids (as shown in attached images). Ive tried to play with the css a bit but havent had any success. Any suggestions would be appreciated.

Thanks
Curt
Curt
Top achievements
Rank 1
 answered on 17 May 2012
3 answers
141 views
I have a page with multiple RadGrid controls. One control drags to another control. While the dragDrop operation is still in process, the user drags another item, and the item being dragged is left on screen without dropping into any container. The item remains frozen above all controls, and doesn't go away until the page is refreshed. I added an OnRowDropping event client-side to catch when eventArgs.get_targetItemID() was blank, and used eventArgs.set_cancel(true). That stopped the instance where users were dropping a control on the page (outside a control) while dragging. I'd like to disable DragDrop while a DragDrop operation is in progress to avoid this. I looked through the Telerik documentation for the RadGrid object model, and I couldn't find anything client side that would allow me to detect whether or not the grid was currently dragging.
Does anyone know how to catch this? Then, when I determine that the user is already dragging, The OnRowDropping event will set_cancel(true) for that event.
Please help me with this if you can.
Andrey
Telerik team
 answered on 17 May 2012
1 answer
100 views
Hallo
     I have more than 250 records in my grid. I have enabled paging and filtering in my grid. However im unable to get the total count of the records. I have tried prerender, but all im able to get is the count of the records in the current page. Please help me out..
thanks
Savyo
Princy
Top achievements
Rank 2
 answered on 17 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?