Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
167 views
Hi,

We are using a formview with multiple usercontrols.
In each usercontrol are one or more comboboxes.

The comboboxes in a usercontrol are inside an asp:updatepanel.
When i select an item in a combobox the other comboboxes on the page are getting messed up.

You can see this in the following link:
http://bart.nimio.info/images/fora/popup.jpg

Is there a solution for this problem?
Datamex
Top achievements
Rank 2
 answered on 09 Sep 2009
3 answers
132 views
Hi,

When I enable the combination of AllowScrolling and UseStaticHeaders with a set ScrollHeight, if there are enough items to cause the vertical scrolling to occur, it also causes the horizontal scrolling.  My best guess is that it trys to use part of the grid for the scroll bar and doesnt re-size the columns to fit inside of it.  Instead its funny looking in that the headers stay static even when horizontally scrolling.  Is there a way to fix this so that if a vertical scroll bar is needed, the columns will resize to not think they need that extra 20 pixels or so?
Michael Arocho
Top achievements
Rank 2
 answered on 09 Sep 2009
1 answer
98 views
Hello, here is my problem.
I define an initial SqlDataSource sqlDataSource 1 statically and, according to some input parameters, at runtime I update it dinamically when clicking a button (say btnUpdate), binding it to the RadGrid1 control.
The grid shows the correct results but,  when sliding to a second page of results, the items found are not the ones filtered by the updated query but by the initial of the sqlDataSouce1 statically defined.
All this is done with Ajax without postbacking the page.
Where is my error?
Thanks.
  
Martin
Telerik team
 answered on 09 Sep 2009
1 answer
135 views


i have to specify total number of nested GridTableView and create a detail table to each GridTableView created
depends on the input #of time nested


example input 5 nested GridTableView

output should be like this:
GridTableView 0
     GridTableView1
            GridTableView2
                GridTableView 3
                         GridTableView 4    

 public GridTableView CreateDetailTable(int i) 
    { 
 
            GridTableView table = new GridTableView(); 
            table.Name=string.Format("GridTableView{0}", i); 
         
         
        return table;  
    } 
 
    public GridTableView AddDetailTable(GridTableView view,int i) 
    { 
 
        view.DetailTables.Add(CreateDetailTable(i)); 
         
        foreach (GridTableView vw in view.DetailTables) 
        { 
            tableview = vw
        } 
        return tableview; 
    } 
 
    private void GenerateDetailTable(int count) 
    { 
 
        gtv = new GridTableView(); 
        GridTableView tempView = CreateDetailTable(0); 
        gtv.DetailTables.Add(tempView); 
        GridTableView Loop = gtv
        for (int i = 1; i < count; i++) 
        { 
            tempView=AddDetailTable(tempView, i); 
 
            foreach (GridTableView item in Loop.DetailTables) 
            { 
                item.DetailTables.Add(tempView); 
                Loop = item
            } 
        } 
    } 

example input 3 nested GridTableView

output should be like this:
GridTableView0
     GridTableView1
            GridTableView2
Martin
Telerik team
 answered on 09 Sep 2009
1 answer
193 views
hi
i tested ur Persian calendar but it isn't Persian calendar!!!there are many differences between standard calendar and Persian calendar
1-months of Persian calendar are:
Farvardin = فرودين
Ordibehesht = ارديبهشت
Khordad = خرداد
Tir = تير
Mordad = مرداد
Shahrivar = شهريور
Mehr = مهر
Aban = آبان
Azar = آذر
Dey = دي
Bahman = بهمن
Esfand = اسفند
2-number of current year in Persian is 1388
3-style of date in persian date is like this : YYYY/MM/DD ( for example  "1388/06/16" is today  )

can u change it?
Martin
Telerik team
 answered on 09 Sep 2009
4 answers
371 views
Hi all,

I use a RadGrid for showing some users. I using my own datasource there among other things contain firstname and lastname. I extract the data into two columns by setting the datafield in these to DataField="FirstName" and DataField="LastName", respectively.

How can show the full name using only one column? Something like DataField="FirstName & ' ' & LastName"?

Best regards,
Kenneth
Martin
Telerik team
 answered on 09 Sep 2009
1 answer
78 views
Hi,

