Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
64 views
Hello everyone,

I have a question with regards to Radscheduler date display. By default, my scheduler will only show MonthView. For some reasons, the first day of the month always shows as MMM dd format. I want it to show a single digit day but the closest I'm able to do it is by changing the attribute FirstDayHeaderDateFormat to take a value of "dd", which effectively turns it into 01.

I tried supplying it a value of "d" but to no avail. When I used "d", I ended up with 01/03/2013 format. Is there anyway to keep the first day of the month to single digit?

Thanks in advance.
Jonathan
Top achievements
Rank 2
 answered on 26 Mar 2013
2 answers
164 views
I have a radGrid control with that loads a binary image from a sqlDataSource in a GridBinaryImageColumn. It works fine, but I attached an onclick event with code behind, and use a javascript/jquery block code to zoom the image.

The problem is that the image is downloaded using the height/width properties, and when I resize the image, it is grainy, because it was set to resize mode fit. This is great because the image is small so the download is fast.

However, I am using a jQuery Light Box to display the image when it is clicked. Code works fine, except I am using the link from the cell.innerHTML to load the image in a lightbox, and this is the code:

var selectedCell = args.get_gridDataItem().get_cell("UploadPicture");
var image = selectedCell.innerHTML;
var myHref = $(image).attr('src');
 
The src is something like src="Telerik.Web.UI.WebResource.axd?imgid=c7c37cd7e2874a99a04cfe282e769c95&type=rbi"

The image loads fine, however, if I try to resize the image using height/width attributes, the image becomes grainy because the original image that was downloaded was compressed to the settings in the grid control.

Question, is there an easy way to use the Telerik.Web.UI.WebResource.axd?imgid method to call a different size of the same image?

Or, is there an easier way to accomplish this?

Thanks in advance.

Henry
Top achievements
Rank 1
 answered on 26 Mar 2013
3 answers
160 views
Is it possible to add context menu to each node in the Orag chart.
Kate
Telerik team
 answered on 26 Mar 2013
1 answer
117 views
I'm trying to created a grid hierarchy as outlined in this example. I'm using the DetailsTables method (as opposed to NestedViewTemplate) and I would like to put a GridClientSelectColumn on the sub-grid, allowing the user to select only one item from each sub-grid. When i set the parent's AllowMultiRowSelection="False", however, this causes all the sub-grid's to act as a single group, allowing the user to only select 1 item from ALL sub-grids. The definition for my grid is as follows

<telerik:RadGrid runat="server" ID="ledger" Width="900px" AllowSorting="true" AllowPaging="true" AutoGenerateColumns="false" PageSize="10" AllowFilteringByColumn="true" OnNeedDataSource="ledger_NeedDataSource" OnDetailTableDataBind="ledger_DetailTableDataBind" AllowMultiRowSelection="False">
  <GroupingSettings CaseSensitive="false" />
  <ClientSettings EnableRowHoverStyle="true" EnableAlternatingItems="true">
    <Selecting AllowRowSelect="True"  UseClientSelectColumnOnly="True"/>
  </ClientSettings>
  <MasterTableView DataKeyNames="SubstanceId, Name, CAS" ClientDataKeyNames="SubstanceId"  
        ShowHeadersWhenNoRecords="true" CommandItemDisplay="None" Font-Size="10">
    <DetailTables>
      <telerik:GridTableView runat="server" Name="SuggestedComponents" PageSize="5"
            AllowFilteringByColumn="False" AllowSorting="False" AutoGenerateColumns="False" ShowFooter="True">
        <Columns>
          <telerik:GridBoundColumn HeaderText="Name" UniqueName="SuggestionPrimaryName"
               DataType="System.String" AllowSorting="False" AllowFiltering="False" DataField="PrimaryName" />
          <telerik:GridBoundColumn HeaderText="CAS" UniqueName="SuggestionCAS" DataType="System.String"
                AllowSorting="False" AllowFiltering="False" DataField="CAS" />
          <telerik:GridClientSelectColumn UniqueName="SuggestionSelect" />
        </Columns>
      </telerik:GridTableView>
    </DetailTables>
    <Columns>
      <telerik:GridBoundColumn AllowSorting="true" DataType="System.String" UniqueName="SubstanceName"
            HeaderText="Name" DataField="Name" />
      <telerik:GridBoundColumn AllowSorting="true" DataType="System.String" UniqueName="CAS"
            HeaderText="CAS" DataField="CAS" />
      <telerik:GridBoundColumn AllowSorting="true" DataType="System.String" UniqueName="ProductCode"
            HeaderText="Product Code" DataField="ProductCode" />
      <telerik:GridBoundColumn AllowSorting="true" DataType="System.String" UniqueName="ClientSubstanceId"
            HeaderText="Client ID" DataField="ClientSubstanceId" />
    </Columns>
  </MasterTableView>
