Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
235 views
I'm using the radbutton as replacement for radio and checkboxes on a web kiosk application.
I need to do a lot of client side functionallity with them but the documentation is not that good.
I need to be able to get the count of the selected checkboxes, I need to know if there is at least one radiobutton or checkbox selected, I need to be able to uncheck checkboxes if you click an specific one (mutually exclusive), etc.
All this is easily achievable using jQuery and standard radio and checkbox controls.
Could you point me in the right direction on how to achieve this using the radbutton.
I'm using custom toggle by the way.

Thanks,

Pablo Tola.
Pablo Tola
Top achievements
Rank 2
 answered on 01 Feb 2011
3 answers
175 views
Hi,

As the title asks -- is this possible/supported? I have this:

<style type="text/css">
    .style1
    {
        text-align: center;
        background-color: #CEDEF4;
        font-weight:bold;
        color: #224499;
        border-radius: 10px;
    }
    .RoundedStyle
    {
        border-radius: 10px !important;
    }
</style>
</head>

<telerik:RadSplitter ID="RadSplitter1" Runat="server" Skin="Web20"
 Width="100%" BorderSize="2" OnClientLoad="OnSplitterLoaded"
BackColor="White" CssClass="RoundedStyle" >

When I do this nothing happens. I applied the CssClass to children controls of the RadSplitter just fine. 

Any ideas?

Thanks,

Sean

EDIT: Just as another quick question. I changed the width of a sliding zone inside of my splitter. The skin of the splitter is being picked up. But it looks weird because I changed the width of the sliding zone from default. Is there a way to fix this? 
Dobromir
Telerik team
 answered on 01 Feb 2011
1 answer
154 views
Hi,
I want to use ConfirmTemplate for placing my desired buttons (Actually I just want to change the order of Ok and Cancel buttons).
That's a shared templates for some confirms in my page.
Now I want the message shown in the confirm comes dynamically from the radconfirm method, but because of defining template the message is not shown and a static message defined in template is show.
How can I solve my problem?
Georgi Tunev
Telerik team
 answered on 01 Feb 2011
2 answers
65 views
I need to obtain a single selected record from a radGrid control triggered by a user double click event. I'd like to pass the selected record with a column named ID. I believe JavaScript is the best approach to do this since it will avoid post backs which cause the page to flash. Although, I've had no success getting it to work. I'm new to Telerik and could use any help, suggestions and/or examples you may have...

Visual studio 2010
ASP.Net Web Application

Thanks 

Geoff
Geoffrey
Top achievements
Rank 1
 answered on 01 Feb 2011
1 answer
61 views
Is there any where I can set my default language to C or VB for my account, so by default I see the demo's or examples in the selected language?

Georgi Tunev
Telerik team
 answered on 01 Feb 2011
4 answers
366 views
Hello,
   How can I get a drop-down panel like the following that appears in the telerik examples.

    <qsf:ConfiguratorPanel runat="server" ID="ConfigurationPanel1" Title="Configuration" Orientation="Vertical" Expanded="true">
        <strong>Select Panelbar Expand Mode:</strong>
        <hr />
        <asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">
            <asp:ListItem Value="MultipleExpandedItems" Selected="True">Multiple Expanded Items</asp:ListItem>
            <asp:ListItem Value="SingleExpandedItem">Single Expanded Item</asp:ListItem>
            <asp:ListItem Value="FullExpandedItem">Full Expanded Item</asp:ListItem>
        </asp:RadioButtonList>
    </qsf:ConfiguratorPanel>
Tajes
Top achievements
Rank 1
 answered on 01 Feb 2011
1 answer
92 views
Hello everybody,

