Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
78 views
Hi, I;m using the tabstrip with a couple of pageviews.
On each tab/pageview, I am showing some settings for an application I am making.

So on each tab I am dynamically loading a different usercontrol with a form (with settings which are loaded) and a submit button.
I'm having touble when trying to find out if a postback is caused by a click on the tabstrip, or on the submit button.

If I click on a tab (causes a postback), the usercontrol should be loaded, and the form should be filled with the settings which are already present in the database.
If I click on an update button (causes a postback), the settings of the current usercontrol should be saved back to the database.

I'm doing this in the main page:

#Region "RadTabStrip1_TabClick"
        Sub RadTabStrip1_TabClick(ByVal sender As Object, ByVal e As RadTabStripEventArgs) Handles RadTabStrip1.TabClick
            Select Case RadTabStrip1.SelectedIndex
                Case 0
                    LoadGeneralSettings()
                Case 1
                    LoadMembershipSettings()
                Case 2
                    LoadUsersSettings()
                Case 3
                    ...
                Case 4
                    ...
            End Select
        End Sub
#End Region

And:

#Region "LoadMembershipSettings"
        Sub LoadMembershipSettings()
            Dim gMembershipSettings As MB.Modules.gMembershipSettings = LoadControl("~/DesktopModules/MB/ControlPanel/gMembershipSettings.ascx")
            gMembershipSettings .ModuleConfiguration = Me.ModuleConfiguration
            rpvMembershipSettings.Controls.Add(gMembershipSettings )
            gMembershipSettings.getsettings()
        End Sub
#End Region

So in gMembershipSettings.ascx I have a sub called getsettings, which loads the settings from the database and fills them in the form.
And I have an eventhandler for the update button which will save the settings to the database.

However when I click the submit button, it will first load the old settings again, and save those back to the database.

When I do something like

if not page.ispostback then
     gMembershipSettings.getsettings()
end if

It will not load the settings when I click on the tab.

So what should I do?


Yana
Telerik team
 answered on 07 May 2010
1 answer
61 views
Hello,

We have some issues using date filters on a RadGrid. The filter icon (.rgFilter) shows under the filter textbox in FF3.6. However this works fine on IE8.

On your RadGrid demo, we found this :
<div style="height: 20px; width: 120px; display: -moz-inline-stack;" class="RadPicker RadPicker_Default " id="RadGrid1_ctl00_ctl02_ctl02_RDIPFShippedDate_wrapper"

However, in our app, the "display: -moz-inline-stack" is missing.

We added the following CSS rule and it works fine, but it looks more like a hack from now :
.rgFilterRow .RadPicker 
  display: -moz-inline-stack; 
 

Additionally we have a blank space on IE7 between date filter text boxes (.riTextBox) and calendar icons (.rcCalPopup). These should be close each other.

Thank you

Using :
- FF 3.6.3
- IE7
- Telerik 2010.1.415.40
- Default RadGrid skin
Dimo
Telerik team
 answered on 07 May 2010
1 answer
93 views
Hello Friend's

How to validate the DropDownList control inside built-in GridDropDownColumn.
i am not want to use gridtemplatecolumn

 

 

 


Shinu
Top achievements
Rank 2
 answered on 07 May 2010
2 answers
227 views
Here is my code...
  strDOB = strDOB & "/" & mid(USBHID.GetTrack(2), 30, 2) & "/" & mid(USBHID.GetTrack(2), 32, 2)  
document.getElementById ("ctl00_ContentPlaceHolder1_fvClients_DOBTextBox").value = strDOB 
It should populate my datepicker with the date of birth from my Javascript.

However this dosen't work using the control above, nothing is entered into the datepicker (and yes I have verified the variable holding the date is valid using an alert box) and looking at my rendered source code, I see that RadCalendar produces two more input controls:
ctl00_ContentPlaceHolder1_fvClients_DOBTextBox_dateInput_text
ctl00_ContentPlaceHolder1_fvClients_DOBTextBox_dateInput

If I change my JS code to populate these input boxes, I start to see results, however they still do not work.  If I use the input control which ends in "dateInput" and then click in the radDatePicker after it populates, the input control clears and the date is lost.

Then if I use the input control which ends in "dateInput_text" and then click in the radDatePicker after it populates, the input control changes to "0NaN/0NaN/0NaN" and the date reverts back default "minDate" of 1998/12/31

So my question is, using JS what input control should I be targeting and how do I get the date to "stick" even when someone clicks in the datePicker control field?
Dimo
Telerik team
 answered on 07 May 2010
7 answers
454 views
Hi,

Is there an ability to add rounded corners?  I couldn't see anything, but have only had a quick look.

Thanks,

Richard
Yana
Telerik team
 answered on 07 May 2010
2 answers
337 views
Hi.

I have a RadGrid (Q3 2009) that i add columns to dynamically at runtime.
My problem is that the total grid width is always 100% of the parent container and the columns are sized thereafter.

I would like the columns to have a size that has an "auto fit" to the content but when the column headers that in my case sometimes are quite long i would like to wrap them as well. But when I set the <HeaderStyle Wrap="true" /> the columns sometimes gets wrapped so that every single word is on a single line which looks really bad  (See attachment: croppercapture[1].png)
I would like to have a solution that provides MinWidth and MaxWidth type of values.

I have tried MasterTableView.TableLayout Fixed and Auto but without a decent result. Soo how can I make the grid to size its columns based on the content but still have wrapping but with more control. Can I do it in code behind, and perhaps use some kind of MeasureString() function to set the column size?

Any ideas how to solve my problem?

Thanks in advance.

//Johan

This is the markup.
        <telerik:RadGrid ID="RadGrid1" runat="server" OnColumnCreated="RadGrid1_ColumnCreated" AutoGenerateColumns="false" OnDataBound="RadGrid_DataBound" OnItemDataBound="RadGrid_ItemDataBound" OnNeedDataSource="RadGrid1_NeedDataSource" 
            OnSortCommand="RadGrid_SortCommand" AllowSorting="True" BorderWidth="0px" CellPadding="0" AllowMultiRowSelection="True" Skin="Default" meta:resourcekey="RadGrid1Resource1" EnableViewState="False"
            <ItemStyle Height="10px" /> 
            <AlternatingItemStyle Height="10px" BackColor="#F8F9BC" /> 
            <MasterTableView EnableViewState="False" AutoGenerateColumns="false"
                <RowIndicatorColumn Visible="False" /> 
                <ExpandCollapseColumn Visible="False" /> 
            </MasterTableView> 
            <HeaderStyle Font-Bold="True" Font-Size="X-Small" Wrap="True"  Height="20px" /> 
            <ClientSettings> 
                <Selecting AllowRowSelect="True" /> 
                <Scrolling AllowScroll="True" UseStaticHeaders="true" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
Dimo
Telerik team
 answered on 07 May 2010
2 answers
103 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
175 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
265 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
802 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?