Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
50 views
Hi,

I have a scenario where I display huge data and edit them using pop-up..

Some of my fields need to be comboboxes...where data has to be binded to tht particulat value for that resource..

I have a table employee...which has status (active,inactive)...but I need to bind this data from a look up table..
   EmploymentStatus:    <telerik:RadComboBox ID="ddlStatus" runat="server"    AppendDataBoundItems="true"                                         AllowCustomText="true" > </telerik:RadComboBox>

I have tried the below code to bind the values:but it didn't wok..getting null value in to the list object..

 protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
    {
        if (e.CommandName == "Edit")
        {
            GridEditableItem item = e.Item as GridEditableItem;
          RadComboBox list = item.FindControl("ddlStatus") as RadComboBox;
            SqlDataReader ddDR = null;
            myCommand.CommandText = "SELECT  [Name],[value]  FROM [Table1] where Name='Status'";
            myConnection = new SqlConnection(myConnectionstr);
            myConnection.Open();
            myCommand.CommandType = CommandType.Text;
            myCommand.Connection = myConnection;
            ddDR = myCommand.ExecuteReader();
            list.DataSource = ddDR;
            list.DataTextField = "Name";
            list.DataValueField = "Value";
            list.DataBind();


            ddDR.Dispose();
            myCommand.Dispose();
            myConnection.Dispose();
        }

    }

Can you please let me know how do I bind the data and also get the correct values when i click edit and empty value when I click insert...Will be of gr8 help..

Please advise..
thanks


                 
Dimitar Terziev
Telerik team
 answered on 23 Dec 2011
1 answer
72 views
Hi,

I am using ServerSideCallBack and would like nodes to be expanded to say two levels.
Is there a way I can emulate the asp TreeView ExpandDepth property on load.

I have tried setting node.Expanded but this doesn't seem to trigger the populate on demand.

Many thanks

Richard
Bozhidar
Telerik team
 answered on 23 Dec 2011
1 answer
77 views

Dear Telerik Team,

We are facing a problem with export to CSV feature using RadGrid. Actually we have a grid having a column showing range for ‘# of FTEs’ and ‘# of Freelancers’. You can find the column data in the attached file Grid.jpg. When we try to export the grid to CSV, these two columns converts to date column as shown in the attached file Excel.jpg.

Please provide us some solution for that.

Thanks

Tarika Team

Shinu
Top achievements
Rank 2
 answered on 23 Dec 2011
1 answer
53 views
Hi
I am encountered js problem when I use below client API.
 Does anyone can help me? thanks.

Case 1
var cMenu = $find("RadContextMenu1");
cMenu will be undefined!!

Case 2
var cMenu2 = $find("<%=RadContextMenu1.ClientID %>");
this is working.

but I would like to use the Case 1, due to I can pass the control's id into another function as a paramter in order to do more complex task and this way should be more fexible.

My developing environment as below.
VS2008 version 9.0.30729.1 SP
.NET Framework 3.5 SP1
telerik version is '2010.1.309.35'

Thank you!

Princy
Top achievements
Rank 2
 answered on 23 Dec 2011
6 answers
110 views
Hi,

I have a RadGrid which has AllowMultiRowSelect property to true. I have a button and on click of button i need to fetch details of selected rows.
I have wriiten following code on button click

 

protected void OnButtonClick( object sender,EventArgs e )

 

{ ArrayList ar = new ArrayList();

 

 

  

foreach (GridDataItem item in RadGridFrom.SelectedItems)

 

    {        ar.Add( item["Column1"].Text);//access the value here    

     }
}
but SelectedItems collectioin always have O items , I am not able to figure out why this is happening.

I also tried following code for fetching details of selected rows :

 

 

protected void OnButtonClick( object sender,EventArgs e )

 

{

   ArrayList ar = new ArrayList();

 foreach (GridDataItem item in RadGridFrom.MasterTableView.Items)

 

    {

         if (item.Selected)

 

        ar.Add( item["Column1"].Text);//access the value here    
    }

 

}

 but still it is not working.
I am using Telerik.Web.UI_2011_2_915_Trial dll
Kindly help with the solution ASAP.

Thanks,
Bhupendra

Rahul
Top achievements
Rank 2
 answered on 23 Dec 2011
