Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
147 views
I Have a Radgrid but I am Unable to delete the Items On Runtime .There is delete option near the values but still the action does not take place. Can anyone tell me why ? Here is my Code 
  <telerik:RadGrid ID="RadGrid1" runat="server"
   AllowPaging="True" GridLines="None"
   Skin="Office2007"
   DataSourceID="AccessDataSource1" AllowAutomaticDeletes="True"
  AllowAutomaticInserts="True" AllowAutomaticUpdates="True" PageSize="8">
<MasterTableView AutoGenerateColumns="False" DataSourceID="AccessDataSource1">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridBoundColumn DataField="Name" DefaultInsertValue=""
            HeaderText="Name" SortExpression="Name" UniqueName="Name">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Email" DefaultInsertValue=""
            HeaderText="Email" SortExpression="Email" UniqueName="Email">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Details" DefaultInsertValue=""
            HeaderText="Details" SortExpression="Details" UniqueName="Details">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Place" DefaultInsertValue=""
            HeaderText="Place" SortExpression="Place" UniqueName="Place">
        </telerik:GridBoundColumn>
        <telerik:GridClientDeleteColumn ConfirmText="Are you sure you want to delete this Memeber?"
                        HeaderStyle-Width="35px" ButtonType="ImageButton" ImageUrl="Delete.gif" />
    </Columns>
</MasterTableView>
</telerik:RadGrid>
                    

<
asp:AccessDataSource ID="AccessDataSource1" runat="server"
                        DataFile="~/App_Data/admindb.mdb"
                        SelectCommand="SELECT [Name], [Email], [Details], [Place] FROM [Login]" >
                       
                    </asp:AccessDataSource>
Shinu
Top achievements
Rank 2
 answered on 02 Nov 2010
1 answer
218 views
Hi there,

Please help... I've been hitting my head on the wall for over a day on this. Searched and search but cannot find close solution...
Here is my problem.

I have a Radgrid that has a RadBinaryImage in the first cell of each row. I'm binding my grid on the clientside using json. I want to be able to change the image of the rows from clientside based on a criterion upon

ClientEvents-OnRowDataBound.

Here is my snippet:


ASPX:
-----------------

<telerik:RadGrid ID="RadReqOverview" runat="server" >
 <MasterTableView TableLayout= "Auto" EnableViewState="true">
  <Columns>
   <telerik:GridTemplateColumn HeaderStyle-Width="25px" UniqueName = "FLAG">
    <ItemTemplate>
                    <telerik:RadBinaryImage runat ="server" ID="IMGFLAG" Visible = "true" ImageUrl = "./Images/Open.png" />
    </ItemTemplate>
        </telerik:GridTemplateColumn>
  </Columns>
 </MasterTableView> 
 <ClientSettings ClientEvents-OnRowDataBound = "RowDataBound">
        <Selecting AllowRowSelect="True" />
        <Scrolling AllowScroll="True" />
 </ClientSettings>
</telerik:RadGrid>

 

Clientside(Javascript) 

 

 

---------------------------------

 

<script type="text/javascript">
           function RowDataBound(sender, args) {
           //Get handle of binaryimage for this cell upon databound
           var img = args.get_item().findControl("IMGFLAG"); //This is not working!!!!!!!!!
             if (img != null) {
                    // conditional formatting
                    // After I do my logic I want to change the image to closed
                   img.ImageUrl = "./Images/Closed.png";
               }
           }
</Script>

However this is not working!!! Please help. Thanks.

 

 

 

Monsi Lache
Top achievements
Rank 1
 answered on 02 Nov 2010
2 answers
110 views
Hi there,

I know this is simple for most of you out there, I have faith to get help.

I've designed a toolbar at design time with the following buttons:

Group ALL: with the following buttons
All

Groupt Status: with the following buttons
Open
Completed
Cancelled

I also want the following functionality:
1) When the button 'All' is checked, the buttons 'Open','Completed' and 'Cancelled' to be unchecked.
2) When any of the buttons in the 'Status' group is checked, the 'All' button to be unchecked.

Further more I want to get a handle of all 4 buttons and their checked states(bool) on the server-side(default.aspx.cs) so that I can pass true/false to the database to filter out results based on the checked states of the buttons. Please help. Here is a snippet of my design code(default.aspx):

 

 

 

 

Monsi Lache
Top achievements
Rank 1
 answered on 02 Nov 2010
3 answers
90 views
Help, Help, Help!!

I have this desktop application that tracks bug tickets that I wrote using wincontrols(VS 2005- C#) and it works very well. Now I want to create a similar application using asp.net with radcontrols.

I have a tabstrip:
-1st tab has a radgrid that displays a summary of bug tickets based on a variety of filters,
-2nd tab has various controls(textboxes, combos etc) to display ticket details of the selected record from radgrid,
-3rd tab has controls(textboxes, combos etc) to display resource details of the same record and
-4th tab has controls to display status details of the same record.

Here is what I want to happen:
1)User clicks on a ticket record in the radgrid
2)Details tab is selected
2)The id of that ticket is passed to the serverside
3)A function on the serverside receives that id, sends a custom query to the database to retrieve detailed records of the ticket.
4)Once the record has been retrieved, the information in the record is displayed and spread across controls that are on all four tabs(details tab,resource tab & status tab). 

Pls note: I want the selected records information to be populated in all the four tabs at the same time(NOT ON DEMAND!!!) so that I can click on each tab and display the data for that ticket(eg I click on the ticket details tab to view the details or click the status tab to see the status of the ticket)

