Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
66 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
461 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
101 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
296 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
130 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
152 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
128 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
63 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
1 answer
48 views
Hello friends. I have a radMenu on my MasterPage. when i hover the mouse on it at runtime it suddenly dissapears. and also some of its items have right alignment for text and some of them have left. 
What can i do for this problem?
Kate
Telerik team
 answered on 05 Sep 2012
3 answers
98 views
Need Urgent Help.  I am much tense.

As seen in attached image, all of sudden controls have stopped rendering properly on screen.
Aligment is off track.

Menus now shows extra row, menu items itself is not aligned properly.
numeric controls shows '0' outside of textbox.

To confirm i created another test project and inserted few controls.  there too, the issues are same.
eg. see how Radbutton is displayed in second image.

Please Advice. What's going wrong.

Regards
Ivan Zhekov
Telerik team
 answered on 05 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?