Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
141 views
I am trying to use the radListbox control and am experiencing some weird UI issues. There is a black box to the left of each item in the list box. It disappears when i hover over the item and then reappears when i move off the item. I have the listbox in the edittemplate of a rad grid.

<telerik:RadGrid ID="grdTopics" runat="server" AutoGenerateColumns="False" GridLines="None" AllowPaging="false" AllowSorting="false" ShowFooter="false" ShowHeader="true"  > 
                <ClientSettings AllowExpandCollapse="true"></ClientSettings> 
                <MasterTableView Name="Topics" EditMode="InPlace" DataKeyNames="ID" HierarchyLoadMode="Client" NoMasterRecordsText="There are no Topics." NoDetailRecordsText="There are no Topics.">  
                      
                    <RowIndicatorColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </RowIndicatorColumn> 
 
                    <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </ExpandCollapseColumn> 
                    <Columns> 
                          
                                                  
                         <telerik:GridTemplateColumn HeaderText="Moderators" UniqueName="Moderators">                      
                             <ItemTemplate> 
                                 <asp:Label ID="lblTopics_View_Moderators" runat="server"></asp:Label> 
                             </ItemTemplate> 
                             <EditItemTemplate> 
                                <telerik:RadListBox ID="lstTopics_Edit_Moderators" runat="server" CheckBoxes="true" DataKeyField="ID" DataTextField="Name"   ></telerik:RadListBox> 
                             </EditItemTemplate> 
                        </telerik:GridTemplateColumn> 
                          
                        <telerik:GridTemplateColumn HeaderText="" UniqueName="Edit Topic">  
                             <ItemTemplate> 
                                <asp:ImageButton ID="btnTopics_View_EditTopic" runat="server" ImageUrl="~/DesktopModules/BAOffice/images/edit.gif" AlternateText="Edit Topic" CommandName="TOPICS_EDIT" CausesValidation="false" /> 
                            </ItemTemplate> 
                            <EditItemTemplate> 
                                <asp:ImageButton ID="btnTopics_Edit_SaveTopic" runat="server" ImageUrl="~/DesktopModules/BAOffice/images/save.gif" AlternateText="Save Topic" CommandName="TOPICS_SAVE" CausesValidation="false" /> 
                            </EditItemTemplate> 
                        </telerik:GridTemplateColumn> 
                          
                        <telerik:GridTemplateColumn HeaderText="" UniqueName="Delete Topic">  
                             <ItemTemplate> 
                                <asp:ImageButton ID="btnTopics_View_DeleteTopic" runat="server" ImageUrl="~/DesktopModules/BAOffice/images/delete.gif" AlternateText="Delete Topic" CommandName="TOPICS_DELETE"  CausesValidation="false"  OnClientClick="return ConfirmDelete();"/>  
                            </ItemTemplate> 
                            <EditItemTemplate> 
                                <asp:ImageButton ID="btnTopics_Edit_CancelTopic" runat="server" ImageUrl="~/DesktopModules/BAOffice/images/cancel.gif" AlternateText="Cancel" CommandName="TOPICS_CANCEL" CausesValidation="false" /> 
                            </EditItemTemplate> 
                        </telerik:GridTemplateColumn> 
                          
                        <telerik:GridTemplateColumn HeaderText="" UniqueName="Move Topic Up">  
                             <ItemTemplate> 
                                <asp:ImageButton ID="btnTopics_View_MoveUp" runat="server" ImageUrl="~/DesktopModules/BAOffice/images/action_up.gif" AlternateText="Move Topic Up" CommandName="TOPICS_MOVEUP" CausesValidation="false" /> 
                            </ItemTemplate> 
                            <EditItemTemplate> 
                                <asp:Image ID="imgTopics_Edit_MoveUpSpacer" runat="server" ImageUrl="~/DesktopModules/BAOffice/images/spacer.gif" /> 
                            </EditItemTemplate> 
                        </telerik:GridTemplateColumn> 
                          
                         <telerik:GridTemplateColumn HeaderText="" UniqueName="Move Topic Down">  
                             <ItemTemplate> 
                                <asp:ImageButton ID="btnTopics_View_MoveDown" runat="server" ImageUrl="~/DesktopModules/BAOffice/images/action_down.gif" AlternateText="Move Topic Down" CommandName="TOPICS_MOVEDOWN" CausesValidation="false" /> 
                            </ItemTemplate> 
                            <EditItemTemplate> 
                                <asp:Image ID="imgTopics_Edit_MoveDownSpacer" runat="server" ImageUrl="~/DesktopModules/BAOffice/images/spacer.gif" /> 
                            </EditItemTemplate> 
                        </telerik:GridTemplateColumn> 
                    </Columns> 
                      
                      
                </MasterTableView> 
            </telerik:RadGrid> 


