Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
258 views

Hi,

I have a radtreeview control.  I bind this during the page load event.  I’d like to add some attributes to the nodes.

So far I have done this via the NodeDataBound event.  However what I really need to do is store some data from the original datatable in some attributes.

I guess to do this I need to create the radtreeview by looping through the datable and creating the nodes individually.  When I do this I can’t see a way to set the parent IDs?

Any suggestions?

Anton
Telerik team
 answered on 09 Nov 2016
3 answers
121 views
Please check in image  Grids are not Binding Correctly for the First Time when i search an ID . But after opening any FORM from these Binded Grids and came back to home then its looks fine . But why its not bind first time. ???Check in image Grid Blue Strips that's causing issue to perform task!..  Please Help me .
Quest
Top achievements
Rank 1
 answered on 09 Nov 2016
1 answer
94 views

Hi,

 

I have integrated radslider on one ouf our website, unfortunately it was not displying after deployment, it just shows 'Decrease' and 1 only. Please help

 

Dileep

Marin Bratanov
Telerik team
 answered on 09 Nov 2016
8 answers
1.6K+ views
Hi All ,
I need to customize the caption of the rad grid , but can find any way , to do it , the best thing i was Able to reach was customizing the header , is there any way to handle this matter and customize the caption or this is a limitation in the tool
Eyup
Telerik team
 answered on 09 Nov 2016
2 answers
123 views

I have a grid with two buttons on each row, open and remove. Using OnItemCommand click the button goes to the code fine, the remove button works fine but the open button always gets the id from the first row.

This is the code that creates the two buttons, the same except for the names and images.

                    GridButtonColumn gridButtonColumn = new GridButtonColumn();
               gridButtonColumn.ButtonType = GridButtonColumnType.ImageButton;
               gridButtonColumn.ImageUrl = "~/Images/OpenLinkIcon.png";
               gridButtonColumn.CommandName = "OpenLink";
               gridButtonColumn.UniqueName = "OpenLink";
               gridButtonColumn.Text = "Open Signup Template";
               gridButtonColumn.Display = true;
               gridButtonColumn.HeaderText = "";
               gridButtonColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
               gridButtonColumn.HeaderStyle.Width = Unit.Pixel(40);
               signupGrid.MasterTableView.Columns.Add(gridButtonColumn);

 

               gridButtonColumn = new GridButtonColumn();
               gridButtonColumn.ButtonType = GridButtonColumnType.ImageButton;
               gridButtonColumn.ImageUrl = "~/Images/DeleteIcon.png";
               gridButtonColumn.CommandName = "Delete";
               gridButtonColumn.UniqueName = "Delete";
               gridButtonColumn.Text = "Remove Signup Template";
               gridButtonColumn.Display = true;
               gridButtonColumn.HeaderText = "";
               gridButtonColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
               gridButtonColumn.HeaderStyle.Width = Unit.Pixel(40);
               signupGrid.MasterTableView.Columns.Add(gridButtonColumn);

 

This is the grid definition

<div id="GridDiv" runat="server" >
    <asp:panel runat="server" ID="Panel1"  CssClass="windowPercent" >
        <telerik:RadGrid runat="server" ID="SignupGrid" OnItemCommand="Grid_ItemCommand"></telerik:RadGrid>                 
    </asp:panel>
</div>

 

And  this the aspx.cs code for the Grid_ItemCommand.

protected void Grid_ItemCommand(object source, GridCommandEventArgs e)
{
    if (isPageRefresh || e == null || e.Item == null) {
        return;
    }
    
    GridDataItem item = (GridDataItem)e.Item;
    string strId = item[SignupListData.FIELD_ID].Text;
    switch (e.CommandName) {
        case "Delete":
            string name = item[SignupListData.FIELD_NAME].Text;
            lblConfirm.Text = "Are you sure you want to remove sigup template \"" + name + "\"?";
            RemoveSignup.Value = "Yes";
            RemoveId.Value = strId;
            break;
        case "OpenLink":
            this.Response.Redirect("/Signup/Design/" + strId);
            break;
    }
}

 

The   and name values for Delete is the proper one for the row, while the  for OpenLink is always the FIELD_ID from the first row,

Searching the forums  and examples I found several different ways of getting the field id value but none of them worked.

No idea how to fix this problem.

George

FYI: the form to post this to the forum has a buggy edit box.  If I backspace once its works but further ones will skip to the front of words removing spaces unexpectedly.  It was rather difficult to make this post.

George
Top achievements
Rank 2
 answered on 08 Nov 2016
1 answer
114 views

Hi,

Would it be possible to resize the RadWindow proportional only when manually resizing?

So, like when holding Shift key in PhotoShop.

 

Marc

Vessy
Telerik team
 answered on 08 Nov 2016
1 answer
370 views

Here is the idea: a tree view with nodes. Once a node is clicked, the server generates a panel with some buttons specific for that node. Those buttons once clicked (Click event postback) call the event handler on the server. Basically dynamically created nodes with postbacks after being clicked create buttons with postbacks. 

Here is my approach: I have a RadTreeView with some data. The RadTreeView has a "OnNodeClick" event handler that gets the actual clicked node. Then the server generates dynamically buttons on a panel based on the value in the node. Problem is that the "OnNodeClick" event handler is fired after the page load and therefore the postbacks from the buttons are not bound. So I tried another approach by adding the selected node value to the ViewState and then reading from it at Page_Load, but the problem is still the same. The chain is Page_Load -> OnNodeClicked, so the ViewState gets set only after the controls have been generated and therefore only on a second Page_Load I can actually get the value. 