While exporting rad grid data to excel, is it possible to pass user explicit data which should appear in the worksheet before the actual data exports?

Here is my actual requirement: In a search page, we'll display records based on some filter criteria. While exporting to excel, we need the search criteria information also to be exported in the worksheet.

If any one have code for this, or idea about how can we achieve, pls. share with me.

Thanks
Daniel
Telerik team
 answered on 09 Sep 2009
3 answers
194 views

The following is text I entered in RadEditor box:

This is a test message, but the count is not coming out quite right.  What shall I do, this text is not pasted, but manually entered.  Does that make a difference?

Characters: 157

but in code behind the length of text shows 163

See code below:


<

 

script type="text/javascript">

 

MyModule =

function(element)

 

{

MyModule.initializeBase(

this, [element]);

 

}

MyModule.prototype =

{

initialize :

function()

 

{

MyModule.callBaseMethod(

this, 'initialize');

 

 

var selfPointer = this;

 

 

this.get_editor().add_selectionChange(function (){ selfPointer.CountCharAction(); });

 

 

this.get_editor().attachEventHandler("onkeyup", function(){ selfPointer.CountCharAction(); });

 

 

this.CountCharAction();

 

},

 

//A method that does the actual work - it is usually attached to the "selection changed" editor event

 

CountCharAction :

function()

 

{

 

 

var content = this.get_editor().get_html(true);

 

 

var chars = 0;

 

 

if (content)

 

{

    punctRegX = /[!\.?;,:&_\-\-\{\}\[\]\(\)~#

'"]/g;

 

    content = content.replace(punctRegX,

"");

 

    trimRegX = /(^\s+)|(\s+$)/g;

    content = content.replace(trimRegX,

"");

 

 

    if (content)

 

    {

        splitRegX = /\s+/;

 

        var array = content.split(splitRegX);

 

        chars = content.length;

 

    }

}

 

var element = this.get_element();

 

element.innerHTML = "<span style='line-height:22px; float:left;'>" + " Characters: " + chars + "&nbsp;</span>"
element.style.border = "1px solid red";

 

element.style.backgroundColor =

"transparent";

 

element.style.color =

"red";

 

}

};

MyModule.registerClass(

'MyModule', Telerik.Web.UI.Editor.Modules.ModuleBase);

 

 

</script>


 

<

 

telerik:RadEditor ID="tbBody" runat="server" Skin="Web20" Width="500px" Height="400px"

 

 

 

 

 

EditModes="Design">

 

 

 

 

 

<Modules>

 

 

 

 

 

<telerik:EditorModule Name="RadEditorStatistics" Enabled="true" Visible="false" />

 

 

 

 

 

<telerik:EditorModule Name="MyModule" Enabled="true" Visible="true" />

 

 

 

 

 

</Modules>

 

 

 

 

 

<Tools>

 

 

 

 

 

<telerik:EditorToolGroup>

 

 

 

 

 

<telerik:EditorTool Name="Cut" />

 

 

 

 

 

<telerik:EditorTool Name="Copy" />

 

 

 

 

 

<telerik:EditorTool Name="Paste" />

 

 

 

 

 

<telerik:EditorSeparator />

 

 

 

 

 

<telerik:EditorTool Name="JustifyLeft" />

 

 

 

 

 

<telerik:EditorTool Name="JustifyCenter" />

 

 

 

 

 

<telerik:EditorTool Name="JustifyRight" />

 

 

 

 

 

</telerik:EditorToolGroup>

 

 

 

 

 

</Tools>

 

 

 

 

 

</telerik:RadEditor>

 

 

 



Code behind (shows count of 163):

 

string

 

body = tbBody.Content.Trim();

 

 

body = utils.stripHTML(body).Trim();

 

 

 

 

if

 

(body.Length > 1250)

 

{

errorMessage(

string.Format("Error: Comments can not exceed 1250 characters!"));

 

 

return;

 

}

ManniAT
Top achievements
Rank 2
 answered on 09 Sep 2009
6 answers
242 views
hi team , shinu and anyone. sorry about this but i could not solve this problem.
i have a radmenu and it have an item KH and this item have 2 children HD and LH .they have 2 accesskey L and H for 2 children.i want when i active accesskey L , radwindow will show up. i can do it with a button by using property OpenerElementID but with item in radmenu they don't have property ID or Name to using property OpenerElementID.About event itemClick of radmenu to activating radwindow . because this event have a function in code behind so that i cann't wirte a function by javascript for it to activating radwindow. i have an idea to do it by using button ( when i click item in radmenu , they will active the action click like i click on button, but i don't know how to do that, running function button_click in function itemclick but nothing happened >.< ! may be this is stupid idea).  plz help me to solve that problem thank you all. ( i am just beginning with asp.net so that there is many thing i don't know ^.^).
lang dinh thien
Top achievements
Rank 1
 answered on 09 Sep 2009
3 answers
226 views
When the following code runs, the .Texts for the bound columns come back as empty strings and the .SelectedValues for the drop-down columns come back with whatever their default selection is.  EditMode is InPlace, however I'm not sure that matters since when I tried changing it to EditForms and using a GridEditFormInsertItem instead of a GridDataInsertItem the same thing happened.

<telerik:RadGrid ID="rgQuestions" runat="server" DataSourceID="dsQuestion" AutoGenerateColumns='false' Skin="Simple" 
    AllowAutomaticUpdates='false' AllowAutomaticInserts = 'false' AllowAutomaticDeletes='false'  
    OnItemDataBound='rgQuestions_ItemDataBound' OnInsertCommand='rgQuestions_InsertCommand' OnDeleteCommand='rgQuestions_DeleteCommand' OnUpdateCommand='rgQuestions_UpdateCommand' > 
        <MasterTableView EditMode='InPlace' CommandItemDisplay="Bottom" CommandItemSettings-AddNewRecordText="New Question"
            <Columns> 
                <telerik:GridEditCommandColumn ButtonType='LinkButton' /> 
                <telerik:GridBoundColumn HeaderText="Question Key" DataField="QuestionKey" UniqueName="colQuestionKey" ReadOnly="True" Display="False" /> 
                <telerik:GridBoundColumn HeaderText="Inspection" DataField="InspectionKey" UniqueName="colInspectionKey" ReadOnly="True" Display='false' /> 
                <telerik:GridBoundColumn HeaderText="#" DataField="QuestionNumber" UniqueName="colQuestionNumber" /> 
                <telerik:GridBoundColumn HeaderText='Question' DataField='QuestionText' UniqueName='colQuestionText' /> 
                <telerik:GridDropDownColumn HeaderText='Asset Type' DataField='AssetTypeKey' UniqueName='colAssetTypeKey'  
                    DataSourceID='dsAssetType' ListTextField='AssetType' ListValueField='AssetTypeKey' />    
                <telerik:GridDropDownColumn HeaderText='Asset Contents' DataField='AssetContentKey' UniqueName='colContentDesc'  
                    DataSourceID='dsAssetContent' ListTextField='ContentDesc' ListValueField='AssetContentKey' EnableEmptyListItem='true' /> 
            </Columns> 
 
            <EditFormSettings> 
                <EditColumn UniqueName="EditCommandColumn1"></EditColumn> 
            </EditFormSettings> 
        </MasterTableView> 
    </telerik:RadGrid> 
 
protected void rgQuestions_InsertCommand(object sender, GridCommandEventArgs e) 
        { 
            if (e.CommandName == RadGrid.PerformInsertCommandName) 
            { 
                GridDataInsertItem item = (GridDataInsertItem)e.Item; 
                Question q = new Question(); 
                q.InspectionKey = Int32.Parse(rcbInspections.SelectedValue); 
                q.AssetTypeKey = Int32.Parse((item["colAssetTypeKey"].Controls[0] as RadComboBox).SelectedValue); 
                //q.AssetContentKey = Int32.Parse((item["colContentDesc"].Controls[0] as RadComboBox).SelectedValue); 
                q.QuestionNumber = Int32.Parse((item["colQuestionNumber"].Controls[0] as TextBox).Text); 
                q.QuestionText = (item["colQuestionText"].Controls[0] as TextBox).Text; 
                q.Active = true
                q.Save(); 
                rgQuestions.Rebind(); 
            } 
        } 

Mira
Telerik team
 answered on 09 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?