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

i wanna ask if its possible to unenable 1 column in radgrid edit mode in place
because its a primary key and i want to show it but un able to modify

thanks  a lot

regards
webster
Princy
Top achievements
Rank 2
 answered on 17 Dec 2009
1 answer
100 views
I have a panel bar with a button outside the radajaxpanel. If I click the button it will goto another radpanelitem. and then come back to the save button behind code.

What I need to do is that if this button is clicked. Put a value in a session variable?

 

<telerik:RadPageView ID="RadPageView2" runat="server">

 

 

<telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server">

 

 

<telerik:RadPanelBar ID="RadPanelBar2"

 

 

OnItemDataBound="RadPanelBar2_ItemDataBound" runat="server" Skin="WebBlue"

 

 

ExpandMode="FullExpandedItem" Height="550px" Style= "position: static; border:0px"

 

 

Width="100%" oninit="RadPanelBar2_Init"

 

 

onitemclick="RadPanelBar2_ItemClick" onload="RadPanelBar2_Load">

 

 

<Items>

 

 

<telerik:RadPanelItem runat="server" Text="GENERAL INFORMATION" Font-Bold="true"

 

 

Expanded="true">

 

 

<Items>

 

 

<telerik:RadPanelItem Height="350px" Value="GeneralInformation" runat="server">

 

 

<ItemTemplate>

 

 

<uc2:ctrlAboutMe ID="ctrlAboutMe" runat="server" />

 

 

<uc5:ctrlVisitorInformation ID="ctrlVisitorInformation" runat="server" />

 

 

</ItemTemplate>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelItem>

 

 

<telerik:RadPanelItem runat="server" Text="PHYSICAL CHARACTERISTICS" Font-Bold="true">

 

 

<Items>

 

 

<telerik:RadPanelItem Value="PhysicalAttributes" runat="server">

 

 

<ItemTemplate>

 

 

<uc3:ctrlPhysicalAttributes ID="ctrlPhysicalAttributes" runat="server" />

 

 

</ItemTemplate>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelItem>

 

 

<telerik:RadPanelItem runat="server" Text="LIFESYLE AND HABBITS" Font-Bold="true">

 

 

<Items>

 

 

<telerik:RadPanelItem Value="LifeStyle" runat="server">

 

 

<ItemTemplate>

 

 

<uc4:ctrlLifeStyle ID="ctrlLifeStyle" runat="server" />

 

 

</ItemTemplate>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelItem>

 

 

<telerik:RadPanelItem runat="server" Text="RELATIONSHIPS AND CHILDREN" Font-Bold="true">

 

 

<Items>

 

 

<telerik:RadPanelItem Value="RelationshipChildren" runat="server">

 

 

<ItemTemplate>

 

 

<uc6:ctrlRelationshipChildren ID="ctrlRelationshipChildren" runat="server" />

 

 

</ItemTemplate>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelBar>

 

 

</telerik:RadAjaxPanel>

 

 

<br />

 

 

<div align="center">

 

 

<asp:Label ID="lblProfileMessage" runat="server" Text=""></asp:Label>

 

 

<br />

 

 

<asp:ImageButton ID="SaveButton" OnClick="SaveButton_Click" runat="server" Visible="true"

 

 

ImageUrl="~/Images/Buttons/updatesilver.gif" />

 

 

<br />

 

 

<br />

 

 

</div>

 

 

</telerik:RadPageView>

 


Shinu
Top achievements
Rank 2
 answered on 17 Dec 2009
1 answer
87 views
I have a schedule control on a page where I cannot bind the control until the user has performed some actions on the page.  In the event where I can bind the control I have the following  code:

Me.rdSchedule.Visible = True   
Me.rdSchedule.DataSource = goDataTable   
Me.rdSchedule.DataKeyField = "DataKey"   
Me.rdSchedule.DataStartField = "StartDate"   
Me.rdSchedule.DataEndField = "EndDate"   
Me.rdSchedule.DataSubjectField = "DisplayText"   
Me.rdSchedule.DataBind() 

 


My problem is, the following error is being thrown prior to the page actually being displayed the first time.
 

 

Message: DataKeyField, DataSubjectField, DataStartField and DataEndField are required for databinding

Source: Telerik.Web.UI


Any hints?  I understand that these fields are needed to do the bind, but I don't want the bind to occur yet.

Also, is there a way to programattically add items onto the schedule versus binding?

Thanks

Chris

 

 

 

 

 

Chris Trina
Top achievements
Rank 1
 answered on 17 Dec 2009
