Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
221 views
I have a RadGrid in which first column has value as hyperlink. OnClick event of which I open a contextMenu option for that row.

The problem I am facing now is most of the Radgrid client events do not get fired. Specifically click events do not get fired when clicked on the link in the row column. How can I have OnRowClick, or OnRowSelected fired before my context menu script gets fired (which is OnClick for the hyperlink data on that row column).

Thank you
Eyup
Telerik team
 answered on 05 Sep 2012
1 answer
108 views
I am using RAD Image editor on Sharepoint 2010 site to edit images from doc library. (intended document library contains Audio, Video, Images, Documents(word, PDF) etc.)

My issue is when I click on image items, page works fine, image gets loaded into page, I can edit it and save it as per requirement.
but when I click on any  media other than image type, page is crashed with error "Parameter is not valid. "

this error occures in (from stack trace)
Telerik.Web.UI.RadImageEditor.GetCurrentEditableImage() +251
Telerik.Web.UI.RadImageEditor.ApplyClientOperations() +35
Telerik.Web.UI.RadImageEditor.ControlPreRender() +27

I wish to handle the selection of media other than image type in my code with appropriate message, 
but it seems that prerender is being called even before page_load.

please suggest me the reason of error and how to handle it.
here is complete stack trace 

[ArgumentException: Parameter is not valid.]
   System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData) +430
   System.Drawing.Image.FromStream(Stream stream) +14
   Telerik.Web.UI.ImageEditor.CacheImageProvider.LoadImage(String imageUrl, String physicalPath, HttpContext context) +234
   Telerik.Web.UI.RadImageEditor.GetCurrentEditableImage() +251
   Telerik.Web.UI.RadImageEditor.ApplyClientOperations() +35
   Telerik.Web.UI.RadImageEditor.ControlPreRender() +27
   System.Web.UI.Control.PreRenderRecursiveInternal() +108
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394
If you wish I can provide screen shot of error also Looking forward for your suppport.
Vessy
Telerik team
 answered on 05 Sep 2012
1 answer
71 views
I am unable to retain the selected value of combo box in Item command event when I selects a value the previous value of the selected event is getting displayed how can resolve this
Eyup
Telerik team
 answered on 05 Sep 2012
3 answers
474 views
Hi,
       
                In my aspx page, I got two List view and an add button. I am trying to remove one row from the list view and adding it to another List view. The button click event is working fine for the first time. But not working on the second time.

My settings

<telerik:AjaxSetting AjaxControlID="cmdAdd">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lv1" /> 
                    <telerik:AjaxUpdatedControl ControlID="lv2" />             
                </UpdatedControls>
</telerik:AjaxSetting>

if I remove the above settings code, the button click event is working fine. 

When I checked the generated html on firebug  the following click event disappears on second time. Any idea how to fix it? am I missing any settings? Thanks for the help. 

onclick="javascript:__doPostBack('ctl00$ContentPlaceHolder1$cmdAdd','')" 





Vasil
Telerik team
 answered on 05 Sep 2012
1 answer
106 views
Dear Telerik,

I've got a RadGrid, which has been filled with data from EntityDataSource - perfect. First column contains a GridEditCommandColumn, which fires correctly and display a FormTemplate with plenty of TextBoxes, FormTemplate contains also w RadButton with CommandName="Update" (and Cancel) - data updating works perfecty.
One of bound columns is a "Status_ID" column, which is related to another table (MSSQL). Statuses are displayed (inside FormTemplate) with RadTreeView control - also works perfectly. Unfortunately I could not find any solution for "automagical" binding "SelectedValue" of RadTreeView control with some of "Bind(column)" expression, so I've used the "NodeDataBound" event and if node.Value equals my Status_ID I select it.

Unfortunately the problem is, when I'd like to change another node from RadTreeView and fire data updating. Now I'm using such method (just after NodeClick)

var n = (e.Node);
int selectedStatus = int.Parse(e.Node.Value.ToString());
if (Respondent_Current == null)
{
  int respondentId = int.Parse((this.RadGrid_Respondent.EditItems[0] as GridDataItem).GetDataKeyValue("ID").ToString());
  Respondent_Current = Csi_Entities.PB_Respondent.Where(i => i.ID.Equals(respondentId)).First();
}
if (Respondent_Current != null)
{
  Respondent_Current.Status_ID = selectedStatus;
  this.Csi_Entities.SaveChanges();
  this.RadGrid_Respondent.Rebind();
}
else { //Crap }


Which works, but it's ugly - when I update textboxes AND i update RadTreeView just after and I submit, the textboxes-changes are ignored where status is updated correctly - but it's obvious with my solution.

What would be nice:
1. When node click - update an entity object which is used by FormTemplate (not the new one).
- Maybe I should update data by accessing the (EditItems[0] as GridDataItem).DataItem as MyEntity)? Will it work?
2. On CommandName="Update" fired, all controls might be successfully updated - am I right?