</telerik:RadGrid>

How can I achieve a single-select-per-sub-grid behavior?
Kostadin
Telerik team
 answered on 26 Mar 2013
1 answer
55 views
It appears that with the latest release the sprite file for the radcombobox has changed. With the previous version we modified the photoshop file to create a "Required" image that would be substituted out if the combo failed validation. With this change our modified image no longer works. Is there a photoshop file available for the sprites for the latest version of the radcombobox?

Thanks,
Kate
Telerik team
 answered on 26 Mar 2013
22 answers
384 views
Hi All,

I was wondering if anyone is using the HierarchyID to create XML for the treeview control, or even better if Telerik is making a change to bind a treeview to a dataset with the HierarchyID datatype.

I found this post, but there was no follow up from Telerik.

Thanks
Mako
Top achievements
Rank 1
 answered on 26 Mar 2013
1 answer
167 views
Hi,

When i expand a row in dynamic radgrid, i get error "Microsoft Jsscript runtime error: 'null' is null or not an object" on client side. I have used Client HierarchyLoadMode.

OrdersGridz.MasterTableView.HierarchyLoadMode =

 

GridChildLoadMode.Client;

 

 
Please see the error attached. Please help, it is killing me.

Code behind:
public void LoadDynamicData()
   {
       List<Orders> lstOrders = new List<Orders>();
       lstOrders.Add(new Orders() { CompanyName = "Readable VoiceMail", OrderID = 1, OrderDate = DateTime.Now, TelNumbers = "1234567890" });
       lstOrders.Add(new Orders() { CompanyName = "Call Blocking", OrderID = 3, OrderDate = DateTime.Now, TelNumbers = "1234567890" });
       lstOrders.Add(new Orders() { CompanyName = "Readable VoiceMail", OrderID = 2, OrderDate = DateTime.Now, TelNumbers = "1237894560" });        
       var telNumbers =
              (from dbo in lstOrders
               select dbo.TelNumbers).Distinct().OrderBy(TelNumbers => TelNumbers);
       RadGrid OrdersGridz = new RadGrid();
       foreach (string tel in telNumbers)
       {
           OrdersGridz = new RadGrid { ID = "OrdersGridz" };
                       
           OrdersGridz.ClientSettings.AllowExpandCollapse = true;
           OrdersGridz.DetailTableDataBind += new GridDetailTableDataBindEventHandler(OrdersGridz_DetailTableDataBind);
           OrdersGridz.EnableLinqExpressions = false;
           OrdersGridz.MasterTableView.ShowHeader = true;
             
           GridTableView tableViewOrders = new GridTableView(OrdersGridz);
           tableViewOrders.ClientDataKeyNames = new string[] { "OrderID" };
           tableViewOrders.DataKeyNames = new string[] { "OrderID" };
           tableViewOrders.Name = "Orders";
           tableViewOrders.AutoGenerateColumns = true;
           GridRelationFields relationFields = new GridRelationFields();
           relationFields.MasterKeyField = "OrderID";
           relationFields.DetailKeyField = "OrderID";
           tableViewOrders.ParentTableRelation.Add(relationFields);
           OrdersGridz.MasterTableView.AutoGenerateColumns = true;
           OrdersGridz.MasterTableView.ClientDataKeyNames = new string[] { "OrderID" };
           OrdersGridz.MasterTableView.DataKeyNames = new string[] { "OrderID" };
           OrdersGridz.MasterTableView.HierarchyLoadMode = GridChildLoadMode.Client;
           OrdersGridz.MasterTableView.DetailTables.Add(tableViewOrders);
           OrdersGridz.InsertCommand+=new GridCommandEventHandler(OrdersGridz_InsertCommand);
            
           var lstOrdersz =
              (from dbo in lstOrders
               select dbo).Where(x => x.TelNumbers.Equals(tel)).ToList();
           OrdersGridz.DataSource = lstOrdersz;
           OrdersGridz.DataBind();
             
           //adding raddock dynamically
           RadDock dock = new RadDock();
           dock.ID = tel;
           dock.Title = tel;
           dock.DockMode = DockMode.Docked;
           dock.EnableDrag = false;
             
           dock.Commands.Add(new DockExpandCollapseCommand());
           dock.Command += new DockCommandEventHandler(dock_Command);
           dock.ContentContainer.Controls.Add(OrdersGridz);
           RadDockZone5.Controls.Add(dock);
                      
       }        
   }
   protected void OrdersGridz_InsertCommand(object sender, GridCommandEventArgs e)
   {
       if (e.CommandName == RadGrid.ExpandCollapseCommandName)
       {
             
       }
   }
   protected void OrdersGridz_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
   {
       List<Products> lstProducts = new List<Products>();
         
       lstProducts.Add(new Products() { ProductName = "A", UnitPrice = 0, OrderID = 1 });
       lstProducts.Add(new Products() { ProductName = "B", UnitPrice = 0, OrderID = 1 });
       lstProducts.Add(new Products() { ProductName = "C", UnitPrice = 0, OrderID = 1 });
       lstProducts.Add(new Products() { ProductName = "X", UnitPrice = 0, OrderID = 2 });
       lstProducts.Add(new Products() { ProductName = "Y", UnitPrice = 0, OrderID = 2 });
       lstProducts.Add(new Products() { ProductName = "M", UnitPrice = 0, OrderID = 3 });
       lstProducts.Add(new Products() { ProductName = "N", UnitPrice = 0, OrderID = 3 });
       lstProducts.Add(new Products() { ProductName = "O", UnitPrice = 0, OrderID = 3 });
       lstProducts.Add(new Products() { ProductName = "P", UnitPrice = 0, OrderID = 3 });
       GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
       switch (e.DetailTableView.Name)
       {
           case "Orders":
               {
                   string OrderID = dataItem.GetDataKeyValue("OrderID").ToString();
                   e.DetailTableView.DataSource = lstProducts.Where(x => x.OrderID.ToString().Equals(OrderID, StringComparison.OrdinalIgnoreCase)).ToList();
                   break;
               }
       }
   }