I have a problem : I hava an XML File like this one :
<?xml version="1.0" encoding="utf-8" ?>
<Catalog>
    <Family Name="Family1">
        <SubFamily Name="List1">
            <Product Name="Product1" Packaging="5"></Product>
            <Product Name="Product2" Packaging="5"></Product>
            <Product Name="Product3" Packaging="25" ></Product>
        </SubFamily>
        <SubFamily Name="List2">
            <Product Name="Product1" Packaging="25"></Product>
        </SubFamily>
    </Family>
    <Family Name="Family2">
        <SubFamily Name="List1">
            <Product Name="Product1" Packaging="10"></Product>
            <Product Name="Product2" Packaging="10"></Product>
        </SubFamily>
        <SubFamily Name="List2">
            <Product Name="Product1" Packaging="10"></Product>
        </SubFamily>
    </Family>
</Catalog>

What I want is to obtain a RadGrid constructed with the same hierarchy.

The code I use now is :
<telerik:RadGrid ID="RadGrid1" runat="server" Skin="Web20" OnNeedDataSource="RadGrid1_NeedDataSource" AutoGenerateHierarchy="True" >
    <MasterTableView HierarchyDefaultExpanded="True">
        <Columns>                
        </Columns>       
    </MasterTableView>
</telerik:RadGrid>
public void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        RadGrid1.DataSource = GetHierarchicalXmlData();
    }
 
    private DataSet XMLDataSet;
    private DataSet GetHierarchicalXmlData()
    {
        XMLDataSet = new DataSet();
        XmlTextReader reader = new XmlTextReader(myfilename); // myfilename is the fullpath for the xml file
        XMLDataSet.ReadXml(reader);
       
        return XMLDataSet;
    }

The problem is that the hierarchy is well respected (see the picture in attached files) BUT RadGrid add "IDs" columns automatically...

1) What can I do to hide these ID Columns that are not presents in my XML File ?
2) Can I add an empty textbox for each Product Row in the end of each line ? How ?

Thanks a lot for your help :) 



Iana Tsolova
Telerik team
 answered on 01 Feb 2011
3 answers
176 views
I'd like to make basic expandable rows in the RadGrid. Say your datasource provides 4 fields. The grid has columns defined for field1 & field2. Then if you expand the row, you see a dropdown area with information from field3 and field4. That was easy enough to do with a NestedViewTemplate and some <%# Eval() %> statements. But I need to do the same thing with client-side binding. Is this possible? I don't want a hierarchical table with another query to drop down, I just want to use fields already provided by that data row. This demo is a good example of the behavior I want, but it has server-side databinding, and it uses an extra query (which is ok if that's what it takes).
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplatedeclarativerelations/defaultcs.aspx
Thanks!
Vasil
Telerik team
 answered on 01 Feb 2011
2 answers
261 views
I would like to disable my RadGrid through JavaScript.  How can I do this?  Server-side, I would call "rgGrid.Enabled = False". 
Ryan
Top achievements
Rank 1
 answered on 01 Feb 2011
7 answers
790 views
Hi, 

I am saving my grid data into sql database. But i getting error:
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
Line 361:            cmd.Parameters("@DOC_Portions_Served_Adults_ALC").Value = str14
Line 362:            con.Open()
Line 363:            cmd.ExecuteNonQuery()
Line 364:
Line 365:            con.Close()
Stack Trace:
[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +9594283
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119
   System.String.System.IConvertible.ToInt32(IFormatProvider provider) +46
   System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) +385
   System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType) +5034544

[FormatException: Failed to convert parameter value from a String to a Int32.]
   System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType) +5033757
   System.Data.SqlClient.SqlParameter.GetCoercedValue() +32
   System.Data.SqlClient.SqlParameter.Validate(Int32 index, Boolean isCommandProc) +103
   System.Data.SqlClient.SqlCommand.SetUpRPCParameters(_SqlRPC rpc, Int32 startCount, Boolean inSchema, SqlParameterCollection parameters) +126
   System.Data.SqlClient.SqlCommand.BuildRPC(Boolean inSchema, SqlParameterCollection parameters, _SqlRPC& rpc) +73
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
   System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +178
   System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137
   DSS_Project.ProductionRecordmain.AddGrid() in C:\Documents and Settings\911313\My Documents\Visual Studio 2010\Projects\DSS Project\ProductionRecordmain.aspx.vb:363
   DSS_Project.ProductionRecordmain.btnsave_Click(Object sender, EventArgs e) in C:\Documents and Settings\911313\My Documents\Visual Studio 2010\Projects\DSS Project\ProductionRecordmain.aspx.vb:190
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
Public Sub btnsave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnsave.Click
        AddGrid()
    End Sub