Thank you for ur time & help ;)

All the best,
Przemek M. Zawada
Vasil
Telerik team
 answered on 05 Sep 2012
5 answers
305 views
In my Radscheduler I am giving 15 minutes interval with MinutesPerRow="15"  and the time panel shows time as 8:00 am,8:30 am,9:00 am etc  even though there is 15 min interval in between.

How can I show 8:00 am,8:15 am,8:30 am etc in the scheduler time panel so that user can easily distinguish the time interval.

Thanks,
Soumya
Helen
Telerik team
 answered on 05 Sep 2012
1 answer
141 views
Hi,

I am trying to bind my RadTreeView control but for some reason the (+) sign is not coming with parent node to expand it and bind child nodes on server side.

 Any help would be really appreciated.

Thanks

 
<telerik:RadTreeView runat="Server" ID="rtvUserProducts" Height="300" Width="300"
                                    Skin="Vista">
                                    <Nodes>
                                        <telerik:RadTreeNode Expanded="true" Text="Parent" ExpandMode="ServerSide" runat="server">
                                            <NodeTemplate>
                                                <asp:Label ID="lblProductName" Text='<%# Bind("ProductCodeAndDesc") %>' runat="server">
                                                </asp:Label>
                                                <asp:HiddenField ID="hidLogisticProductKey" Value='<%# Bind("LogisticProductKey") %>'
                                                    runat="server" />
                                            </NodeTemplate>
                                            <Nodes>
                                                <telerik:RadTreeNode Expanded="true" Text="Child" ExpandMode="ServerSide">
                                                    <NodeTemplate>
                                                        <asp:Label ID="lblUserName" Text='<%# Bind("UserName") %>' runat="server"></asp:Label>
                                                    </NodeTemplate>
                                                </telerik:RadTreeNode>
                                            </Nodes>
                                        </telerik:RadTreeNode>
                                    </Nodes>
                                </telerik:RadTreeView>


 Protected Sub LoadProductsInTreeView()


        Dim oDataTable As New DataTable
        Dim oConn As New SqlConnection(SprintDB.GetStockSystemConnectionString)
        Dim sSQL As String
        Dim sb As New StringBuilder
        sb.Append("select distinct lp.LogisticProductKey, ProductDescription + ' (' + ProductCode + ')' 'ProductCodeAndDesc' from stockAlertRecipients sar inner join LogisticProduct lp on lp.LogisticProductKey = sar.Filter")
        sSQL = sb.ToString
        Dim oAdapter As New SqlDataAdapter(sSQL, oConn)
        Try
            oAdapter.Fill(oDataTable)
            rtvUserProducts.DataTextField = "ProductCodeAndDesc"
            rtvUserProducts.DataValueField = "LogisticProductKey"
            rtvUserProducts.DataFieldParentID = "LogisticProductKey"
            rtvUserProducts.DataSource = oDataTable
            rtvUserProducts.DataBind()
            rtvUserProducts.ExpandAllNodes()
        Catch ex As Exception
            WebMsgBox.Show(ex.Message.ToString)
        End Try


    End Sub
Kevin
Top achievements
Rank 2
 answered on 05 Sep 2012
2 answers
158 views
Hi,
 I filtered by datetime column like this http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx 
But i want to change "From" and "To"  texts. how can i do this? 
Duygu
Top achievements
Rank 1
 answered on 05 Sep 2012
3 answers
133 views
Hi,
I am wishing to change the colour of a row if it is 'urgent' in my internal message system.
I found this code...

