Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
71 views
I am trying to develop Visual Web Part for SharePoint 2010. I have ASP.NET AJAX RadControls version 2011 Q1 SP2 installed.
I got stuck with following problem:

1. I didn't see the SQLDataSource control under "Data" node in ToolBox. However, I can still create SQLDataSource control by writting the code programmatically in ascx source file. Can I still use it just fine?
 
2. I can't find the web.config in the project folder to add ConnectionString for SQLDataSource control. Even though I can define the connection string in the SQLDataSource configuration just fine. But when I click deploy, it kept on giving me error that it can't find the connection string in the application configuration.

3. Is it true that developing Visual Web Part using AJAX RadControls, the Ajax functionality is disabled? (The page keep on doing full post back). If there is any workaround, would you please show me step by step?

I have demo on Visual Web Part using RadControl AJAX in the next few days. It is do or die situation. Please reply me as soon as you can. I'm really really appreciate it.

Thanks All.

Lamk.



Marin
Telerik team
 answered on 22 Aug 2011
3 answers
333 views
Hello,

I'm using the RadGrid control in order to insert, update and delete records (using UserControl, see demo).
I have a problem here:
I have to upload files by inserting new records, edit the files by editing the record and remove the files by deleting the record.

I want to indicate again, the RadGrid using usercontrol .

Please, I need your help,
It is appreciated to send a sample code.

Regards,
Bader
Tsvetina
Telerik team
 answered on 22 Aug 2011
1 answer
122 views

Using the PageMethods Load on Demand demos, do I have the ability to hook up a JavaScript onComplete() function as I would with a regular Page Method?

Using the below example, where could I hook up my onComplete() function?:

<telerik:RadTreeView ID="RadTreeView1" runat="server">
    <WebServiceSettings Path="Default.aspx" Method="LoadNodes" />
</telerik:RadTreeView>
[WebMethod]
public static RadTreeNodeData[] LoadNodes(RadTreeNodeData node, object context)
{
    List<RadTreeNodeData> result = new List<RadTreeNodeData>();
    RadTreeNodeData node = new RadTreeNodeData();
    node.Text = "Loaded on demand";
    node.ExpandMode = TreeNodeExpandMode.WebService;
      
    return result.ToArray();
}
Plamen
Telerik team
 answered on 22 Aug 2011
1 answer
84 views
I have a Master Page.
IN Master I got a RadSlidingPane. I put RadSkinManager in RadSlidingPane and oesnt work.
I put out RadSlidingPane and works perfectly.

Why?

   RadSkinManager radSkinManager = new RadSkinManager();
     radSkinManager.ID="RadSkinManagerpane";
    radSkinManager.ShowChooser = true;
       radSkinManager.Skin ="Vista";
         searchPane.Controls.Add(radSkinManager);
Tsvetina
Telerik team
 answered on 22 Aug 2011
3 answers
87 views
Hi,

i'm binding my radgrid1 to an onneeddatasource. All of the columns work fine except for the GridDropDownColumn. This column fail to populate with data in regular mode.

 

 

<telerik:GridDropDownColumn DataField="_UnloadTypeName"  

DataSourceID="RadGrid1_NeedDataSource"  

FilterControlAltText="Filter UnloadTypeColumn column"  

HeaderText="Unloading Type" ListTextField="_UnloadTypeName"  

ListValueField="_UnloadTypeName" UniqueName="UnloadTypeColumn">  

 

<HeaderStyle Width="100px" />  

 

<ItemStyle Width="100px" />  

 

</telerik:GridDropDownColumn>

please help.

thanks,
Minh Bui

 

Shinu
Top achievements
Rank 2
 answered on 22 Aug 2011
1 answer
75 views
Hey,
I need to change the color of the rows in the grId how can I do that?
Princy
Top achievements
Rank 2
 answered on 22 Aug 2011
1 answer
149 views
Hi All,
I am working on this task for past 2 days and could not solve this problem. I have a radgrid with a column of linkbutons inside it. when a user clicks on any link button, I pop up a javascript message based on some conditions.
ScriptManager.RegisterStartupScript(Page, this.GetType(), "message", string.Format("confirm_select('{0}','{1}');", RadGrid_IDPicker.ClientID,row.RowIndex + 1), true);