How do i get rid of them? If there is a way to show you an image, i can send you a screenshot of what it looks like.
Dave
Top achievements
Rank 1
 answered on 19 Aug 2009
6 answers
239 views
Hi,

1.I want to change the look of the Day view of Rad Schedular as Horizontal time display

2.I want to show the Scheduler like as bellow
 8AM 9Am 10Am 11Am 12PM 1pm ...
Room1 <-User-1---> <-----Usre-2---------->

Room2 <--------User-3-------------------------->
 .
 .
 .

Thanks
Sabarish
sabarishbabu
Top achievements
Rank 1
 answered on 19 Aug 2009
6 answers
152 views
Hi,
I have a bar code scanner that sends an "enter" as the last char. I like to use it for inserting data in a grid. The behavior i need is that the enter should work like the tab key works.
Benny
Top achievements
Rank 1
 answered on 19 Aug 2009
1 answer
115 views
How can I hide and show grid columns with UniqueName in client?
Daniel
Telerik team
 answered on 19 Aug 2009
1 answer
102 views
i am using color picker on my page but i dont want to use scipt manager
so that i am getting error
is it posible to use color picker with out scriptmanager
Svetlina Anati
Telerik team
 answered on 19 Aug 2009
3 answers
344 views
Hi all. After upgrading to the 2009 Q2 version of ASP.NET AJAX controls, the filterexpression property of radgrid does not work anymore. I mean that the initial filter(When page load) is not filtering anything. My radgrid is binded using a list of custom objects, and the filterexpression code block that I use is:

if (Assembly.GetAssembly(typeof(ScriptManager)).FullName.IndexOf("3.5") != -1)
            {
                rgMenu.MasterTableView.FilterExpression = @"it[""ParentMenuID""] == Guid.Empty";
            }
            else
            {
                rgMenu.MasterTableView.FilterExpression = "ParentMenuID== Guid.Empty";
            }


In the avobe mentioned code, ParentMenuID is a property of my custom object, and I want to filter the list of this objects, showing only the ones who have ParentMenuID == Guid.Empty.

I will really appreciate your help and response.

Thanks  a lot

Ivan Aquino
Tsvetoslav
Telerik team
 answered on 19 Aug 2009
1 answer
169 views
Hi,

I am programmatically creating some RadNumericTextBoxes (see code below).

I have 2 questions:

1,When the page is rendered the boxes appear and all looks fine, however when I mouse over any of the boxes they change size slightly (they reduce by about 4px) and remain that size.  This is a bit weird and unsightly.  Is there anything I can do to prevent this?

2, How can I get the fully qualified ClientID programmatically at creation?  I find that ClientId just contains the Controls ID...

                        ResultsRadNumericTextBox = new RadNumericTextBox(); 
                        ResultsRadNumericTextBox.Type = NumericType.Number; 
                        ResultsRadNumericTextBox.ID = "EntrantHoleResult" + EntrantsResultsData.Table.Rows[DataIndex]["Ordinal"].ToString(); 
                        ResultsRadNumericTextBox.Text = EntrantsResultsData.Table.Rows[DataIndex]["Score"].ToString(); 
 
                        if (Convert.ToInt32(EntrantsResultsData.Table.Rows[DataIndex]["Ordinal"]) < HoleCount) 
                        { 
                            TargetControl = "ctl00_Content_EntrantResultsEntry1_EntrantHoleResult" + (Convert.ToInt32(EntrantsResultsData.Table.Rows[DataIndex]["Ordinal"]) + 1).ToString() + "_text"; 
                        } 
                        else 
                        { 
                            TargetControl = btnAddEntrantsScores.ClientID; 
                        } 
 
                        ResultsRadNumericTextBox.TabIndex = (Int16)(Convert.ToInt32(EntrantsResultsData.Table.Rows[DataIndex]["Ordinal"]) + 100); 
                        ResultsRadNumericTextBox.Attributes["onKeyUp"] = "return SendTab('" + TargetControl + "', this, event);"; 
                        ClientIds[DataIndex] = ResultsRadNumericTextBox.ClientID; 
                        ResultsRadNumericTextBox.Width = 14; 
                        ResultsRadNumericTextBox.MinValue = 1; 
                        ResultsRadNumericTextBox.MaxValue = 19; 
                        ResultsRadNumericTextBox.MaxLength = 2; 
                        ResultsRadNumericTextBox.NumberFormat.DecimalDigits = 0; 
                        ResultsRadNumericTextBox.CssClass = EntryNumericTextBoxCellCssClass; 
                        ResultsRadNumericTextBox.ShowSpinButtons = false; 
                        ResultsCell.Text = ResultsRadNumericTextBox.ClientID; 
 
                        ResultsCell.Controls.Add(ResultsRadNumericTextBox); 
                        ResultsRow.Cells.Add(ResultsCell); 