Public Sub AddGrid()
        For Each item As GridDataItem In GD_Prod.Items

            ''''''getting the bound fields values 
            Dim str0 As String = item("port_recipe_num").Text
            Dim str1 As String = item("DESC_ALT").Text
            Dim str2 As String = item("port_no_servings").Text
            Dim str5 As String = item("STD_NUM_OF_SERVING").Text
            Dim str13 As String = item("POSStudents").Text
            Dim str14 As String = item("POSAdultsALC").Text
     
            ''''''getting the template fields value   
            Dim tx3 As TextBox = DirectCast(item.FindControl("TxtSTUPort"), TextBox)
            Dim tx4 As TextBox = DirectCast(item.FindControl("TxtAAPort"), TextBox)
            Dim tx6 As TextBox = DirectCast(item.FindControl("TxtFPort"), TextBox)
            Dim tx7 As TextBox = DirectCast(item.FindControl("TxtQoFUsed"), TextBox)
            Dim tx8 As TextBox = DirectCast(item.FindControl("TxtPPort"), TextBox)
            Dim tx9 As TextBox = DirectCast(item.FindControl("TxtLOPort"), TextBox)
            Dim tx10 As TextBox = DirectCast(item.FindControl("TxtBFPort"), TextBox)
            Dim tx11 As DropDownList = DirectCast(item.FindControl("ddlLOCode"), DropDownList)
            Dim tx12 As TextBox = DirectCast(item.FindControl("TxtTSPort"), TextBox)

            Dim str3 As String = (tx3.Text)
            Dim str4 As String = (tx4.Text)
            Dim str6 As String = (tx6.Text)
            Dim str7 As String = (tx7.Text)
            Dim str8 As String = (tx8.Text)
            Dim str9 As String = (tx9.Text)
            Dim str10 As String = (tx10.Text)
            Dim str11 As String = (tx11.SelectedItem.Value)
            Dim str12 As String = (tx12.Text)

            Dim con As New SqlConnection(ConfigurationManager.ConnectionStrings("FConnectionString").ConnectionString)
            Dim cmd As New SqlCommand("P_FN_PR_InsertGridData", con)
            cmd.CommandType = CommandType.StoredProcedure
            cmd.Parameters.Add("@Pkey", Data.SqlDbType.Char)
            cmd.Parameters("@Pkey").Value = lblPKey.Text.Trim
            cmd.Parameters.Add("@PL_Recipe_Number", Data.SqlDbType.Char)
            cmd.Parameters("@PL_Recipe_Number").Value = str0
            cmd.Parameters.Add("@PL_Recipe_Name", Data.SqlDbType.Char)
            cmd.Parameters("@PL_Recipe_Name").Value = str1
            cmd.Parameters.Add("@PL_Portion_Size", Data.SqlDbType.Char)
            cmd.Parameters("@PL_Portion_Size").Value = str2
            cmd.Parameters.Add("@PL_Student_Portions_Planned", Data.SqlDbType.Int)
            cmd.Parameters("@PL_Student_Portions_Planned").Value = str3
            cmd.Parameters.Add("@PL_Adults_ALC__Portions_Planned", Data.SqlDbType.Int)
            cmd.Parameters("@PL_Adults_ALC__Portions_Planned").Value = str4
            cmd.Parameters.Add("@PL_Total__Portions_Planned", Data.SqlDbType.Int)
            cmd.Parameters("@PL_Total__Portions_Planned").Value = str5
            cmd.Parameters.Add("@PL_Factor_Portions", Data.SqlDbType.Char)
            cmd.Parameters("@PL_Factor_Portions").Value = str6
            cmd.Parameters.Add("@DOC_Quantity_Of_Food_Used", Data.SqlDbType.Char)
            cmd.Parameters("@DOC_Quantity_Of_Food_Used").Value = str7
            cmd.Parameters.Add("@DOC_Portions_Prepared ", Data.SqlDbType.Int)
            cmd.Parameters("@DOC_Portions_Prepared ").Value = str8
            cmd.Parameters.Add("@DOC_Portions_Brought_Forward ", Data.SqlDbType.Int)
            cmd.Parameters("@DOC_Portions_Brought_Forward ").Value = str9
            cmd.Parameters.Add("@DOC_Portions_Leftover", Data.SqlDbType.Int)
            cmd.Parameters("@DOC_Portions_Leftover").Value = str10
            cmd.Parameters.Add("@DOC_Leftover_Code", Data.SqlDbType.Char)
            cmd.Parameters("@DOC_Leftover_Code").Value = str11
            cmd.Parameters.Add("@DOC_Total_Portions_Served", Data.SqlDbType.Int)
            cmd.Parameters("@DOC_Total_Portions_Served").Value = str12
            cmd.Parameters.Add("@DOC_Portions_Served_Students", Data.SqlDbType.Int)
            cmd.Parameters("@DOC_Portions_Served_Students").Value = str13
            cmd.Parameters.Add("@DOC_Portions_Served_Adults_ALC", Data.SqlDbType.Int)
            cmd.Parameters("@DOC_Portions_Served_Adults_ALC").Value = str14
            con.Open()
            cmd.ExecuteNonQuery ()
            con.Close()
