Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
338 views
Dear All,

   I'm very new guy here. and I had two RadListBoxItems in my aspx page. ListUserCols and ListAllCols.  and while I'm loaded some of the values through DB in ListUserCols for manualy selected items. and then I loaded all of my 50 items in ListAllCols listbox.!

  Now, I need to check from Second Listbox items(ListUserCols) not exist in First Listbox items. Please help me to find out resolved that issue.. I'm searched google in many time. No results are found. Moreover, i didn't select any Items in listbox, all loaded from DB.

Sample code:

                     DataSet dsAttributes = new DataSet();
                      foreach (DataRow dr in dsAttributes.Tables[0].Rows)
                        {
                            lstUserColumns.Items.Add(new RadListBoxItem(dr["Column_Desc"].ToString()));
                        }

                      

                        foreach (RadListBoxItem selectedItem in lstUserColumns.Items)
                        {
                            //lstAllColumns.Items.Remove(new RadListBoxItem(selectedItem.Value));
                            RadListBoxItem item = lstAllColumns.FindItemByText(selectedItem.Text);
                            item.Remove();
                        }                       
                    }
AL MUBARAK
Top achievements
Rank 2
 asked on 02 Sep 2014
1 answer
181 views
Could you show me a sample for add,remove,change text with a RadTreeView and save to database?
I tried many ways but never work.
At first I face "id" problem,these create by JavaScript doesn't have Value to be "id".
Then I face "parentID" problem,because parentNode is create by JavaScript so it have no Value to become "parentID"
And many problems.

(I am trying to create a new tree,the database is empty)

Could you give me a sample for Client-Side add,remove,change text,and postback to save to Database?

Thanks!
Boyan Dimitrov
Telerik team
 answered on 02 Sep 2014
1 answer
183 views
Hello everyone,

first some tecnical details:

We use the Telerik Controls in Version 2014.2.708.45
Our problem occuring with IE 8, 9, 10 and 11.
We use .Net Framework 4.5

Our problem is the following one:

We have an ajaxified RadTabStrip connected to a RadMultiPage. We create the pages connected to the tabs dynamically as done in this demo. The page views contain a usercontrol. The usercontrols contains some RadTextBox controls. All Textboxes have a label, where the LabelWidth is set to 250px. The width property of the textbox is set to 100%.

The following is done by css:

html body .RadInput_MySkinName {
    display: table;
}
 
html body .RadInput_MySkinName .riTextBox,
html body .RadInputMgr_MySkinName {
  display: table-cell;
  border-color: #cdcdcd;
  background: white;
  color: black;
  font-weight: 100;
  font-size: 16px;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif; }

How it should look can be seen in the attached file SampleTelerikUserControl.png. This works fine in all browsers if the usercontrol is directly added to a page.

If the usercontrol is added dynamically in ajaxified TabStript/PageView the textbox controls have not the correct width (only in IE, in all other browsers the controls are properly rendered - the width ignores the 250px from the lable). If you click another tab (and and something is done through ajax) and than switch back to the first tab with the wrong rendered usercontrol the controls of the usercontrol are now properly displayed. The wrong behavior could be seen in ErrorTelerikUserControl.PNG, the correct behavoir is shown in OkTelerikUserControl.PNG (after the first ajax call).

Thanks
Magdalena
Telerik team
 answered on 02 Sep 2014
12 answers
673 views
Hi All,

Below is my code.Please see the screen shot for my issue

<

 

radG:RadGrid AllowMultiRowSelection="true" ID="RadGrid1" runat="server" GridLines="None"

 

 

AutoGenerateColumns="False" Skin="Outlook" Width="100%" AllowPaging="True" PageSize="50"

 

 

AllowFilteringByColumn="true" AllowSorting="true"

 

 

OnItemDataBound="RadGrid1_ItemDataBound1"

 

 

