Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
172 views
Hi All,
I am trying to get a Multiline RadTextBox to correctly size to 100% height. It seems that it ignores my height requirements and goes solely by the Row property (which I can't seem to disable).
This does not suit my variable layout.
Can you please describe a way to achieve my goal?
Thanks,
Steele.
alekhya
Top achievements
Rank 1
 answered on 01 Feb 2011
3 answers
163 views
I'm having trouble figuring out how to apply a left border to the first "cell" in an expanded item.  I have applied a bottom border to all cells in the parent row except for the expand/collapse row, and I wanted to apply a left border so that it makes a right angle with the bottom border of the parent row...what would be the best way to approach this?  Below is the code I am using for the bottom border of the parent row.

if (OrdersGrid.Items.Count > 1)
{
  for (int i = 0; i < OrdersGrid.Items.Count - 1; i++)
  {
    GridItem item = OrdersGrid.Items[i];
 
    for (int j = 1; j < item.Cells.Count; j++)
      item.Cells[j].Style["border-bottom"] = @"1px solid #828282;";
  }
}
else if (OrdersGrid.Items.Count == 1)
{
  GridItem item = OrdersGrid.Items[0];
  if (OrdersGrid.Items[0].Expanded)
    for (int j = 1; j < item.Cells.Count; j++)
      item.Cells[j].Style["border-bottom"] = @"1px solid #828282;";
  else
    for (int j = 1; j < item.Cells.Count; j++)
      item.Cells[j].Style["border-bottom"] = "none;";
}
Shinu
Top achievements
Rank 2
 answered on 01 Feb 2011
4 answers
121 views
I took your example from Grid/Herarchy With Templates, other than the database fields being different the only change I made was to replace:

this
<img  src='<%#  Page.ResolveUrl("~/Grid/Examples/Hierarchy/NestedViewTemplate/Img/") + (Container.FindControl("Label1") as Label).Text %>.jpg' alt="Customer Image" />

with this:
<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource4"
    <ItemTemplate> 
        <telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" 
            DataValue='<%#Eval("Avatar") %>' Width="90px" Height="110px" ResizeMode="Fit"/> 
    </ItemTemplate> 
</asp:DataList> 
 

I need to retrieve the image from the database.
The first image is correct, but all images after that fail.  When I modify the PreRender to loop through each item and expand each item it works fine, for the first page (the second page is all empty images).

I have a feeling this is going to be a dumb mistake by me, please help.

Here is what it looks like:

Kiara
Top achievements
Rank 1
 answered on 01 Feb 2011
1 answer
44 views
I know I can do stuff with/to the files in the FileUploaded method, but I need to do some post-processing once the file has been moved to the Target folder.

Which is the best event for this?

-- 
Stuart
Genady Sergeev
Telerik team
 answered on 01 Feb 2011
2 answers
77 views
Hello
    I am having  Rad Combo box inside Modol pop up.  While clicking on the Combo box the items inside the combo boxes not enabled (Means its viewing back ground of the pop up).   Need to solve this problem, Plese Help Me

vijay
Top achievements
Rank 1
 answered on 01 Feb 2011
1 answer
34 views
radgrid - with a master and detail table.

Hierarchy - when linking a detail table using two fields.
 field 1 - varchar(4)
 field 2 - char(4)

example1 - if field 1 is empty and field 2 has value.
    the link does not populate the detail table

example2 - but if field 1 has value and field 2 is empty
    the link does populate the detail table.

My question is how can i get the first example1 to work.
Tsvetina
Telerik team
 answered on 01 Feb 2011
1 answer
97 views
I have a main page that contains a radwindow.  From a link in the main page, I use javascript to open the radwindow and set the dialog page inside the radwindow's iframe (setUrl).  The user makes selections in the dialog page then clicks "Go".  I then write javascript to the browser to open a brand new "report" window and give it focus.  Lastly, I write javascript to the browser that calls the close() method for the radwindow in the main page.

In Firefox everything works fine.
In IE7 and IE8, the main page always takes the focus after I close the radwindow.  If I don't close the radwindow or I simply hide it, the report window retains focus as it should.

For the moment, I am instead forcing a postback on the main page.  This closes the dialog but does not steal the focus.  However, this is a poor approach that I do not want to use if I can avoid it.

How do I keep the main page from getting the focus after I close the radwindow?

Thanks,

Bill
Georgi Tunev
Telerik team
 answered on 01 Feb 2011
1 answer
142 views
I am saving grid data. Grid contains one textbox in item template column. But it was not saving any data, which was entered in textbox(Just saving 'NULL'). There was not error while debugging.
Any help is appreciated. Below is code i am using.
VB Code:
Public Sub btnsave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnsave.Click
AddG()
End Sub
Public Sub AddG()
        For Each item As GridDataItem In GD_Prod.Items
Dim tx3 As TextBox = DirectCast(item("PL_STUDENT_Portions_Planned").FindControl("TxtSTUPort"), TextBox)
 Dim str3 As Object = tx3.text
            If tx3.Text = Nothing Then
                str3 = DBNull.Value
            ElseIf IsNumeric(tx3.Text) Then
                str3 = Val(tx3.Text)
            End If
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("@PL_Student_Portions_Planned", System.Data.SqlDbType.VarChar)
            cmd.Parameters("@PL_Student_Portions_Planned").Value = str3
con.Open()
            cmd.ExecuteNonQuery()
            con.Close()
Next
    End Sub

ASPX Code:

<telerik:RadGrid ID="GD_Prod" runat="server" AllowPaging="True" ShowHeader="False"
                    AutoGenerateColumns="False" GridLines="None" Height="173px" Skin="Outlook" 
                    Width="1107px" PageSize="1">
                      <MasterTableView>
                              <Columns>
<telerik:GridTemplateColumn UniqueName="PL_STUDENT_Portions_Planned" 
                               >
                                <ItemTemplate>
                                    <asp:TextBox ID="TxtSTUPort"   runat="server" Height="16px"
                                        Width="30px" ></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                        ControlToValidate="TxtSTUPort" ErrorMessage="*" ForeColor="#CC3300" 
                                        SetFocusOnError="True" Display="Dynamic"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                        ControlToValidate="TxtSTUPort" ErrorMessage="Number" ForeColor="#CC3300" 
                                        SetFocusOnError="True" ValidationExpression="[0-9]*" Display="Dynamic" 
                                        Font-Size="6px"></asp:RegularExpressionValidator>
                                </ItemTemplate>
                                <HeaderStyle Width="19px" />
                            </telerik:GridTemplateColumn>
 </Columns>
                        
                </telerik:RadGrid>
<asp:Button ID="btnsave" runat="server" Height="20px" Text="SAVE" Width="50px"
                        ToolTip="Click to Save " BackColor="#DFEFFF" ForeColor="#003399" />

Stored Proc:
ALTER PROCEDURE [DBO].P_FN_PR_InsertGridData
      (
@PL_Student_Portions_Planned varchar(10) = 0
)
AS
begin
INSERT INTO FNProdRecDetails (PL_Student_Portions_Planned)
values(@PL_Student_Portions_Planned)
End
Return
Tsvetina
Telerik team
 answered on 01 Feb 2011
3 answers
109 views

Hi,

I am creating controls dynamically target control as well as telerik tooltip control using client side code as below (first creating table and tr and then td, in one of td creating the cotrols as below)

 

Dim

 

 

html As New StringBuilder()

 

 

 

 

html.Append(

 

"<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""0"" bgcolor=""#978F80"">")

 

 

 

 

html.Append(

 

"<tr bgcolor=""lightblue"" style=""font:bold 11px Arial, Helvetica, sans-serif; color:#000000; text-align:center"">")

 

 

 

 

html.Append(

 

 

 

"<td width=""15%"" style=""border-bottom:3px solid #ffffff;"" >")

 

 

 

 

html.Append("<asp:Label ID=""" & lblName & intLblCounter.ToString.Trim & """ Text=""test"" Width=""100%"" runat=""server"" ToolTip="" Out Time   : " & getTimeAsString(dtBreaks.Rows(i - temp)(1).ToString) & " <br/> In Time    :" & getTimeAsString(dtBreaks.Rows(i - temp)(0).ToString) & " <br/> Break Time :" & "00:01:00" & """ ></asp:Label>")

 

html.Append("<telerik:RadToolTip ID=""" & tooltiplbl & intLblCounter.ToString.Trim & """ Text="" Out Time   : " & getTimeAsString(dtBreaks.Rows(i - temp)(1).ToString) & " <br/> In Time    :" & getTimeAsString(dtBreaks.Rows(i - temp)(0).ToString) & " <br/> Break Time :" & "00:01:00" & """ TargetControlID =""" & lblName & intLblCounter.ToString.Trim & """ runat=""server""/>")

 

html.Append(

 

"</td>")
html.Append("</tr>")
html.Append(
"</table>")

 

 

 

But not getting the tooltip is and when I copy the client side code while debugging and pasting another page, executing the page able to see the tooltip and when I am  creating the controls runtime then unable to see the tooltip.

Could you please suggest/help me on this?

Thanks,
Praveen Kumar palla.

 

 

Svetlina Anati
Telerik team
 answered on 01 Feb 2011
1 answer
186 views
I want to use a single RadContextMenu on a page that has a RadTabStrip with multiple pages and RadGrids and other controls on each RadPageView.  I want to have the RadContextMenu connected to certain controls like Grids and other controls so that when the user right clicks on the given control, server code behind will figure out what control is using the RadContextMenu and add the correct Items for that given control.

Is this possible or do I need multiple Context menus, each set to the given control. 

I just cannot get the target that is trigering the menu.  Any help would be great.
Dimitar Terziev
Telerik team
 answered on 01 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?