Thanks in Advance for your help.

Ashok
Angel Petrov
Telerik team
 answered on 26 Mar 2013
0 answers
153 views
Hi 

i have created a query for my treeview hierarchy and it displays fine, i have also added the tootip value and can see this for each level - a sample is below

001 (company)
001001 (company & location)
001001005 (company & location & module)
001001005001 (company & location & module & addon)
001001005002 (company & location & module & addon)
001001005003(company & location & module & addon)
001001005004(company & location & module & addon)
001001005005(company & location & module & addon)

As i say this renders fine but my problem is that when i try to get the values of what the user selects some values are missing from in this instance 001001005002

Here is a snippet of my code

public void saveCheckedPrivileges()
{
    int test = RadTreeView2.CheckedNodes.Count;
    if (RadTreeView2.CheckedNodes.Count > 0)
    {
        IList<RadTreeNode> nodeCollection = RadTreeView2.CheckedNodes;
        string startingRec = null;
        string[] val = null;<br>               
        List<string[]> valsToStore = new List<string[]>();
        foreach (RadTreeNode node in nodeCollection)
        {
             string fileid = node.Value.ToString();
             //Do Whatever with checked value
        }
}

i've also tried with GetAllNodes() and the result is the same - any help would be greatly appreciated :)

Ciaran
Top achievements
Rank 1
 asked on 26 Mar 2013
3 answers
238 views
Hello,
I have a Radgrid (horizontal scrolling turned on) that has about 15 columns and within that I have a RadAsyncUpload control to upload documents in the Edit mode. The display looks good when in ItemTemplate but when I try to edit the record inline, the RadAsyncUpload column displays outside of the RadGrid and far towards the right on the screen. I tried to use a TextBox and RadUpload instead of the RadAsyncUpload control and noticed that Textbox position works fine in edit mode but not RadUploads position. It behaves the same as RadAsyncUpload control.

I have attached the image of the grid that shows the Attachment column and where the RadAsyncUpload control is supposed to be positioned( position 1) and where it is being positioned (position 2).

I have played around a lot with changing the css, z-index, put the control within div tags with css class but nothing seems to be working.

Appreciate all your help,

Kal.
Kostadin
Telerik team
 answered on 26 Mar 2013
2 answers
74 views
Hello Friends:

I have a problem with change the editCommandColumn to the butom on the ItemTemplate.
Who can I fire the ColumnEdit when i click in the buttom edit of the ItemTemplate?
And other solution?

Thanks for your information.
Santos
Top achievements
Rank 1
 answered on 26 Mar 2013
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?