OnItemCommand="RadGrid1_ItemDataBound1" OnDeleteCommand="RadGrid1_DeleteCommand"

 

 

OnPageIndexChanged="RadGrid1_PageIndexChanged" EnableHeaderContextMenu="true"

 

 

AllowCustomPaging="false"

 

 

OnPreRender="RadGrid1_PreRender" ItemStyle-Wrap="false" AlternatingItemStyle-Wrap="false" >

 

 

<ExportSettings HideStructureColumns="true" />

 

 

<MasterTableView CommandItemDisplay="Bottom" DataKeyNames="emp_code" TableLayout="Auto" Width="100%" >

 

 

<PagerStyle Mode="Advanced" AlwaysVisible="true" />

 

 

<FilterItemStyle HorizontalAlign="left" />

 

 

<HeaderStyle ForeColor="Navy" />

 

 

 

 

<CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" ShowExportToCsvButton="true" />

 

 

 

<AlternatingItemStyle BackColor="#E5E5E5" Height="20px" />

 

 

<CommandItemTemplate>

 

 

<div>

 

 

<asp:Image ID="Image1" ImageUrl="../frames/images/toolbar/AddRecord.gif" runat="Server" />

 

 

<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/employee/AddEditEmployee.aspx"

 

 

Font-Underline="true">Add New Employee</asp:HyperLink>

 

 

</div>

 

 

</CommandItemTemplate>

 

 

<Columns>

 

 

<radG:GridBoundColumn ShowFilterIcon="False" UniqueName="EmpCode" HeaderImageUrl="../frames/images/EMPLOYEE/Grid- employee.png"

 

 

HeaderText="Emp Code" CurrentFilterFunction="StartsWith" DataField="emp_code"

 

 

Display="false">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn">

 

 

<ItemTemplate>

 

 

<asp:Image ID="Image2" ImageUrl="../frames/images/EMPLOYEE/Grid- employee.png" runat="Server" />

 

 

</ItemTemplate>

 

<%

-- <HeaderStyle Width="30px" />--%>

 

 

<HeaderStyle Width="3%" />

 

 

</radG:GridTemplateColumn>

 

 

<radG:GridTemplateColumn ShowFilterIcon="False" AllowFiltering="False" UniqueName="TemplateColumnEC"

 

 

Display="false" HeaderText="Code" SortExpression="emp_code">

 

 

<ItemTemplate>

 

 

<asp:HyperLink runat="server" Text='<%# "DPT"+ DataBinder.Eval(Container.DataItem,"emp_code").ToString()%>'

 

 

NavigateUrl='<%# "AddEditEmployee.aspx?empcode=" + DataBinder.Eval (Container.DataItem,"emp_code").ToString()%>'

 

 

ID="empcode" />

 

 

</ItemTemplate>

 

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

</radG:GridTemplateColumn>

 

<%

-- <radG:GridTemplateColumn UniqueName="TCEmpName" HeaderText="Employee Name" SortExpression="emp_name" CurrentFilterFunction="contains" AutoPostBackOnFilter="true">

 

<ItemTemplate>

<asp:HyperLink runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"emp_name").ToString()%>'

NavigateUrl='<%# "AddEditEmployee.aspx?empcode=" + DataBinder.Eval (Container.DataItem,"emp_code").ToString()%>'

ID="empname" />

</ItemTemplate>

<HeaderStyle HorizontalAlign="left" />

</radG:GridTemplateColumn>--

 

%>

 

 

<radG:GridBoundColumn ShowFilterIcon="False" UniqueName="emp_name" HeaderText="Employee Name"

 

 

DataField="emp_name" CurrentFilterFunction="contains" AutoPostBackOnFilter="true">

 

 

<HeaderStyle HorizontalAlign="left" />

 

<%

-- <HeaderStyle Width="300px" />--%>

 

 

<HeaderStyle Width="25%" />

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn ShowFilterIcon="False" UniqueName="emp_type" HeaderText="Pass Type"

 

 