Next
End Sub

Stored Procedure:
ALTER PROCEDURE [DBO].P_FN_PR_InsertGridData
(
@Pkey char(15) ,
@PL_Recipe_Number char(4),
@PL_Recipe_Name char(20),
@PL_Portion_Size char(6),
@PL_Student_Portions_Planned int,
@PL_Adults_ALC__Portions_Planned int,
@PL_Total__Portions_Planned int,
@PL_Factor_Portions char(10),
@DOC_Quantity_Of_Food_Used char(10),
@DOC_Portions_Prepared int,
@DOC_Portions_Brought_Forward int,
@DOC_Portions_Leftover int,
@DOC_Leftover_Code char(3),
@DOC_Total_Portions_Served int,
@DOC_Portions_Served_Students int,
@DOC_Portions_Served_Adults_ALC int
)
AS
INSERT INTO FNProdRecDetails (Date_Loc_Type, PL_Recipe_Number, PL_Recipe_Name, PL_Portion_Size, PL_Student_Portions_Planned, PL_Adults_ALC__Portions_Planned, 
PL_Total__Portions_Planned, PL_Factor_Portions, DOC_Quantity_Of_Food_Used, DOC_Portions_Prepared, DOC_Portions_Brought_Forward, DOC_Portions_Leftover,
DOC_Leftover_Code, DOC_Total_Portions_Served, DOC_Portions_Served_Students, DOC_Portions_Served_Adults_ALC)
VALUES (@Pkey , @PL_Recipe_Number, @PL_Recipe_Name, @PL_Portion_Size, @PL_Student_Portions_Planned, @PL_Adults_ALC__Portions_Planned,
@PL_Total__Portions_Planned, @PL_Factor_Portions, @DOC_Quantity_Of_Food_Used, @DOC_Portions_Prepared, @DOC_Portions_Brought_Forward, @DOC_Portions_Leftover,
@DOC_Leftover_Code, @DOC_Total_Portions_Served, @DOC_Portions_Served_Students, @DOC_Portions_Served_Adults_ALC)
Tsvetina
Telerik team
 answered on 01 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?