Iana Tsolova
Telerik team
 answered on 19 Aug 2009
1 answer
141 views
Hi all,

I need to create a page that dynamically creates between 1 and about 30 RadNumericTextBoxes on a page.  I have no problem with this but I need to assign a onKeyPress event to the dynamically created controls.  The javascript in the onKeyEvent needs to check the value in the RadNumericTextBox is 1 digit and NOT a 1, if so tab to the next control.  If it is a 1 allow one more digit to be entered and then tab to the next control.

I have spent a while trying to resolve this but to no joy and to be honest I am not quite sure what state my code is currently in!

Anyway, has anyone got any ideas about how to do this or has done it before?

Not sure what use my code is as its probably not in its previously semi-working state, but here goes:

private void DrawResultsTable(DataView EntrantsResultsData) 
        { 
 
            if (EntrantsResultsData != null) 
            { 
                int HoleCount = EntrantsResultsData.Count; 
                int RowCount = Convert.ToInt16(HoleCount / 9); 
                int LeftOverCells = Convert.ToInt16(HoleCount % 9); 
                int MinCells = HoleCount > 9 ? 9 : HoleCount; 
 
                TableRow ResultsRow; 
                TableCell ResultsCell; 
                RadNumericTextBox ResultsRadNumericText; 
 
                int DataIndex; 
 
                for (int i = 0; i < RowCount; i++) 
                { 
                    ResultsRow = new TableRow(); 
                    ResultsRow.CssClass = EntryRowCssClass; 
 
                    for (int y = 0; y < MinCells; y++) 
                    { 
                        DataIndex = i * 9 + y; 
 
                        ResultsCell = new TableCell(); 
                        ResultsCell.Text = EntrantsResultsData.Table.Rows[DataIndex]["Ordinal"].ToString() + ":"; 
                        ResultsCell.CssClass = EntryLabelCellCssClass; 
                        ResultsCell.Attributes["align"] = "right"; 
                        ResultsRow.Cells.Add(ResultsCell); 
 
                        ResultsCell = new TableCell(); 
                        ResultsCell.CssClass = EntryNumericTextBoxCellCssClass; 
                        ResultsRadNumericText = new RadNumericTextBox(); 
                        ResultsRadNumericText.Type = NumericType.Number; 
                        ResultsRadNumericText.ID = "EntrantHoleResult" + EntrantsResultsData.Table.Rows[DataIndex]["Ordinal"].ToString(); 
                        ResultsRadNumericText.Text = EntrantsResultsData.Table.Rows[DataIndex]["Score"].ToString(); 
                        ResultsRadNumericText.ClientEvents.OnKeyPress = "SendTab(this, 'EntrantHoleResult12',event);"; 
                        ResultsRadNumericText.Width = 14; 
                        ResultsRadNumericText.MinValue = 1; 
                        ResultsRadNumericText.MaxValue = 19; 
                        ResultsRadNumericText.MaxLength = 2; 
                        ResultsRadNumericText.NumberFormat.DecimalDigits = 0; 
                        ResultsRadNumericText.CssClass = EntryTextBoxCssClass; 
                        ResultsRadNumericText.ShowSpinButtons = false; 
                        ResultsCell.Text = ResultsRadNumericText.ClientID; 
 
                        ResultsCell.Controls.Add(ResultsRadNumericText); 
                        ResultsRow.Cells.Add(ResultsCell); 
                    } 
 
                    EntrantsResultsTable.Rows.Add(ResultsRow); 
                } 
 
                ResultsRow = new TableRow(); 
                ResultsCell = new TableCell(); 
                ResultsCell.Text = "<br />"; 
                ResultsCell.ColumnSpan = (MinCells * 2); 
                ResultsRow.Cells.Add(ResultsCell); 
                EntrantsResultsTable.Rows.Add(ResultsRow); 
 
                ResultsRow = new TableRow(); 
                ResultsCell = new TableCell(); 
                ResultsCell.ColumnSpan = (MinCells * 2); 
                ResultsCell.Attributes["align"] = "right"; 
 
                Button btnAddEntrantsScores = new Button(); 
                btnAddEntrantsScores.ID = "btnAddEntrantsScores"; 
                btnAddEntrantsScores.Attributes["width"] = "50px"; 
                btnAddEntrantsScores.Text = "Save"; 
                btnAddEntrantsScores.Click += new EventHandler(this.btnAddEntrantsScores_Click); 
 
                Button btnCancelEntrantsScores = new Button(); 
                btnCancelEntrantsScores.ID = "btnCancelEntrantsScores"; 
                btnCancelEntrantsScores.Attributes["width"] = "50px"; 
                btnCancelEntrantsScores.Text = "Cancel"; 
                btnCancelEntrantsScores.Click += new EventHandler(this.btnCancelEntrantsScores_Click); 
 
 
                ResultsCell.Controls.Add(btnAddEntrantsScores); 
                ResultsCell.Controls.Add(btnCancelEntrantsScores); 
 
                ResultsRow.Cells.Add(ResultsCell); 
 
                EntrantsResultsTable.Rows.Add(ResultsRow); 
            } 

<script type="text/javascript"> 
 
    function SendTab(nextField, strField, evtKeyPress) { 
        alert("hi"); 
        var aKey = evtKeyPress.keyCode ? 
    evtKeyPress.keyCode : evtKeyPress.which ? 
      evtKeyPress.which : evtKeyPress.charCode; 
 
 
        if (aKey == 13) { 
            document.getElementById(nextField).focus(); 
        } 
 
 
 
 
        //Check its text   
        if (aKey == 49 && document.getElementById(strField).value == '') { 
            return; 
        } 
        else { 
            document.getElementById(nextField).focus(); 
        } 
 
 
    }   
</script> 


Any help appreciated, ta.
Iana Tsolova
Telerik team
 answered on 19 Aug 2009
3 answers
130 views
Hey,

I have a RadGrid on my page and I am trying to access the information that I am editting and I am having a problem with the TemplateColumn.  This is the code that I am using to traverse through a Grid that is all text and it works great but when I try to edit it to work on Template Columns I keep getting that the column is null when it has Data in it.  Just so you know that when I am using a TemplateColumn I have a RadComboBox inside it and that is what I am trying to grab the information from when i am updating or inserting.  I am making the change to make the editor be a RadComboBox but it is still giving me null values when there is data in my ComboBox.

foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns)
{
if (column is IGridEditableColumn)
{
IGridEditableColumn editableCol = (column as IGridEditableColumn);
if (editableCol.IsEditable)
{
IGridColumnEditor editor = editManager.GetColumnEditor(editableCol);
if (editor is GridTextColumnEditor)
{
if (Decimal.Parse((editor as GridTextColumnEditor).Text) > 0)
{
offerValues[i] = Decimal.Parse((editor as GridTextColumnEditor).Text);
i++;
}
else
{
status = false;
}
}
}
}
}
Tsvetoslav
Telerik team
 answered on 19 Aug 2009
0 answers
92 views
Hi,

I have a radwindow that displays a standard bill with address, product, payment, etc. I can print this without problem using client side script but would like to send the entire window contents as an html email. I would assume I would need to go through the controls and use RenderControl, but wanted to see if anyone else had done this and if there are any issues. Thanks.
Karl Wilkens
Top achievements
Rank 1
 asked on 19 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?