DataField="emp_type" CurrentFilterFunction="contains" AutoPostBackOnFilter="true">

 

 

<HeaderStyle HorizontalAlign="left" />

 

<%

-- <HeaderStyle Width="90px" />--%>

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn ShowFilterIcon="False" UniqueName="ic_pp_number" HeaderText="IC/FIN Number"

 

 

DataField="ic_pp_number" CurrentFilterFunction="contains" AutoPostBackOnFilter="true">

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn ShowFilterIcon="False" UniqueName="empgroupname" HeaderText="Type"

 

 

DataField="empgroupname" CurrentFilterFunction="contains" AutoPostBackOnFilter="true">

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn ShowFilterIcon="False" UniqueName="ID" HeaderText="Time Card ID"

 

 

CurrentFilterFunction="contains" AutoPostBackOnFilter="true" DataField="time_card_no">

 

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn Display="true" ShowFilterIcon="False" UniqueName="Designation"

 

 

HeaderText="Designation" DataField="Designation" CurrentFilterFunction="contains"

 

 

AutoPostBackOnFilter="true">

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn Display="true" ShowFilterIcon="False" UniqueName="Department"

 

 

HeaderText="Department" DataField="Department" CurrentFilterFunction="contains"

 

 

AutoPostBackOnFilter="true">

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn Display="false" ShowFilterIcon="False" UniqueName="hand_phone"

 

 

HeaderText="Mobile" DataField="hand_phone" CurrentFilterFunction="contains" AutoPostBackOnFilter="true">

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn Display="false" ShowFilterIcon="False" UniqueName="email" HeaderText="Email"

 

 

DataField="email" CurrentFilterFunction="contains" AutoPostBackOnFilter="true">

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

</radG:GridBoundColumn>

 

 

<radG:GridTemplateColumn AllowFiltering="False" UniqueName="editHyperlink">

 

 

<ItemTemplate>

 

 

<tt class="bodytxt">

 

 

<asp:ImageButton ID="btnedit" AlternateText="Edit" ImageUrl="../frames/images/toolbar/edit.gif"

 

 

runat="server" />

 

 

</ItemTemplate>

 

<%

-- <HeaderStyle Width="30px" />--%>

 

 

<HeaderStyle Width="3%" />

 

 

</radG:GridTemplateColumn>

 

 

<radG:GridClientSelectColumn Visible="false" UniqueName="GridClientSelectColumn">

 

 

 

</radG:GridClientSelectColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<ClientSettings EnableRowHoverStyle="true" AllowColumnsReorder="true" ReorderColumnsOnClient="true" >

 

 

<Selecting AllowRowSelect="true" />

 

 

<Resizing AllowRowResize="False" EnableRealTimeResize="True" ResizeGridOnColumnResize="True"

 

 

AllowColumnResize="True" ClipCellContentOnResize="False" ></Resizing>

 

<%

--<Scrolling UseStaticHeaders="true" AllowScroll="true" ScrollHeight="500px" SaveScrollPosition="True" />--%>

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" />

 

 

<Animation AllowColumnReorderAnimation="true" AllowColumnRevertAnimation="true" />

 

 

</ClientSettings>

 

 

 

</radG:RadGrid>

 

Pavlina
Telerik team
 answered on 02 Sep 2014
5 answers
99 views
Hi Telerik team,
I am having trubble in week view in schduler. when there are lots of appointment in a day same time then my IE Browser goes to hang(Not responding) and Show More... option (navigation) is not showing . But in Month view Show More option is displaying..
Can any one help me sap..
It very argen.

Is any on there from telerik.

Thanks in advanced
Nencho
Telerik team
 answered on 02 Sep 2014
