Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
332 views
How do I need to configure my RadGrid and EntityDataSource to get them to work with hierarchy? I got this to work with LinqToSql but it doesn't seem to work for me with EntityDataSource. I currently have:

<telerik:GridTableView Name="ListItems" DataKeyNames="Id, Parent.Id" DataSourceID="ListItemsDataSource" ... runat="server">
<ParentTableRelation><telerik:GridRelationFields DetailKeyField="Parent.Id" MasterKeyField="Id" /></ParentTableRelation>

<asp:EntityDataSource ID="ListItemsDataSource" ContextTypeName="Blah.Bah" EntitySetName="ListItem" Include="Parent" Where="it.Parent.Id == @ParentId" OrderBy="it.SortOrder" ... runat="server">
<WhereParameters>
 <asp:Parameter Name="ParentId" Type="Int32" />
</WhereParameters>                    
</asp:EntityDataSource>

I'm pretty sure my problem is with the where parameter. It's not hooking into the Grid to fiter the results right. With LinqToSql the DataKeyNames and where paramenters could be identical and it worked, but with entities the DataKeys need to have a dot in them referencing the next object, and you can't put a dot in the parameter name of the where parameter used to filter the datasource. I've tried a bunch of different combinations of ParentId / Parent.Id but I can't seem to get my hierarchy to select with results filtered by the parent record.

If y'all would be kind enough to tell me what time it is or post an example of a grid with hierarchy using two EntityDataSource controls I'd be mighty appreciative. I am also using Automatic CRUD operations on these EntityDataSource controls so I don't think using a fully custom select is going to work, with LINQ I had to use Where.

bd



Andy
Top achievements
Rank 1
 answered on 09 Dec 2013
2 answers
581 views
I'm in the process of converting all my <asp:radiobutton> and <asp:Checkbox> controls over to <telerik:radbutton> setting ButtonType="ToggleButton"  and ToggleType="CheckBox" || ToggleType="Radio".  We're making these updates so that the controls can be custom-styled using CSS. This is working well but we're running into just one issue.  What we're struggling with is figuring out how to change the color of the checkbox text based on whether the checkbox is checked or not checked.  I've turned on every optional CssClass attribute to see what's rendered in the output, but i don't see any class name changes to the <span> around the text element.

Regardless of whether the checkbox is checked or not-checked, the output HTML looks like:

<span class="rbText rbSecondary">
    This is my checkbox text.
</span>

I can see that the <span> tag that contains the primary icon has a class that changes from rbToggleCheckbox to rbToggleCheckboxChecked when the checkbox is checked.  How can we accomplish the samething with the text portion of the checkbox?  I was really kind of expecting to see something like a SelectedCss attribute or something like some of your other controls have.  I experimented with the PressedCssClass attribute but that only seems to be active for a split second while the item is being pressed.  if the page loads and the checkbox is initially checked that class isn't referenced. 

Any advice you have for us is greatly appreciated.
Thanks!
-Mark
Mark Kucera
Top achievements
Rank 1
 answered on 09 Dec 2013
0 answers
96 views
post deleted
AAA
Top achievements
Rank 1
 asked on 09 Dec 2013
3 answers
82 views
I am building a filter string based on a list of dynamic fields and saving the filter using the SaveSettings() encoded string.  I need to be able to restore this as well, however, it is possible that some of the fields in the filter are no longer available.  When this is the case, LoadSettings() throws an Object reference exception at RadFilterDataFieldEditor.  I would like to be able to simply invalidate the expressions that are no longer able to be part of the filter, but the exception doesn't give me any detail to work with.

Is there an alternate way of loading the expressions from the encoded string that would give me this detail?
Vasil
Telerik team
 answered on 09 Dec 2013
15 answers
729 views
Hi,

I have a RadTreeView control with checkboxes enabled.I have set the checkChildNodes property to true. so when i check/uncheck on parent node all the child nodes under it gets checked/unchecked.

Now my requirement is all the child nodes should get checked only when i double click on parent node and if i just make a single click only individual nodes should get checked ? how to make it possible any ideas or sample code would be appreciated. please reply asap.

Thanks in advance.
Massimiliano
Top achievements
Rank 1
 answered on 09 Dec 2013
3 answers
41 views

Hi,

i will have three Editors on a site (looks like my added Image)

Is it possible to have one external Toolbar for all the three Editors?

I hope you understand what i meen.

greetings

Johann

Marin Bratanov
Telerik team
 answered on 09 Dec 2013
1 answer
390 views
Is there any way to create a RadWindow without iFrames.. I have a signature control I would like to use in a window but if does not work within an iFrame

Thanks
Marin Bratanov
Telerik team
 answered on 09 Dec 2013
2 answers
181 views
I have been looking for a means to find a radcombo control where I know the name of the control  (for example RadCombo ID =" RadComboColumn1" ) in a radGrid header...  CLIENT SIDE JAVASCRIPT

Any suggestions?


function confirmCallBackFn(arg) {
              if (arg == false) {
                  $.unblockUI();
                  return false;
              }
              $.unblockUI();
               
 
              var grid = $find("<%=RadGridImport.ClientID %>");
              var masterTableView = grid.get_masterTableView();
              var columns = masterTableView.get_columns();
              var columnCount = masterTableView.get_columns().length;
 
              //TODO:  Loop and get collection of radcombo's in headers and selected value.
              var selectedColumnFields = new Array();
              for (var i = 0; i < columnCount; i++) {
                  //TODO:  Find control in radgrid hearder.
                  var col = columns[i]????????;
var RadCombo = ????
                //.get_item().findControl("columm1");
              }
  
              __doPostBack("<%= FinishButton.UniqueID %>", "");
              return true;
          }

While this code works on the serverside, I am needing to convert this to the clientside:  var columnComboBox = headers[0].FindControl(columnName) as RadComboBox;


private List<ValueName> GetUserSelectedColumnMapping()
       {
           //Get the number of columns in the dynamic grid -2 hidden columns
           int radGridColumnCount = RadGridImport.MasterTableView.RenderColumns.Count() - 2;
 
           //Selected Column Type Mapping translates a dynamic column to a valid database table field.
           var selectedColumnTypeMapping = new List<ValueName>();
           GridItem[] headers = RadGridImport.MasterTableView.GetItems(GridItemType.Header);
           for (int i = 0; i < radGridColumnCount; i++)
           {
               string columnName = String.Format("Column{0}", i);  //Column{value} is set in the radgrid item created event.
               var columnComboBox = headers[0].FindControl(columnName) as RadComboBox;
               string selectedText = string.Empty;
               if (columnComboBox != null)
               {
                   var selected = columnComboBox.SelectedValue;
                   if (columnComboBox.SelectedItem != null)
                   {
                       selectedText = columnComboBox.SelectedItem.Text;
                   }
 
                   //Add the users selection to the mapping list.
                   selectedColumnTypeMapping.Add(new ValueName() { Name = selectedText, Value = selected, ColumnIndex = i });
               }
           }
 
           return selectedColumnTypeMapping;
       }
Wired_Nerve
Top achievements
Rank 2
 answered on 09 Dec 2013
9 answers
240 views
Calendar inside scheduler control cuts off when no records available for scheduler. Please see screenshot.

Second question - How to default scheduler to the current week in the timeline view. It appears to always default to the first week.

Thanks
Ash
Boyan Dimitrov
Telerik team
 answered on 09 Dec 2013
2 answers
146 views
How do i save / I export the entire grid to the sql server  database containing about 1000 item?
Like export data to excel.........
Princy
Top achievements
Rank 2
 answered on 09 Dec 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?