Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
198 views

There doesn't seem to be a good solution for printing the control itself. 

So, one solution would just be to show a pop-up and write the contents of the control out to html.  I would need to do this for Day, Week, Month and Multi-Day views available in the control.  It's not a difficult task but time consuming if you figure in formatting etc.

By any chance did anyone do this already and what to share the code?  

Can someone suggest a better solution?

 

T. Tsonev
Telerik team
 answered on 06 Aug 2010
1 answer
129 views
Hai,

How the grid filtering is working? On which property, the filter text is saving? I want to assign filter text through code behind.

Plz help.
Princy
Top achievements
Rank 2
 answered on 06 Aug 2010
1 answer
304 views
I am building application component with some restrictions. User control contains following:

<

 

rad:RadAjaxManager ID="RadAjaxManager1" runat="server"></rad:RadAjaxManager>

 

<

 

rad:RadAjaxPanel ID="RadAjaxPanel" runat="server" HorizontalAlign="NotSet" LoadingPanelID="AjaxLoadingPanel1" ScrollBars="None">

 

 

<div style="display:none;">

 

 

<asp:Button ID="btnRebind" runat="server" onclick="btnRebind_Click" />

 

 

</div>

 

 

<asp:Repeater ID="lstRefs" runat="server" OnItemDataBound="lstRefs_ItemDataBound" OnItemCreated="lstRefs_ItemCreated"></asp:Repeater>

 

 

<asp:PlaceHolder ID="ph" runat="server"></asp:PlaceHolder>

 

 

<uc:SubWin ID="winRefEdit" runat="server" TargetPage="RefEdit.aspx" />

 

</

 

rad:RadAjaxPanel>

 

<

 

rad:AjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Transparency="0">

 

 

<table style="height:100%;width:100%;" border="0">

 

 

<tr style="vertical-align:middle">

 

 

<td style="text-align:center;">

 

 

<img src='timer.gif' alt='Timer' />

 

 

</td>

 

 

</tr>

 

 

</table>

 

</

 

rad:AjaxLoadingPanel>

When I define ItemTemplate inside component - everything works well. However, there is a special requirement to make template editable by simple tools (texteditor). That is why I am defining template as ITemplate control in code and assign it to Repeater. In aspx page user places something like:

<table>
<uc:SpecialCompoment ID="sp1" runat="server>
   <MyItemTemplate>
      <tr>
         <td>Name:<ItemData Field="Name"></td><td style="font-weight:bold">Last name:<ItemData Field="Surname"></td>
      </tr>
   </MyItemTemplate>
</uc:SpecialCompoment>
</table>

Then I am parsing the content of template at ItemDataBound event and replacing artificial tags <ItemData> with real values.

Now I need to add controls to issue command to update/delete records. I am catching ItemCreated event and parsing the template for <ItemAction Action="Edit"> and <ItemAction Action="Delete"> and replacing them by Button controls, settings unique ID, and CommandName.

Without RadAjaxManager everything works.

With RadAjaxManager it work but result it strange. When loaded it looks like that:

Name:John Last name:Doe Edit Delete
Name:Bill Last name:Smith Edit Delete
Name:Erik Last name:Peters Edit Delete

After editing (by command a subwindow opens and after completion of edit javascript call server to rebind repeater) it looks following:

Name:Joanna Last name:Doe Edit Delete
Name:Bill Last name:Smith Edit Delete
Name:Erik Last name:Peters Edit Delete

Name:John Last name:Doe Edit Delete
Name:Bill Last name:Smith Edit Delete
Name:Erik Last name:Peters Edit Delete


As you can see, it replicated the content (except HTML) of edited repeater ABOVE the original, that stays untouched.

Any idea why it is and how to fix it ?

 

Evgeny Savkhalov
Top achievements
Rank 1
 answered on 06 Aug 2010
2 answers
118 views
Is there a way to not show ALL groups, even when there is no value for that group? Think of a geography example. You have a grid that is grouped by Country, State, County, City. The grouping structure for a row with a value of "Alabama" should be Country: US. Currently it will show as Country: US > State: [blank] > City: [blank]. I don't want the group header to show up if the value is null - in this example, State and City should not show up. How can I accomplish this?