1 answer
120 views
I'm creating dynamic multi header radgrid and inside the rows used colspan as well. everything works fine until i do horizontal scroll. during the horizontal scroll the cells are collapsed and some cells are missing. everything went wrong if we do horizontal scroll. any solution to fix this issue?
Kostadin
Telerik team
 answered on 02 Sep 2014
3 answers
289 views
Hi,

I have created a treelist with treelist select column and allow multi select.

1) When I have selected two nodes, if I select a node by clicking on the node it select that particular node. That behavior is correct.
But when I click the checkbox(select column) it deselects that row. I want to select the row that user clicked irrespective of clicking on the node or
checkbox (select column).

 

2) I have enabled the dragging operation in the treelist. I want to know whether I can delay the start of dragging operation. It seems dragging is
starting as soon as I try to select a node. I can see as user click on the row preview image of dragging node is visible. It disappears quickly. 
But it is does not look nice. This happens with the node selection and slight movement of the mouse which makes start of drag operation

 
I have attached some screenshots for reference

Any help is highly appreciated.

Kostadin
Telerik team
 answered on 02 Sep 2014
0 answers
92 views
Hi,

I am using radpivotgrid control in my webpage to display data from a Olap Cube.
I want to create a new measurement after I have done some calculation on the my data.
The newly created dimension will need to show its value on the pivotgrid.
Do you have any idea on creating a new dimension (perhaps using MDX) and display it on the pivotgrid?  
Thanks.
Silver
Top achievements
Rank 1
 asked on 02 Sep 2014
3 answers
115 views
hi,
need ideas to have a media player which plays selected media file across all pages. have master page and placing radmediaplayer in footer, but player starts playing from beginning when navigating across pages....help is appreciated. ty
Radoslav
Telerik team
 answered on 02 Sep 2014
6 answers
502 views
Hi,
I am using two Rad grids on one of my page. There are some DateTimeColumns created for each of them for DateTime fields. Dates are displayed correctly in DateTime column. 
When I apply filter on DateTime column, it works in one grid but throws exception in another grid, although code is same for both. There is no custom filtering.

For both grids, DateTimeColumn is added programmatically as below:
-------------------------------------------------------------------------------------------------------------------------
GridDateTimeColumn boundColumn = new GridDateTimeColumn();

ProductsGrid.MasterTableView.Columns.Add(boundColumn);
boundColumn.PickerType = GridDateTimeColumnPickerType.DatePicker;
boundColumn.FilterControlWidth = Unit.Pixel(100);
boundColumn.HeaderStyle.Width = Unit.Pixel(110);
boundColumn.DataField = col.SystemName;
boundColumn.UniqueName = col.SystemName;
boundColumn.EnableTimeIndependentFiltering = true;
boundColumn.HeaderText = col.FriendlyName;
boundColumn.DataFormatString = "{0:dd/MM/yyyy}";
boundColumn.AutoPostBackOnFilter = true;
boundColumn.SortExpression = col.SystemName;

boundColumn.CurrentFilterFunction = GridKnownFunction.GreaterThanOrEqualTo;
boundColumn.ShowFilterIcon = true;

boundColumn.Display = col.Visible;
-------------------------------------------------------------------------------------------------------------------------

Exception I am getting while filtering by DateTime Column is :

-------------------------------------------------------------------------------------------------------------------------
Exception Type: Telerik.Web.UI.ParseException

Message: Neither of the types 'String' and 'DateTime' converts to the other

Stack Trace:
at
Telerik.Web.UI.ExpressionParser.GenerateConditional(Expression test,
Expression expr1, Expression expr2, Int32 errorPos)

at Telerik.Web.UI.ExpressionParser.ParseIif()

at Telerik.Web.UI.ExpressionParser.ParseIdentifier()

at Telerik.Web.UI.ExpressionParser.ParsePrimaryStart()

at Telerik.Web.UI.ExpressionParser.ParsePrimary()

at Telerik.Web.UI.ExpressionParser.ParseUnary()

at Telerik.Web.UI.ExpressionParser.ParseMultiplicative()