Some code to make it clear:

    protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                    InitTreeNodesFromServices(resourceTree);
            }
            var resourceIdObj = ViewState["ResourceId"];
            if(resourceIdObj != null)
                GenerateButtonsForSelection((string)resourceIdObj);
        }
    protected void resourceTree_OnNodeClick(object sender, RadTreeNodeEventArgs e)
        {
            ViewState.Add("ResourceId", e.Node.Value);
        }

I know it's a simple issue, but I have been stuck with it for a whole day at this point. What is the right way to handle this situation? Maybe I need a different approach? Thank you. 

Ivan Danchev
Telerik team
 answered on 08 Nov 2016
3 answers
1.2K+ views
G'Day Guys,

What is the row above the header but below the caption called (the one with the "Add New Record" and "Refresh") and how do I get a template (small table with some html and images) into it?

Can I also include a similar row below the footer?

You may ask why not just put your tables above and below the grid, however I want to inherit the styling from the RadGrid when it is changed from one skin to the next.

Has anyone had success working with these rows?

Cheers

Ian.
Viktor Tachev
Telerik team
 answered on 08 Nov 2016
19 answers
994 views
I'm getting the following error when I try to attach the grid to a datasource (I've tried both an ObjectDataSource and an EntityDataSource and I get the same message:

  RadGrid - RadGrid1System.Web.HttpParseException (0x80004005): Cannot create an object of type 'System.Collections.Generic.List`1[[Telerik.Web.UI.GridTableView+PersistableColumnSetting, Telerik.Web.UI, Version=2013.1.403.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4]]' from its string representation '(Collection)' for the 'ColumnSettings' property. ---> System.Web.HttpParseException (0x80004005): Cannot create an object of type 'System.Collections.Generic.List`1[[Telerik.Web.UI.GridTableView+PersistableColumnSetting, Telerik.Web.UI, Version=2013.1.403.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4]]' from its string representation '(Collection)' for the 'ColumnSettings' property. ---> System.Web.HttpException (0x80004005): Cannot create an object of type 'System.Collections.Generic.List`1[[Telerik.Web.UI.GridTableView+PersistableColumnSetting, Telerik.Web.UI, Version=2013.1.403.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4]]' from its string representation '(Collection)' for the 'ColumnSettings' property. at System.Web.UI.PropertyConverter.ObjectFromString(Type objType, MemberInfo propertyInfo, String value) at System.Web.UI.ControlBuilder.AddProperty(String filter, String name, String value, Boolean mainDirectiveMode) at System.Web.UI.ControlBuilder.PreprocessAttribute(String filter, String attribname, String attribvalue, Boolean mainDirectiveMode, Int32 line, Int32 column) at System.Web.UI.ControlBuilder.PreprocessAttributes(ParsedAttributeCollection attribs) at System.Web.UI.ControlBuilder.Init(TemplateParser parser, ControlBuilder parentBuilder, Type type, String tagName, String id, IDictionary attribs) at System.Web.UI.ControlBuilder.CreateBuilderFromType(TemplateParser parser, ControlBuilder parentBuilder, Type type, String tagName, String id, IDictionary attribs, Int32 line, String sourceFileName) at System.Web.UI.ControlBuilder.GetChildPropertyBuilder(String tagName, IDictionary attribs, Type& childType, TemplateParser templateParser, Boolean defaultProperty) at System.Web.UI.ControlBuilder.CreateChildBuilder(String filter, String tagName, IDictionary attribs, TemplateParser parser, ControlBuilder parentBuilder, String id, Int32 line, VirtualPath virtualPath, Type& childType, Boolean defaultProperty) at System.Web.UI.TemplateParser.ProcessBeginTag(Match match, String inputText) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.UI.DesignTimeTemplateParser.ParseControlsInternalHelper(DesignTimeParseData data, Boolean returnFirst) at System.Web.UI.DesignTimeTemplateParser.ParseControlsInternal(DesignTimeParseData data, Boolean returnFirst) at System.Web.UI.DesignTimeTemplateParser.ParseControl(DesignTimeParseData data) at System.Web.UI.Design.ControlSerializer.DeserializeControlInternal(String text, IDesignerHost host, Boolean applyTheme) at System.Web.UI.Design.ControlParser.ParseControl(IDesignerHost designerHost, String controlText, Boolean applyTheme) at System.Web.UI.Design.ControlDesigner.CreateClonedControl(IDesignerHost parseTimeDesignerHost, Boolean applyTheme) at System.Web.UI.Design.ControlDesigner.CreateViewControl() at System.Web.UI.Design.ControlDesigner.CreateViewControlInternal() at System.Web.UI.Design.ControlDesigner.get_ViewControl() at Telerik.Web.Design.RadGridDesigner.GetDesignTimeHtml(DesignerRegionCollection regions) at System.Web.UI.Design.ControlDesigner.GetViewRendering(ControlDesigner designer) 
Denius
Top achievements
Rank 1
 answered on 08 Nov 2016
14 answers
480 views
I'm looking to have the Scheduler display the current week on the timeline, but by default the first column will be today(which 6/7 times isn't Monday). Also when people select a date on the calendar that day is the start of the 7 columns shown by the timeline, rather than the Monday that starts that week.
Is there any way to ensure the Monday is always in the first column regardless of the current day or what is selected from navigation via the calendar?
Also, is there any way to make the calendar start on a Monday?
Thanks,
Edward
Anton
Telerik team
 answered on 08 Nov 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?