inside the function confirm_select, I have to make one row bold, the row that user clicked on and make the previous bolded row as normal/unbolded.
To achieve this, I am looping though the radgrid and unbolding all the rows and bolding the currenlty selected row if the user presses ok, but if the user pressed cancel, I would leave the previous row as bolded. below is my code
<script type="text/javascript"
var selectedRowIndex = -1;
    function confirm_select(gridViewID, rowIndex) {
        debugger;
  
  
        var gridview = document.getElementById(gridViewID);
        var master = gridViewID.get_masterTableView();
          
        if (confirm("You are leaving the parent level of the currently selected ID, are you sure?") == true) {
  
            for (var i = 1; i < gridview.rows.length; i++) {
                //not the selected row
                if (i != rowIndex)
                    gridview.rows[i].style.fontWeight = 'normal';
                //selected row
                else {
                    gridview.rows[i].style.fontWeight = 'bold';
                    selectedRowIndex = rowIndex;
                }
            }
  
        }
        else {
            if (selectedRowIndex != -1)
                gridview.rows[selectedRowIndex].style.fontWeight = 'bold';
  
        }
    }
  
</script>

I am getting an error right here

 

 

var master = gridViewID.get_masterTableView();

 


I would not have done the get get_masterTableView(), but I could not loop thorugh the gridview rows to make them bolded or unbolded. Below is the code for my gridview.
I also tried

var master = gridview.get_masterTableView();
but above line of code didn't work either.

<telerik:RadGrid ID="RadGrid_IDPicker" AllowSorting="True" PageSize="100" AllowPaging="True"
                                        runat="server" GridLines="None" OnPageIndexChanged="RadGrid_IDPicker_PageIndexChanged"
                                       OnPageSizeChanged="RadGrid_IDPicker_PageSizeChanged" Width="1500px" Visible="false" OnItemDataBound="RadGrid_IDPicker_DataBound"  >
                                        
                                       <MasterTableView RetrieveAllDataFields="true" AutoGenerateColumns="false" DataKeyNames="ID" >
                                           <Columns>
                                               <telerik:GridTemplateColumn UniqueName="TemplateLinkColumn"  AllowFiltering="false" HeaderText="ID">
                                                
                                                   <ItemTemplate>
                                                       <asp:LinkButton ID="ID_Link" runat="server" OnClick="MCLID_Link_Click" Text='<%#Bind("ID") %>' CommandName="Bold"></asp:LinkButton>
                                                     
                                                   </ItemTemplate>
                                                     
                                               </telerik:GridTemplateColumn>
                                                  <telerik:GridTemplateColumn    HeaderText="TAG">
                                                   <ItemTemplate>
                                                      <asp:Label ID="lbltag" runat="server" Text='<%#Bind("TAG") %>'></asp:Label>
                                                     
                                                   </ItemTemplate>
                                           </Columns>
                                       </MasterTableView>
                                       <PagerStyle Mode="NextPrevAndNumeric" />
                                   </telerik:RadGrid>

I don't have anything else defined. this gridview is inside the radPanelbar so the whole gridview is enclosed in this

<telerik:RadPanelBar ID="RadPanelBar1" runat="server" Width="1500px" BackColor="#E6E6E6" ExpandMode="MultipleExpandedItems">
    <Items>
        <telerik:RadPanelItem runat="server" Text="ID Picker" Expanded="true" >
            <Items>
                <telerik:RadPanelItem Text="" Expanded="true">
                    <ItemTemplate>
                              //radgrid is right here

i am not sure what am I doing wrong, but I spend lot of hours on it and this is not working.

Any help will be highly appreciated.
Iana Tsolova
Telerik team
 answered on 22 Aug 2011
1 answer
132 views
Hi,

I have relatively simple scenerio where I have to check some conditions before updating data. To manage data I'm using RadGrid with autoupdate. I would like to check some conditions before update (i.e. if the name already exists, if an issue date is greater then other max issue date in database etc.). What is the best practice to make such check and how to stop update if some conditions are not met?
I thought about SqlDataSource updating event but I don't know how to read values from controls in edit form of RadGrid. Maybe other event is much more efficient in this case. I appreciate your support in this case as well as snippet of example code is welcome.

Best Regards,

Darek
Iana Tsolova
Telerik team
 answered on 22 Aug 2011
5 answers
161 views
i have a RadGrid in a usercontrol.
i have an aspx page that contains the usercontrol and a RadFilter.
how can i assign the FilterContainerID of the RadFilter to the RadGrid?

i already tried to directly giving it the ID as such:

 

<telerik:RadFilter 

ID="rfCustomFilter" runat="server"FilterContainerID="RadGrid1"/>

and i have also tried to assign filterContainerID in code behind as such:
rfCustomFilter.FilterContainerID = "RadGrid1";

both did not work, and i get an error when Adding an expression:
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Devman
Top achievements
Rank 1
 answered on 21 Aug 2011
4 answers
70 views
At RadGrid.ItemCreated() event, that button is already created.

At which event, the CommandItem (export to excel button) is created and added to the MasterTableView?

I'd need to add a custom button to the CommandItem.

Thanks,


Daniel
Telerik team
 answered on 21 Aug 2011
Narrow your results
Selected tags
Tags
+124 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?