I have so far managed to get the id of the ticket from the clientside when the user clicks the gridview row and able to pass it to the function on the serverside. What I cannot do is see record data in the controls on all the four tabs when I click each tab. The controls are always blank. I've ajaxified the tabstrip, by the way.

Please help.

I've attached a simple diag that shows what I want to do.


Thanks in advance,

Monsi.
Monsi Lache
Top achievements
Rank 1
 answered on 02 Nov 2010
2 answers
188 views
I have everything working for my radgrid export but need to make a small modification.  it is possible to remove the quotation marks delimiter?  see below

current:

"Trip_Number"|"PO_Number"|

desired:
Trip_Number|PO_Number|
Carlos Gonzalez
Top achievements
Rank 1
 answered on 01 Nov 2010
3 answers
175 views
Hey guy's,


I need to export extra cell`s in my excelsheet, which are not found in gridview. The position of this cells have to be on the top of the page. I've attached an example, i hope you could follow.

Thanks for efforts.

kind regards

Url Andreas
Daniel
Telerik team
 answered on 01 Nov 2010
7 answers
177 views
I keep getting the error : "Microsoft JScript runtime error: 'originalWidth' is null or not an object" in the Telerik.Web.UI.WebResrouce.axd  after displaying then closing radwindows. The error occurs when using my own radwindows as well as radalert and radconfirm.
Has anyone seen this behaviour before ? I'm really stuck with this one and can't move to production until I can get past this...
Any help will be much appreciated.
Stuart Hemming
Top achievements
Rank 2
 answered on 01 Nov 2010
2 answers
178 views
Hey guys,

I'm using a RadGrid as my input form and everything is working to open a blank record in the editform and fill it out.

I'm using a button outside the grid to kick off the insert command. This is the code that I have to kick off the update command in another grid...

GridItem[] items1 = RadGrid1.MasterTableView.GetItems(GridItemType.EditFormItem);
for (int i = 0; i < items1.Length; i++)
{
    int itemIndex = items1[i].ItemIndex;
    if (RadGrid1.EditItems[0].ItemIndex == itemIndex)
    {
        (items1[i] as GridEditableItem).FireCommandEvent("Update", String.Empty);
    }
}

but it doesn't work by changing the command to Insert. The error I'm getting is in regards to the itemIndex which makes sense because it shouldn't have an index yet.

Can you show my how to get reference to the InsertItem using an outside button so I can kick off the Insert command?

Thanks =)
Philip Senechal
Top achievements
Rank 1
 answered on 01 Nov 2010
3 answers
176 views
Hello,

I am using the latest version of ASP.Net Ajax controls. I created a Visual Studio web project (using the Telerik template)  that includes a default.aspx page with a RadChart, Everything works correctly but now I need to deploy it to a Sharepoint 2007 site.

What is the way to add this project (the aspx page, associated resources, settings, etc) to Sharepoint?
Is it possible to integrate this new page into my Sharepoint site using a very simple method like a page viewer web part (standard web part that comes with Sharepoint)?

Thank you,
M. R.


Tsvetoslav
Telerik team
 answered on 01 Nov 2010
5 answers
157 views
Hi Team

I added radtreeview in sharepoint master page for left navigation.
the code below is i used
<HEAD>
     <script language="javascript">
     //<![CDATA[
function ClientNodeClicked(sender, eventArgs)
{
alert();
window.setTimeout(function()
    {
        alert(sender.getWindowBounds().x);
    }, 0);
    var node = eventArgs.get_node();
   node.toggle();    
}
//]]>
</script>
    </HEAD>
<BODY scroll="yes" onload="javascript:if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();">
  <form runat="server" onsubmit="return _spFormOnSubmitWrapper();">
   <telerik:RadScriptManager runat="server" ID="RadScriptManager1"/>
<asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server">
                <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script language="javascript" type="text/javascript">
      //<![CDATA[
        function pageLoad() {
        alert('In');
            var tree = $find("<%= RadTreeView1.ClientID %>");
            if (tree) {
                var location = window.location.pathname;
                location = location.substring(location.lastIndexOf('/') + 1);
                var nodeText = location.split('.');
                var node = tree.findNodeByText(nodeText[0]);
                alert(nodeText[0]);
                if (node.get_level() != 0) {
                    var parentNode = node.get_parent();
                    node.get_parent().expand();
                    node.select();
                }
                else {
                    node.expand(true);
                    node.select();
                }
            }
        }
//]]>
   </script> </telerik:RadCodeBlock>
 
                <telerik:RadTreeView ID="RadTreeView1" EnableEmbeddedSkins="false" DataSourceID="XmlDataSource1"
         runat="server" Skin="IV" OnClientNodeClicked="ClientNodeClicked" DataNavigateUrlField="ImageUrl">
         <DataBindings>
                <telerik:RadTreeNodeBinding SelectedImageUrl="/IV/Img/selected_arrow.png" ExpandMode="ClientSide" DataMember="Node" TextField="Text" ExpandedField="Expanded" />
            </DataBindings>
        </telerik:RadTreeView>
        <asp:XmlDataSource runat="server" ID="XmlDataSource1" DataFile="TreeView.xml" XPath="/Tree/Node" />
         </asp:ContentPlaceHolder>
</form>
  </BODY>

but the pageLoad and ClientNodeClicked events are not firing in browser...

help me to solve this issue...
Kalina
Telerik team
 answered on 01 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?