at Telerik.Web.UI.ExpressionParser.ParseAdditive()

at Telerik.Web.UI.ExpressionParser.ParseComparison()

at Telerik.Web.UI.ExpressionParser.ParseLogicalAnd()

at Telerik.Web.UI.ExpressionParser.ParseLogicalOr()

at Telerik.Web.UI.ExpressionParser.ParseExpression()

at Telerik.Web.UI.ExpressionParser.ParseParenExpression()

at Telerik.Web.UI.ExpressionParser.ParsePrimaryStart()

at Telerik.Web.UI.ExpressionParser.ParsePrimary()

at Telerik.Web.UI.ExpressionParser.ParseUnary()

at Telerik.Web.UI.ExpressionParser.ParseMultiplicative()

at Telerik.Web.UI.ExpressionParser.ParseAdditive()

at Telerik.Web.UI.ExpressionParser.ParseComparison()

at Telerik.Web.UI.ExpressionParser.ParseLogicalAnd()

at Telerik.Web.UI.ExpressionParser.ParseLogicalOr()

at Telerik.Web.UI.ExpressionParser.ParseExpression()

at Telerik.Web.UI.ExpressionParser.Parse(Type resultType)

at Telerik.Web.UI.DynamicExpression.ParseLambda(ParameterExpression[]
parameters, Type resultType, String expression, Object[] values)

at Telerik.Web.UI.DynamicExpression.ParseLambda(Type itType, Type resultType,
String expression, Object[] values)

at Telerik.Web.UI.GridDynamicQueryable.Where(IQueryable source, String
predicate, Object[] values)

at Telerik.Web.UI.GridDataTableFromEnumerable.FillData35()

at Telerik.Web.UI.GridDataTableFromEnumerable.FillData()

at Telerik.Web.UI.GridResolveEnumerable.Initialize()

at Telerik.Web.UI.GridResolveEnumerable.EnsureInitialized()

at Telerik.Web.UI.GridResolveEnumerable.get_DataTable()

at Telerik.Web.UI.GridEnumerableFromDataView..ctor(GridTableView owner,
IEnumerable enumerable, Boolean CaseSensitive, Boolean autoGenerateColumns,
GridColumnCollection presentColumns, String[] additionalField, Boolean
retrieveAllFields, Boolean enableSplitHeaderText)

at Telerik.Web.UI.GridDataSourceHelper.CreateGridEnumerable(GridTableView
owner, IEnumerable enumerable, Boolean caseSensitive, Boolean
autoGenerateColumns, GridColumnCollection presentColumns, String[]
additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText)

at Telerik.Web.UI.GridDataSourceHelper.GetResolvedDataSource(GridTableView
owner, Object dataSource, String dataMember, Boolean caseSensitive, Boolean
autoGenerateColumns, GridColumnCollection presentColumns, String[]
additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText)

at Telerik.Web.UI.GridTableView.get_ResolvedDataSource()

at Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource)

at Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource,
Boolean useDataSource)

at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable
data)

at
System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable
data)

at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
DataSourceViewSelectCallback callback)

at System.Web.UI.WebControls.DataBoundControl.PerformSelect()

at Telerik.Web.UI.GridTableView.PerformSelect()

at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()

at Telerik.Web.UI.GridTableView.DataBind()

at Telerik.Web.UI.GridTableView.Rebind()

at Telerik.Web.UI.GridFilterCommandEventArgs.ExecuteCommand(Object source)

at Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e)

at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)

at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e)

at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)

at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e)

at Telerik.Web.UI.GridItem.FireCommandEvent(String commandName, Object
commandArgument)

at Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument)

at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,
String eventArgument)

at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)

at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

-------------------------------------------------------------------------------------------------------------------------

Can someone please let me know the reason for this exception?

Best Regards
Tushar
Eyup
Telerik team
 answered on 02 Sep 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?