Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
108 views
SelectedIndex[0] is always highlighted even though it is not the current selected item. Please see attached image. 
Bozhidar
Telerik team
 answered on 07 May 2010
1 answer
185 views
hi, i need to create RadContextMenu dynamically based on user requirement.
below is my coding:



  Dim cRadMenu As New Telerik.Web.UI.RadContextMenu 
  Dim cRadMenuItem As New Telerik.Web.UI.RadMenuItem 
Dim imgParameter As New Image 
Dim cRadMenuItem2 As New Telerik.Web.UI.RadMenuItem 
 
   cRadMenu.ID = "adasd" & gvDynamic.Rows(i).Cells(iCellIndex).ID 
                            cRadMenu.Items.Add(cRadMenuItem) 
                            cRadMenu.Items.Add(cRadMenuItem2) 
 
 
 imgParameter.Attributes.Add("onclick", "showMenu(event," + cRadMenu.ClientID + ");") 
cHtmlTable.Rows(1).Cells(1).Controls.Add(imgParameter) 
gvDynamic.Rows(i).Cells(iCellIndex).Controls.Add(cHtmlTable) 
 
but it fail to by giving me error when the page just load:
The error is  Line :151
                    Char :43
                    Error : Expected ')'
                    Code:0




Does anyone has idea on this ? Can provide me the sample coding  on how to create this dynamically?

Lighthouse Developer
Top achievements
Rank 1
 answered on 07 May 2010
8 answers
279 views
Hi,
I am considering which approach should I use to make a menu navigation bar - sitemapdatasource or using the query string.
My menu bar is dynamically generating menu base on row data in my database table.
This demo is using Response.ApplyAppPathModifier(Request.Url.PathAndQuery) but I have seen there is an action to change those tabs.

Dim tab As RadTab = RadTabStrip1.FindTabByUrl(urlWithSessionID)
If Not IsNothing(tab) Then
   tab.SelectParents()
   tab.PageView.Selected = True
End If


so why do we need Response.ApplyAppPathModifier(Request.Url.PathAndQuery) here? I hope this will also help me develop my dynamically generating menu bar. Thx!
Yana
Telerik team
 answered on 07 May 2010
1 answer
816 views
Hi,

I have asp imagebutton in my page. By default i am loading disabled image. and have set the property of Enabled = false in the page. On Change of any field value in the page i am making the disabled image as enabled as below. After this if I click on Enabled image it is not firing OnCLientClick javascript method. Why? Any body please help me.

On load of the Screen

 

 

<asp:ImageButton ID="imgbtnOk" runat="server" ImageUrl="~/Images/btn_ok_disabled.gif"

 

 

 

OnClientClick="return ValidateInformation()" AccessKey="O" ToolTip="OK" TabIndex="30" />

On updatation of any field in the screen following javascript has been fired to enable the button

 

//Enables the Ok button if user selects any Carrier Plan Code

 

 

 

 

 

 

function EnableOk() {

 

 

 

var cboCarrierPlanCode = document.getElementById(radcboCarrierPlanCode)

 

 

 

if (cboCarrierPlanCode.value != "") {

 

 

 

var updateflag = document.getElementById(hdnChangeFlag)

 

updateflag.value = 1;

 

 

var imgBtnOk = document.getElementById(imgbtnOk)

 

imgBtnOk.disabled =

 

false

 

 

 

 

 

imgBtnOk.src =

 

"../Images/btn_OK.gif"

 

 

 

 

 

}

}

After this image is getting enabled but initially for the control i have written OnClientClick event to validate some more fields in the screen.... this is not getting fired.

WHY?

Princy
Top achievements
Rank 2
 answered on 07 May 2010
3 answers
73 views
Hi, my problem appears SOMETIMES, that's weird. Only in IE when i'm going to write in a RadGrid's textbox(filter or edit or insert) i can't stand on it, don't let me to write, as if were disabled or in state 'ReadOnly', i don't know it's so weird, someone has happened???, How can i fixit?? thx
Pavlina
Telerik team
 answered on 07 May 2010
3 answers
436 views
Hi,
    I have a grid, that has a GridImageColumn.  The imageUrl is working correctly, and on ItemDataBound I Clear the image out from some rows, so I am left with a grid that has some rows with an image and some without in the same column.  My question is simply, is there a way to sort on that column??  I tried adding an invisible GridBoundColumn which I would populate with either a "1" or a "0" and set my sort expression to that column and set AllowSorting to true, but when I click on the column header I receive an error that says Cannot find column, so I think that's the wrong approach.  See code below.

Any help will be greatly appreciated.

Thanks,