3 answers
210 views
How can I hide hourly and yearly option buttons in RadSchedular Advanced edit form? Is there a good example or demo for working with Radschedular advanced edit form.
see attachment for options that I am talking about.

Thanks

Veselin Vasilev
Telerik team
 answered on 17 Dec 2009
1 answer
149 views
Hi,

Rad spell is not triggering RadTextBoxChanged on  RadTextBox.
 I am using the updateDisplayValue on OnClientDialogClosed.
Please let me know if you need more info.

PS
Dimo
Telerik team
 answered on 17 Dec 2009
2 answers
102 views
Hi,

I have an application which works well on my development environment including a series of RadComboBox's that are populated (onItemRequested) through a webservice.
This works all well, when i deploy the solution to another machine, which uses the same .net framework (and it's deployed correctly, including web.config settings etc.) it will not retrieve any data within the first combobox (no matches found).

  • I've checked the webservices and it gives a good response with data
  • I have another ComboBox on the screen that uses another service which does get populated
  • I have populated other controls through the same webservice that the not-working combobox is using

please help.
Pieter Vugts
Top achievements
Rank 1
 answered on 17 Dec 2009
3 answers
625 views
Everything I have read on this forum and in the samples says this should work.  I have the following code in C# page_load:

SearchResultGrid.MasterTableView.CurrentPageIndex = 0;

 

GridSortExpression ge = new GridSortExpression();

 

ge.FieldName =

"CustomerID";

 

ge.SortOrder =

GridSortOrder.Descending;

 

SearchResultGrid.MasterTableView.SortExpressions.Add(ge);

SearchResultGrid.Rebind();

The code above sorts the data in the grid with no issues... However, it does not select the column and visually show that it is sorted.  Here is the grid code:

 

<

 

telerik:RadGrid ID="SearchResultGrid" EnableAJAX="False" ShowStatusBar="True" PageSize="25" Width="99%" AllowPaging="True"

 

 

AllowSorting="True" runat="server" Skin="Green" EnableEmbeddedSkins="false" GridLines="Both" OnNeedDataSource="SearchResultGrid_NeedDataSource">

 

 

<clientsettings allowkeyboardnavigation="True">

 

 

<Selecting AllowRowSelect="false" />

 

 

<Resizing AllowColumnResize="True" AllowRowResize="False" />

 

 

<Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="false" />

 

 

<ClientEvents OnActiveRowChanged="ActiveRowChanged" OnRowSelected="RowSelected" OnKeyPress="GridKeyPressed"/>

 

 

</clientsettings>

 

 

<mastertableview autogeneratecolumns="false" clientdatakeynames="CustomerID,SiteID">

 

 

<Columns>

 

 

<telerik:GridTemplateColumn UniqueName="CustomerID" HeaderText="Customer" SortExpression="CustomerId" >

 

 

<itemtemplate>

 

 

<a href="javascript:document.getElementById('SearchTracker').value = '0';CloseWindowWithArgument('<%# Eval("CustomerID")+"','"+ Eval("SiteID") %>');"><%# Eval("CustomerId") %></a>&nbsp;

 

 

</itemtemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridBoundColumn Visible="false" HeaderText="Customer" UniqueName="ExportCustomerID" DataField="CustomerId" DataFormatString="{0}&nbsp;" SortExpression="CustomerId"/>

 

 

<telerik:GridBoundColumn HeaderText="Site Id" HeaderStyle-Width="5%" DataField="SiteID" UniqueName="SiteID" DataFormatString="{0}&nbsp;" SortExpression="SiteID" />

 

 

<telerik:GridBoundColumn HeaderText="Customer Name" HeaderStyle-Width="30%" DataField="CustomerName" UniqueName="CustomerName" SortExpression="CustomerName" />

 

 

<telerik:GridBoundColumn HeaderText="Address" HeaderStyle-Width="30%" DataField="AddressLine1" UniqueName="Address" SortExpression="AddressLine1" />

 

 

<telerik:GridBoundColumn HeaderText="City" HeaderStyle-Width="20%" DataField="City" UniqueName="City" SortExpression="City" />

 

 

<telerik:GridBoundColumn HeaderText="State" HeaderStyle-Width="5%" DataField="State" UniqueName="State" SortExpression="State" />

 

 

</Columns>

 

 

<NoRecordsTemplate>

 

 

<div class="NoRecordText">No records to display.</div>

 

 

</NoRecordsTemplate>

 

 

</mastertableview>

 

 

<pagerstyle mode="NumericPages" AlwaysVisible="true" />

 

 

</telerik:RadGrid>

The grid is in a table cell, in a div.  How can I get the grid to visually show the sort expression?

Thanks,

- Adam

 

Radoslav
Telerik team
 answered on 17 Dec 2009
1 answer
261 views

 I am trying to put raddatetime picker and some other control inside my Gridview for editing purpose but always getting errors like in subject could not find control inside gridview pls help me how can I solve this problem. All help will be appreciated and thank you in advance

        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"   
            DataSourceID="SqlDataSource1" DataKeyNames="ID"   
            PageSize="20"  > 
            <PagerSettings Position="TopAndBottom" /> 
            <Columns> 
                <asp:CommandField ButtonType="Button" CancelText="Çık" EditText="Düzenle"   
                    ShowEditButton="True" UpdateText="Güncelle" /> 
                <asp:TemplateField HeaderText="ID" InsertVisible="False" SortExpression="ID">  
                    <ItemTemplate> 
                        <asp:Label ID="Label8" runat="server" Text='<%# Bind("ID") %>'></asp:Label> 
                    </ItemTemplate> 
                </asp:TemplateField> 
                <asp:TemplateField HeaderText="UserName" SortExpression="UserName">  
                    <ItemTemplate> 
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("UserName") %>'></asp:Label> 
                    </ItemTemplate> 
                </asp:TemplateField> 
                <asp:TemplateField HeaderText="Name" SortExpression="Name">  
                    <ItemTemplate> 
                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("Name") %>'></asp:Label> 
                    </ItemTemplate> 
                </asp:TemplateField> 
                <asp:TemplateField HeaderText="SicilNo" SortExpression="SicilNo">  
                    <ItemTemplate> 
                        <asp:Label ID="Label3" runat="server" Text='<%# Bind("SicilNo") %>'></asp:Label> 
                    </ItemTemplate> 
                </asp:TemplateField> 
                <asp:TemplateField HeaderText="CartNo" SortExpression="CartNo">  
                    <EditItemTemplate> 
                 <asp:TextBox ID="txtCard" runat="server" Text='<%# Bind("CartNo") %>'   
                   ToolTip="5 karakter" Width="50px"></asp:TextBox> 
                    </EditItemTemplate> 
                    <ItemTemplate> 
                        <asp:Label ID="Label4" runat="server" Text='<%# Bind("CartNo") %>'></asp:Label> 
                    </ItemTemplate> 
                    <ItemStyle Width="50px" /> 
                </asp:TemplateField> 
                <asp:TemplateField HeaderText="CartNoStartDate"   
                    SortExpression="CartNoStartDate">  
                    <EditItemTemplate> 
                        <telerik:RadDatePicker ID="RadDatePicker1" SelectedDate='<%# Bind("CartNoStartDate") %>' runat="server">  
                        </telerik:RadDatePicker> 
                    </EditItemTemplate> 
                    <ItemTemplate> 
                        <asp:Label ID="Label5" runat="server" Text='<%# Bind("CartNoStartDate") %>'></asp:Label> 
                    </ItemTemplate> 
                </asp:TemplateField> 
                <asp:TemplateField HeaderText="CartNoEndDate" SortExpression="CartNoEndDate">  
                    <EditItemTemplate> 
                        <telerik:RadDatePicker ID="RadDatePicker2" SelectedDate='<%# Bind("CartNoEndDate") %>' runat="server">  
                        </telerik:RadDatePicker> 
                    </EditItemTemplate> 
                    <ItemTemplate> 
                        <asp:Label ID="Label6" runat="server" Text='<%# Bind("CartNoEndDate") %>'></asp:Label> 
                    </ItemTemplate> 
                </asp:TemplateField> 
                <asp:TemplateField HeaderText="IsDeleted" SortExpression="IsDeleted">  
                    <EditItemTemplate> 
                        <asp:DropDownList ID="ddlBool" runat="server" SelectedValue= '<%# Bind("IsDeleted") %>'>      
                        <asp:ListItem Text="Evet" Value="1" />      
                        <asp:ListItem Text="Hayır" Value="0" /> 
                        </asp:DropDownList> 
                    </EditItemTemplate> 
                    <ItemTemplate> 
                        <asp:Label ID="Label7" runat="server" Text='<%# Bind("IsDeleted") %>'></asp:Label> 
                    </ItemTemplate> 
                </asp:TemplateField> 
            </Columns> 
        </asp:GridView> 
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"   
            ConnectionString="<%$ ConnectionStrings:pdksConnectionString %>"   
            SelectCommand="SELECT UserName, Name, SicilNo, CartNo, CartNoStartDate, CartNoEndDate, IsDeleted, ID FROM Users WHERE (SicilNo LIKE '%' + @SicilNo + '%') OR (UserName LIKE '%' + @username + '%') ORDER BY Name, SicilNo, CartNo"   
            UpdateCommand="UPDATE Users SET CartNoEndDate = @CardNoEndDate, CartNoStartDate = @CardNoStartDate,CartNo = @CartNo,IsDeleted = @IsDeleted WHERE (ID = @ID)"   
            InsertCommand="INSERT INTO Users(UserName, Name, SicilNo, CartNo, CartNoStartDate, CartNoEndDate, IsDeleted, vardiya) VALUES (@username, @name, @SicilNo, @CartNo, GETDATE(), @CartNoEndDate, 0, 1)">  
            <SelectParameters> 
                <asp:ControlParameter ControlID="txtSicil" DefaultValue="NULL" Name="SicilNo"   
                    PropertyName="Text" Type="String" /> 
                <asp:ControlParameter ControlID="txtSicil" DefaultValue="" Name="username"   
                    PropertyName="Text" /> 
            </SelectParameters> 
            <DeleteParameters> 
                <asp:Parameter Name="ID" /> 
            </DeleteParameters> 
            <UpdateParameters> 
               <asp:ControlParameter ControlID="RadDatePicker1"   
                    ConvertEmptyStringToNull="False" DbType="DateTime" DefaultValue=""   
                    Name="CardNoStartDate" PropertyName="SelectedDate" />    
                <asp:ControlParameter ControlID="RadDatePicker2"   
                    ConvertEmptyStringToNull="False" DbType="DateTime" DefaultValue=""   
                    Name="CardNoEndDate" PropertyName="SelectedDate" />    
                <asp:ControlParameter ControlID="txtCard"   
                    ConvertEmptyStringToNull="False" DbType="String" DefaultValue=""   
                    Name="CartNo" PropertyName="Text" />    
                <asp:ControlParameter ControlID="ddlBool"   
                    ConvertEmptyStringToNull="False" DbType="Boolean" DefaultValue=""   
                    Name="IsDeleted" PropertyName="Value" />    
                <asp:ControlParameter ControlID="GridView1" DefaultValue="0" Name="ID"   
                    PropertyName="SelectedValue" Type="Int32" /> 
            </UpdateParameters> 
            <InsertParameters> 
                <asp:Parameter Name="username" /> 
                <asp:Parameter Name="name" /> 
                <asp:Parameter Name="SicilNo" /> 
                <asp:Parameter Name="CartNo" /> 
                <asp:Parameter Name="CartNoEndDate" /> 
            </InsertParameters> 
        </asp:SqlDataSource> 
Pavlina
Telerik team
 answered on 17 Dec 2009
1 answer
110 views
Hello,

I want' to put my treeView in an iFrame.

So I can't work with
var tree = $find('navTree')

So I'm trying to implement a function in the iFrame

function

 

getTree() {

 

 

     return $find('navTree')

 

}

and now I'm trying to access the tree from then parent object like that:

 

tree = document.getElementById(

"iFrameTreeview").contentWindow.getTree()

 

 

 

var nodes = tree.get_Nodes();

But the broser reports: tree.get_Nodes is not a function

What should I do to get Access to the tree from the parent-site?

Thanks for your support.

 

Christian Sommer
Top achievements
Rank 1
 answered on 17 Dec 2009
2 answers
402 views
How do I read the content of my item template on the server side by looping thru my collection of RadListBoxItems?

Suppose I have  a template as follows:

                    <ItemTemplate> 
                        <div id="TheValue" runat="server">> 
                            Test Id: 
                            <%#DataBinder.Eval(Container, "Value")%> 
                            <br /> 
                        </div> 
                        <div id="TheText" runat="server"> 
                            Name: 
                            <%#DataBinder.Eval(Container, "Text")%> 
                            <br /> 
                        </div> 
                        <div id="dateadded" runat="server"> 
                            Date Added: 
                            <%=DateTime.Now.ToShortDateString()%> 
                        </div> 
                        <hr style="height: 1px; border-color: Black; border-style: solid; width: 95%" /> 
                    </ItemTemplate> 


So in VB.NET in the code behind I expect to be able to  do something like this:

        For Each item As RadListBoxItem In RadListBoxDestination.Items 
           'Grab variables from ItemTemplate (e.g. dateadded ) and do stuff
        Next 


Any insight appreciated, thanks!

- David
Genady Sergeev
Telerik team
 answered on 17 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?