1 answer
74 views
Hi all,

I used Telerik Control to develop my project. I have a problem below:


<telerik:GridTemplateColumn HeaderText="[Groupes]" UniqueName="GroupeContent">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lblNom" CommandName="Select" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Nom") %>' />
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="txtNom" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Nom") %>'
                                        MaxLength="30"></asp:TextBox>
                                </EditItemTemplate>

                              
                            </telerik:GridTemplateColumn> 
<telerik:GridTemplateColumn  UniqueName="GroupeFooter">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="false" CommandName="Edit" 
                                        ImageUrl="~/Styles/images/edit16.gif" />
                                </ItemTemplate>
                                <EditItemTemplate>                                    
                                   .............
                                </EditItemTemplate
>                                
                            </telerik:GridTemplateColumn>

When I click on the icon "edit"=> TextBox appears and 2 link "update" "Cancel" are shown.

I want to replace 2 link "update" and "cancel" by 2 icons.
Please view attached file

Please help me to do it

Thanks alot.

Rahul
Top achievements
Rank 2
 answered on 23 Dec 2011
2 answers
75 views
in telerik grid I had a template field and included an ASP button in it
I want 2 simple task to be performed from this button 
1)I want to select different values in the Grid by that button click and pass it in session variable Or if possible to select the PK of that tuple.I am using LINQ and binding the grid from code behind.
 2) I wan to conditionally enable and disable button present in template field of RAD Grid 


Thanks 
usman
Top achievements
Rank 1
 answered on 23 Dec 2011
1 answer
108 views
Hi,

We are using RadGrid with EntityDatasource. We have pagination enabled on the RadGrid.
We loooked at the sql profiler and saw that RadGrid makes two calls to the database (through EntityDatasource). One call is for getting the total count (for displaying pages and count) and the second is for fetches actual records in the page.

Later when we move to the second page, I can see in the sql profiler that again two calls are made - one for count and other for all the rows of the second page.

Can we configure the radgrid such that it does not fetch the count on second or subsequent operations (like moving to next page or sorting)? Since the grid already has the total count whcih it gets on the first load, cant the radgrid maintian this and use this in the subsequent operations?

Thanks and Regards,
Bhaskar Shanbhag

PS. I am asking this question since our sql query which we use in the Entity Datasource is already very slow and calling it two times for every operation makes it slower.
Veli
Telerik team
 answered on 23 Dec 2011
1 answer
73 views
Hi all,
I used RADTelerik and I have a problem: I don't know replace link by TExt by ICON.
My code Page:

<telerik:GridTemplateColumn HeaderText="[Groupes]" UniqueName="GroupeContent">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lblNom" CommandName="Select" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Nom") %>' />
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="txtNom" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Nom") %>'
                                        MaxLength="30"></asp:TextBox>
                                </EditItemTemplate
>
                               
                            </telerik:GridTemplateColumn>
....
I want to replace the 2 link "update" and "cancel" by icons.
Pls view attached file.

Thanks alot

Rahul
Top achievements
Rank 2
 answered on 23 Dec 2011
3 answers
124 views
Hi telerik team,

I'm using the Radtreeview structure in my application.
I have 3 nodes and for each node it has the subnodes.I'm adding the nodes dynamically from code behind.I would like to add Linkbutton and the image controls in the Nodetemplate for each node.

Node1
    --subnode1.1
    --subnode1.2
    --subnode1.3
Node2
    --subnode2.1
    --subnode2.2
Node3
    --subnode3.1
    --subnode3.2
    --subnode3.3
    --subnode3.4
Now for each nodes[Node1,Node2,Node3],i want to add the nodetemplates respectively.Here nodetemplate contains Linkbutton and Imagebutton.
How to add this from codebehind.
Please reply ASAP

Thankyou...




Bozhidar
Telerik team
 answered on 23 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Krasimir
Top achievements
Rank 3
Iron
Iron
Iron
Shawn
Top achievements
Rank 1
Iron
Javier
Top achievements
Rank 1
Iron
Jean-François
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Krasimir
Top achievements
Rank 3
Iron
Iron
Iron
Shawn
Top achievements
Rank 1
Iron
Javier
Top achievements
Rank 1
Iron
Jean-François
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?