Protected Sub RadGrid1_ItemDataBound(ByVal sender As System.Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound
    'Change the color of inactive rows
    If TypeOf e.Item Is GridDataItem Then
        Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
        Dim Urgent As CheckBox = DirectCast(item.FindControl("Urgent"), CheckBox)
        If Urgent.Checked = True Then
            e.Item.BackColor = Drawing.Color.RoyalBlue
        End If
    End If
End Sub


and changed it to suit my grid, or so I believed; however it does not work properly, and throws an exception ("Object reference not set to an instance of an object.") when checking whether

"If Urgent.Checked = true then"

What am I doing wrong, the code for my radgrid is...

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateSelectColumn="True" CellSpacing="0"
            GridLines="Horizontal" AutoGenerateColumns="False" OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged"
            OnNeedDataSource="RadGrid1_NeedDataSource" AllowAutomaticUpdates="True" AllowPaging="True"
            AllowSorting="True" ToolTip="Click on a message to view it" >
            <SortingSettings EnableSkinSortStyles="false" />
            <ClientSettings EnablePostBackOnRowClick="true" EnableRowHoverStyle="True">
                <Selecting AllowRowSelect="true" />
            </ClientSettings>
            <MasterTableView DataKeyNames="UniqueID" PageSize="20" Width="100%">
                <Columns>
                    <telerik:GridBoundColumn DataField="UniqueID" HeaderText="UniqueID" UniqueName="UniqueID"
                        FooterStyle-Width="1px" HeaderStyle-Width="1px" ItemStyle-Width="1px" Visible="false"
                        DataType="System.Int32" ReadOnly="True" SortExpression="UniqueID">
                        <FooterStyle Width="1px"></FooterStyle>
                        <HeaderStyle Width="1px"></HeaderStyle>
                        <ItemStyle Width="1px"></ItemStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Customer" HeaderText="Customer" UniqueName="Customer"
                        FooterStyle-Width="14%" HeaderStyle-Width="14%" ItemStyle-Width="14%" FilterControlAltText="Filter Customer column"
                        SortExpression="Customer">
                        <FooterStyle Width="14%"></FooterStyle>
                        <HeaderStyle Width="14%"></HeaderStyle>
                        <ItemStyle Width="14%"></ItemStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Subject" HeaderText="Subject" UniqueName="Subject"
                        FooterStyle-Width="46%" HeaderStyle-Width="46%" ItemStyle-Width="46%" SortExpression="Subject">
                        <FooterStyle Width="46%"></FooterStyle>
                        <HeaderStyle Width="46%"></HeaderStyle>
                        <ItemStyle Width="46%"></ItemStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Name" HeaderText="Taken By" UniqueName="Name"
                        FooterStyle-Width="8%" HeaderStyle-Width="8%" ItemStyle-Width="8%" DataType="System.Int32"
                        FilterControlAltText="Filter TakenByID column" SortExpression="TakenByID">
                        <FooterStyle Width="8%"></FooterStyle>
                        <HeaderStyle Width="8%"></HeaderStyle>
                        <ItemStyle Width="8%"></ItemStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="TakenOn" HeaderText="TakenOn" UniqueName="TakenOn"
                        FooterStyle-Width="11%" HeaderStyle-Width="11%" ItemStyle-Width="11%" DataType="System.DateTime"
                        FilterControlAltText="Filter TakenOn column" SortExpression="TakenOn">
                        <FooterStyle Width="11%"></FooterStyle>
                        <HeaderStyle Width="11%"></HeaderStyle>
                        <ItemStyle Width="11%"></ItemStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridCheckBoxColumn DataField="Urgent" DataType="System.Boolean" FilterControlAltText="Filter Urgent column"
                        HeaderText="Urgent" SortExpression="Urgent" UniqueName="Urgent" FooterStyle-Width="7%"
                        HeaderStyle-Width="7%" ItemStyle-Width="7%">
                        <FooterStyle Width="7%"></FooterStyle>
                        <HeaderStyle Width="7%"></HeaderStyle>
                        <ItemStyle Width="7%"></ItemStyle>
                    </telerik:GridCheckBoxColumn>
                    <telerik:GridBoundColumn DataField="StatusNew" HeaderText="Status ID" UniqueName="StatusNew"
                        FooterStyle-Width="11%" HeaderStyle-Width="11%" ItemStyle-Width="11%" SortExpression="StatusID">
                        <FooterStyle Width="11%"></FooterStyle>
                        <HeaderStyle Width="11%"></HeaderStyle>
                        <ItemStyle Width="11%"></ItemStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"
                        HeaderText="Delete" ButtonType="ImageButton" ImageUrl="~/RadControls/Grid/Skins/Default/Delete.gif"
                        FooterStyle-Width="4%" HeaderStyle-Width="4%" ItemStyle-Width="4%" >
                        <FooterStyle Width="4%"></FooterStyle>
                        <HeaderStyle Width="4%"></HeaderStyle>
                        <ItemStyle Width="4%"></ItemStyle>
                    </telerik:GridButtonColumn>
                </Columns>
                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                    <HeaderStyle Width="5px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                    <HeaderStyle Width="5px"></HeaderStyle>
                </ExpandCollapseColumn>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
        </telerik:RadGrid>


and it comes from a sql database

Thanks in advance
Ryan
Princy
Top achievements
Rank 2
 answered on 05 Sep 2012
3 answers
66 views
Hi,
I have tested SAK in a SharePoint 2010 environment.
Apart from the point that in a list-item edit page when using the RadEditor and inserting Images the image-editor seems to behave a bit strange (i.e. I click resize and nothing happens) and that the image-editor does not fit intor the list-item edit page popup the RadEditor is really nice.
When will SAK be RTM? I'd hate to suggest deploying CTP ;-)

Best,
Nils
Rumen
Telerik team
 answered on 05 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?