See the attached files for a "before" and doctored "after" screenshot.
Tsvetina
Telerik team
 answered on 06 Aug 2010
3 answers
203 views
Hello Telerik Team,

Taking this and this into reference.
Please help me in reading this multilevel xml to a RadGrid.
1) I am planning not to use Aspx for this
2) The node named Item would eventually change as per app Requirements. So, I don't want to restrict my xpath to something like "//Product/Item"

<Products>
      <Product ProductID="1">
        <Item ItemID="1">
          <ProductNo>1234</ProductNo>
          <Description>
            <ManufacDate>20100526T12:00:01.012</ManufacDate>
            <ManufacID>72</ManufacID>
          </Description>
        </Item>
        <Item ItemID="2">
          <ProductNo>1235</ProductNo>
          <Description>
            <ManufacDate>20100527T12:00:01.012</ManufacDate>
            <ManufacID>72</ManufacID>
          </Description>
        </Item>
        <Item ItemID="3">
          <ProductNo>1236</ProductNo>
          <Description>
            <ManufacDate>20100528T12:00:01.012</ManufacDate>
            <ManufacID>66</ManufacID>
          </Description>
        </Item>
     </Product
       <Product ProductID="2">
        <Item ItemID="1">
          <ProductNo>1254</ProductNo>
          <Description>
            <ManufacDate>20101226T12:00:01.012</ManufacDate>
            <ManufacID>1232</ManufacID>
          </Description>
        </Item>
        <Item ItemID="2">
          <ProductNo>1T#2345</ProductNo>
          <Description>
            <ManufacDate>20100520T12:00:01.012</ManufacDate>
            <ManufacID>474#</ManufacID>
          </Description>
        </Item>
        <Item ItemID="3">
          <ProductNo>124576</ProductNo>
          <Description>
            <ManufacDate>20010518T12:00:01.012</ManufacDate>
            <ManufacID>T3455</ManufacID>
          </Description>
        </Item>
     </Product   
 </Products>
I am reading this xml from codebehind and iterating through xmlnodes to display in the grid.
Please find my snippet below:

Private Sub Page_Init(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Init
        DefineGridStructure()
    End Sub
  
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim Grid1 As RadGrid = CType(PlaceHolder1.FindControl("RadGrid1"), RadGrid)
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(Grid1, Grid1)
        If Not IsPostBack Then
            Grid1.SelectedIndexes.Add(1, 0, 1)
            'Grid1.MasterTableView.Items(0).Expanded = True
            'Grid1.MasterTableView.Items(0).ChildItem.NestedTableViews(0).Items(0).Expanded = True
        End If
    End Sub
   

    Public Sub DefineGridStructure() 'Handles RadGrid1.NeedDataSource
        Dim RadGrid1 As RadGrid = New RadGrid

 

        Dim xmlDoc As New System.Xml.XmlDocument()
        xmlDoc.Load(Server.MapPath("OutTypeID6.xml"))

        Dim ndList As System.Xml.XmlNodeList = xmlDoc.SelectNodes("//Product/node()[descendant::node()]")
        Dim nd As System.Xml.XmlNode = xmlDoc.SelectSingleNode("//Product/node()[descendant::node()]")

        Dim ds As New DataSet()
        ds.ReadXml(New StringReader(nd.OuterXml))

        RadGrid1.ID = "RadGrid1"
        RadGrid1.DataSource = ds

        RadGrid1.Width = Unit.Percentage(98)
        RadGrid1.AllowPaging = True
        RadGrid1.AllowSorting = True
        RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric
        RadGrid1.AutoGenerateColumns = False
        RadGrid1.ShowStatusBar = True

        RadGrid1.MasterTableView.DataKeyNames = New String() {nd.Name}

        Dim boundColumn As GridBoundColumn

        Dim tableView As New GridTableView(RadGrid1)
        Dim relationFields As GridRelationFields = New GridRelationFields()
        For Each xmlnode As System.Xml.XmlNode In ndList
            For Each XNode As System.Xml.XmlNode In xmlnode.ChildNodes
                boundColumn = New GridBoundColumn
                boundColumn.DataField = XNode.Name 'XNode.FirstChild.Value
                boundColumn.HeaderText = XNode.Name
                RadGrid1.MasterTableView.Columns.Add(boundColumn)

                If XNode.FirstChild.ChildNodes.Count > 0 Then
                    tableView.DataSource = ds.Tables(1)
                    For Each chNode As System.Xml.XmlNode In XNode.ChildNodes
                        tableView.DataKeyNames = New String() {chNode.Name}
                        tableView.Width = Unit.Percentage(100)
                        relationFields.MasterKeyField = XNode.ParentNode.Name 'chNode.ParentNode.Name
                        relationFields.DetailKeyField = XNode.ParentNode.Name 'chNode.ParentNode.Name
                        tableView.ParentTableRelation.Add(relationFields)
                        RadGrid1.MasterTableView.DetailTables.Add(tableView)

                        boundColumn = New GridBoundColumn
                        boundColumn.DataField = chNode.Name 'XNode.FirstChild.InnerText
                        boundColumn.HeaderText = chNode.Name
                        tableView.Columns.Add(boundColumn)

                    Next
                    tableView.Caption = XNode.Name
                    tableView.DataBind()
                End If
                tableView.Width = Unit.Percentage(100)
            Next
        Next
        RadGrid1.DataSource = ds
        RadGrid1.Rebind()

        Me.PlaceHolder1.Controls.Add(RadGrid1)

It would be great if you can help me correct or provide a solution to this issue without converting to XSL.
I need the Columns: ItemID, ProductNo, indented Description with ManufacDate and ManufacID. I m not sure how to get this displayed.

Thanks,
Radoslav
Telerik team
 answered on 06 Aug 2010
5 answers
377 views
Hi,

is it possible to make a whole row in a grid a hyperlink?
So when the user moves the mouse over thr row, no matter in what field, he can click the whole row and is redirected?

Thanks in advance for your help

Best regards

Thomas
Veli
Telerik team
 answered on 06 Aug 2010
1 answer
68 views
Hi All,
I am trying to implement custom filtering. I want to use my own css styles, so used 'EnableEmbeddedSkins=false' and 'EnableEmbeddedBaseStylesheet=false'.
But filter menu options are not working properly i.e. the filter menu options are not been seen properly and i am not able to do filtering.

Can anybody help me on this.

I read a note on telerik website-
Important:
RadGrid may create other RadControls as part of its elements (slider pager, filtering menu, date pickers in GridDateTimeColumns, etc.) and you will need to perform the same steps for these controls as well!

Which steps to do for this???

Any response would be helpful.

Thanks in advance.
Veli
Telerik team
 answered on 06 Aug 2010
1 answer
128 views
HI there,

If I enter a non-numeric character in the column filter of a numeric column, the page crashes. My customer is getiing it crashed this way. I would have expected to have an inbuilt exception handling for this in RadGrid.

Is there something that you can suggest a fix for?

cheers
_Phani
Shinu
Top achievements
Rank 2
 answered on 06 Aug 2010
1 answer
88 views
Hi,
    when I use the radgrid client side rebind method the call back to the server is a new session and hence looses any previous session variables.

 

 

var masterTable = RadGridRPjs.get_masterTableView();

 

masterTable.rebind();


Is this a bug?
Veli
Telerik team
 answered on 06 Aug 2010
1 answer
114 views
Hello guys. I get data for tree from wcf by dto
[DataContract]
[Serializable]
 public class FileHandlerDTO
{
        [DataMember]
        public int Id { get; set; }
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string Description { get; set; }
        [DataMember]
        public List<FileHandlerDTO> Children;
}
How can i bind this object to TreeView. At your samples I've seen only through parentId. Your SL analogue of treeview work with such domains well.
T. Tsonev
Telerik team
 answered on 06 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?