-Mike

 <ngc:NGCGrid ID="grdItems" runat="server" AllowPaging="True" AllowSorting="True" 
        AllowMultiRowSelection="True" GridLines="None" AutoGenerateColumns="False" PageSize="500" 
        OnNeedDataSource="grdItems_NeedSource" EnableViewState="true" AllowAutomaticDeletes="true" 
        OnItemCommand="grdItems_ItemCommand" OnItemDataBound="grdItems_ItemDataBound" 
        OnItemCreated="grdItems_ItemCreated" OnItemUpdated="grdItems_ItemUpdated" OnItemInserted="grdItems_ItemInserted" 
        OnItemDeleted="grdItems_ItemDeleted">  
        <ClientSettings AllowKeyboardNavigation="True" > 
            <Scrolling AllowScroll="true" ScrollHeight="440px" UseStaticHeaders="true" /> 
            <Selecting AllowRowSelect="true" /> 
        </ClientSettings> 
        <MasterTableView CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add Item" 
            EditMode="InPlace" DataKeyNames="ITEM_ID">  
            <CommandItemTemplate > 
                <div style="padding: 5px 5px;">  
 
                 <asp:LinkButton ID="LinkButton2" runat="server" CommandName="InitInsert" > 
                 <img style="border:0px;vertical-align:middle;" alt="" src="../../App_Themes/SpidersTheme/Grid/AddRecord.gif" />Add new Item  
                 </asp:LinkButton>&nbsp;&nbsp;  
 
                <asp:LinkButton ID="LinkButton1" OnClientClick="javascript:return confirm('Are you sure you want to delete all selected Items?')" 
                    runat="server" CommandName="DeleteSelected">  
                    <img style="border:0px;vertical-align:middle;" alt="" src="../../App_Themes/SpidersTheme/Grid/Delete.gif" />Delete selected Items</asp:LinkButton>&nbsp;&nbsp;  
                </div> 
            </CommandItemTemplate> 
            <Columns> 
                <telerik:GridClientSelectColumn> 
                    <HeaderStyle Width="10px" /> 
                    <ItemStyle Width="10px" /> 
                </telerik:GridClientSelectColumn> 
                <telerik:GridEditCommandColumn ButtonType="ImageButton">  
                    <HeaderStyle Width="35px" /> 
                    <ItemStyle Width="35px" /> 
                </telerik:GridEditCommandColumn> 
                <telerik:GridButtonColumn Text="Delete" CommandName="Delete" ButtonType="ImageButton" 
                    ConfirmText="Are you sure you want to delete this item?">  
                    <HeaderStyle Width="10px" /> 
                    <ItemStyle Width="10px" /> 
                </telerik:GridButtonColumn> 
                <telerik:GridImageColumn UniqueName="FilteredFlag" ImageUrl="../../Common/Images/green_flag_16x16.png" AllowSorting="true"   
                HeaderImageUrl="../../Common/Images/green_flag_16x16.png" SortExpression="FilterFlagOrder"  > 
                <HeaderStyle Width="10px" /> 
                    <ItemStyle Width="10px" /> 
                      
                </telerik:GridImageColumn> 
                <telerik:GridBoundColumn UniqueName="FilterFlagOrder" Visible="true">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="NSN" HeaderText="NSN" UniqueName="NSN" ColumnEditorID="GridTextBoxColumnEditor1" > 
                    <HeaderStyle Width="120px" /> 
                    <ItemStyle Width="120px" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="ITEM_DESCRIPTION" HeaderText="Description" UniqueName="ITEM_DESCRIPTION" 
                    ColumnEditorID="GridTextBoxColumnEditor2">  
                    <HeaderStyle Width="300px" /> 
                    <ItemStyle Width="300px" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridNumericColumn DataField="USAGE_FACTOR" HeaderText="Factor" UniqueName="USAGE_FACTOR" 
                    ColumnEditorID="GridNumericColumnEditor1">  
                    <HeaderStyle Width="40px" /> 
                    <ItemStyle Width="40px" /> 
                </telerik:GridNumericColumn> 
                <telerik:GridHyperLinkColumn Text="Search">  
                      
                </telerik:GridHyperLinkColumn> 
                  
            </Columns> 
        </MasterTableView> 
    </ngc:NGCGrid> 
    <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="120px" /> 
    <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor2" runat="server" TextBoxStyle-Width="300px" /> 
    <telerik:GridNumericColumnEditor ID="GridNumericColumnEditor1" runat="server" NumericTextBox-Width="40px" /> 
Pavlina
Telerik team
 answered on 07 May 2010
7 answers
244 views
Hi,

Header is missing after loading the radgrid. Attached is the screen shot.

Following is the code i am using for update panel

<telerik:RadAjaxManagerProxy ID="radAjaxMgr" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="rgrdDocumentList">
<UpdatedControls>
<telerik:AjaxUpdatedControl LoadingPanelID="lstLoadingpane" ControlID="rgrdDocumentList" />
<telerik:AjaxUpdatedControl ControlID="hiddenDirtyFlag" />
</UpdatedControls>
</telerik:AjaxSetting>

</AjaxSettings>

</telerik:RadAjaxManagerProxy>

<telerik:RadAjaxLoadingPanel Transparency="10" ID="lstLoadingpane" runat="server"
IsSticky="true" CssClass="FileStoreModalPanel">
</telerik:RadAjaxLoadingPanel>


Here "rgrdDocumentList" is our radgrid control.

Please suggest me the solution.

Thanks,
Shashi
Dimo
Telerik team
 answered on 07 May 2010
5 answers
283 views

I have set my radgrid header color to gray and I am not using a skin.  The problem is that I have a white box in the upper right corner of the grid above the scrollbar.  If I increase the width of my header to fill the space then I get a scroll bar at the bottom of the grid and the white box just gets pushed to the right.  How can i color this space without coloring the entire grid?  I have attached a file showing the area I am trying color.



Pavlina
Telerik team
 answered on 07 May 2010
1 answer
102 views
Hi,

I have a requirement where I need to order the columns in a particular order given for each and every column.
After seeing the demo here
I hope I can do this. But my doubt is whether my requirement can be achieved with this demo? Any help?

Regards,
Satish Kumar.
Shinu
Top achievements
Rank 2
 answered on 07 May 2010
1 answer
102 views

I would like to populate the combo boxes on my edit FormTemplate on Page_Load.  Is this possible or do I have to do it on item created event?  I would like to do it once versus re-populating the control every time the user clicks "edit".

Thanks
Scott
Shinu
Top achievements
Rank 2
 answered on 07 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?