Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
209 views
Hi All,

I have a FileUpload control in radgrid edit itmetemplate,
but i am not able to access the file in c# by doing FUDoc = (FileUpload)e.Items.FindControl("RadUpload1") always this code return null.

please helpme regarding this.
PM
Top achievements
Rank 1
 answered on 11 Dec 2009
2 answers
176 views
Hi Guys,

I want to implement Grid / Virtual Scrolling and Paging without Rad Ajax Manager. On the site of telerik all the demos made with the help of red Ajax Manager. But i have a constraint i cannt use rad ajax manager. i am  using script manager of ajax.

How to implement Grid / Virtual Scrolling and Paging with script manager?????????

Thanks in advance.


Please do reply ASAP.
Yavor
Telerik team
 answered on 11 Dec 2009
1 answer
136 views
Hi,

I converted existing ajax ModalPopupExtender window to rad window. The existing page had a ajax felexbox(jquery) ,after i convert to rad window it disappears.

Any help.

Thanks.
Eva
Georgi Tunev
Telerik team
 answered on 11 Dec 2009
1 answer
246 views
Hi there,

I am loading UserControls dynamically onto my Page as shown in your Samples. Now I have a problem with following Setup:

<Page>
 <ContentPanel>
    <UserControl A>
          <Repeater>
               <User Control B>
                       <DIV id=container runat=server>
                                 <Button1>  ( OnClick= Should replace Dynamic User Control A with another Control)
                                 <Button2>  ( OnClick= Update "container")
                       <DIV runat=server>                
               <User Control B>
               .
               .
          </Repeater>
    </UserControl A>
 <ContentPanel>
</Page>

The problem now is that nothing gets updated if I press Button1. All events on the server side occur as expected. In the Button1 click event I load the new User Control into the ContentPanel (which is ajaxified with RadAjaxManager).

If I move Button1 above the container all works as expected (because the whole ContentPanel is ajaxified as far as I know) . Only if I put the button into the div container which is ajaxified with Button2 this doesn't work. Am I missing something or doing something wrong?
Veli
Telerik team
 answered on 11 Dec 2009
9 answers
378 views
Hi,

We are trying to display a RadGrid with horizontal scroll bar as we have sevreal number of coulns to display.Iam generating the RadGrid programatically with dynamic columns.When i set the width of the Radgrid and also the columns in pixels iam able to see the horizonatal scrollbar. But we need to set the width in percentage,but it doesn't show the horizontal scrollbar.
Below is the code to create the radgrid

private

 

void DefineRadGridMarketsStructure()

 

{

 

object objDbId = SessionManager.GetSessionObject("INSTR_ID");

 

 

if (objDbId != null)

 

{

_dbId = (

int)objDbId;

 

}

 

grid =

new RadGrid();

 

grid.ID =

"radGridMarkets";

 

 

//grid.DataSourceID = "objContDSMarkets";

 

grid.AutoGenerateColumns =

false;

 

grid.AllowSorting =

true;

 

grid.AllowMultiRowSelection =

true;

 

grid.AllowMultiRowEdit =

true;

 

 

grid.GridLines =

GridLines.None;

 

grid.Height =

Unit.Pixel(400);

 

grid.Width =

Unit.Percentage(100);

 

grid.AllowPaging =

true;

 

grid.PageSize = 1000;

grid.GroupingSettings.CaseSensitive =

false;

 

grid.EnableLinqExpressions =

false;

 

 

String htmlColor = "#EDEFF1";

 

 

Color backColor = ColorTranslator.FromHtml(htmlColor);

 

grid.AlternatingItemStyle.BackColor = backColor;

 

String editColor = "#A2A2A2";

 

 

Color editbackColor = ColorTranslator.FromHtml(editColor);

 

grid.EditItemStyle.BackColor = editbackColor;

grid.EditItemStyle.Font.Name =

"arial";

 

grid.EditItemStyle.Font.Size =

new FontUnit("11px");

 

 

//grid.BorderColor = Color.Blue;

 

grid.MasterTableView.Width =

Unit.Percentage(100);

 

grid.MasterTableView.AllowFilteringByColumn =

true;

 

grid.MasterTableView.AllowPaging =

true;

 

grid.MasterTableView.PagerStyle.AlwaysVisible =

true;

 

grid.MasterTableView.PagerStyle.Position =

GridPagerPosition.TopAndBottom;

 

grid.MasterTableView.PagerStyle.Mode =

GridPagerMode.NextPrevNumericAndAdvanced;

 

 

grid.ClientSettings.AllowKeyboardNavigation =

true;

 

grid.ClientSettings.Selecting.AllowRowSelect =

true;

 

grid.ClientSettings.Scrolling.AllowScroll =

true;

 

grid.ClientSettings.Scrolling.UseStaticHeaders =

true;

 

grid.ClientSettings.Resizing.AllowColumnResize =

true;

 

grid.ClientSettings.Resizing.AllowRowResize =

true;

 

grid.ClientSettings.Resizing.ResizeGridOnColumnResize =

true;

 

grid.ClientSettings.Resizing.EnableRealTimeResize =

true;

 

grid.ClientSettings.Scrolling.ScrollHeight =

Unit.Pixel(320);

 

 

grid.FilterMenu.EnableTheming =

true;

 

grid.FilterMenu.CollapseAnimation.Duration = 200;

grid.FilterMenu.CollapseAnimation.Type =

AnimationType.OutQuint;

 

 

//Add Master table

 

grid.MasterTableView.Name =

"Market";

 

grid.MasterTableView.PageSize = 1000;

 

grid.MasterTableView.EditMode =

GridEditMode.InPlace;

 

grid.MasterTableView.TableLayout =

GridTableLayout.Fixed;

 

 

GridClientSelectColumn col0 = new GridClientSelectColumn();

 

col0.UniqueName =

"marketcheckBoxColumn";

 

grid.MasterTableView.Columns.Add(col0);

grid.MasterTableView.Columns[0].HeaderStyle.Width =

Unit.Percentage(10);

 

grid.MasterTableView.Columns[0].ItemStyle.Width =

Unit.Percentage(10);

 

 

//grid.MasterTableView.Columns[0].HeaderStyle.HorizontalAlign = HorizontalAlign.Center;

 

 

//grid.MasterTableView.Columns[0].ItemStyle.HorizontalAlign = HorizontalAlign.Center;

 

 

GridEditCommandColumn col1 = new GridEditCommandColumn();

 

col1.ButtonType =

GridButtonColumnType.ImageButton;

 

col1.UpdateImageUrl =

"../images/Update.gif";

 

col1.EditImageUrl =

"../images/Edit.gif";

 

col1.InsertImageUrl =

"../images/Insert.gif";

 

col1.CancelImageUrl =

"../images/Cancel.gif";

 

 

col1.UniqueName =

"EditCommandColumn";

 

grid.MasterTableView.Columns.Add(col1);

grid.MasterTableView.Columns[1].HeaderStyle.Width =

Unit.Percentage(10);

 

grid.MasterTableView.Columns[1].ItemStyle.Width =

Unit.Percentage(10);

 

 

GridButtonColumn col2 = new GridButtonColumn();

 

col2.Text =

"Delete";

 

col2.ConfirmText =

"Delete this product?";

 

col2.ButtonType =

GridButtonColumnType.ImageButton;

 

col2.ImageUrl =

"../images/Delete.gif";

 

col2.CommandName =

"Delete";

 

col2.UniqueName =

"DeleteColumn";

 

grid.MasterTableView.Columns.Add(col2);

grid.MasterTableView.Columns[2].HeaderStyle.Width =

Unit.Percentage(10);

 

grid.MasterTableView.Columns[2].ItemStyle.Width =

Unit.Percentage(10);

 

 

GridCheckBoxColumn col3 = new GridCheckBoxColumn();

 

col3.UniqueName =

"colActive";

 

col3.HeaderText =

"Active";

 

col3.AllowFiltering =

false;

 

grid.MasterTableView.Columns.Add(col3);

grid.MasterTableView.Columns[3].HeaderStyle.Width =

Unit.Percentage(10);

 

grid.MasterTableView.Columns[3].ItemStyle.Width =

Unit.Percentage(10);

 

 

 

GridBoundColumn col4 = new GridBoundColumn();

 

 

//col4.DataField = "Tag";

 

col4.DataField =

"mkt_tag";

 

col4.UniqueName =

"colTag";

 

col4.HeaderText =

"Tag";

 

 

//col3.ReadOnly = true;

 

grid.MasterTableView.Columns.Add(col4);

grid.MasterTableView.Columns[4].HeaderStyle.Width =

Unit.Percentage(10);

 

grid.MasterTableView.Columns[4].ItemStyle.Width =

Unit.Percentage(10);

 

 

 

string templateColumnName = "Country";

 

 

GridTemplateColumn col5 = new GridTemplateColumn();

 

col5.ItemTemplate =

new ItemTemplate(templateColumnName);

 

col5.EditItemTemplate =

new EditItemTemplate(templateColumnName,_dbId);

 

col5.HeaderText =

"Country";

 

col5.UniqueName =

"colCountry";

 

grid.MasterTableView.Columns.Add(col5);

grid.MasterTableView.Columns[5].HeaderStyle.Width =

Unit.Percentage(10);

 

grid.MasterTableView.Columns[5].ItemStyle.Width =

Unit.Percentage(10);

 

 

 

 

GridBoundColumn col6 = new GridBoundColumn();

 

 

//col6.DataField = "ShortDescription";

 

col6.DataField =

"mkt_sdesc";

 

col6.UniqueName =

"colShortDescription";

 

col6.HeaderText =

"Short Description";

 

col6.MaxLength = 40;

grid.MasterTableView.Columns.Add(col6);

grid.MasterTableView.Columns[6].HeaderStyle.Width =

Unit.Percentage(10);

 

grid.MasterTableView.Columns[6].ItemStyle.Width =

Unit.Percentage(10);

 

 

GridBoundColumn col7 = new GridBoundColumn();

 

col7.DataField =

"mkt_sdesc2";

 

col7.UniqueName =

"colShortDescription2";

 

col7.HeaderText =

"Short Description 2";

 

col7.MaxLength = 40;

grid.MasterTableView.Columns.Add(col7);

grid.MasterTableView.Columns[7].HeaderStyle.Width =

Unit.Percentage(10);

 

grid.MasterTableView.Columns[7].ItemStyle.Width =

Unit.Percentage(10);

 

 

GridBoundColumn col8 = new GridBoundColumn();

 

 

//col8.DataField = "LongDescription";

 

col8.DataField =

"mkt_ldesc";

 

col8.UniqueName =

"colLongDescription";

 

col8.HeaderText =

"Long Description";

 

col8.MaxLength = 80;

grid.MasterTableView.Columns.Add(col8);

grid.MasterTableView.Columns[8].HeaderStyle.Width =

Unit.Percentage(10);

 

grid.MasterTableView.Columns[8].ItemStyle.Width =

Unit.Percentage(10);

 

templateColumnName =

"QCInstructions";

 

 

GridTemplateColumn col9 = new GridTemplateColumn();

 

col9.DataField =

"QCInstructions";

 

col9.ItemTemplate =

new ItemTemplate(templateColumnName);

 

col9.EditItemTemplate =

new EditItemTemplate(templateColumnName, _dbId);

 

col9.HeaderText =

"QC Instructions";

 

col9.UniqueName =

"colQCInstructions";

 

grid.MasterTableView.Columns.Add(col9);

grid.MasterTableView.Columns[9].HeaderStyle.Width =

Unit.Percentage(10);

 

grid.MasterTableView.Columns[9].ItemStyle.Width =

Unit.Percentage(10);

 

 

GridBoundColumn col11 = new GridBoundColumn();

 

col11.DataField =

"nshops";

 

col11.UniqueName =

"colNShops";

 

col11.HeaderText =

"NShops";

 

col11.MaxLength = 5;

grid.MasterTableView.Columns.Add(col11);

grid.MasterTableView.Columns[10].HeaderStyle.Width =

Unit.Percentage(10);

 

grid.MasterTableView.Columns[10].ItemStyle.Width =

Unit.Percentage(10);

 

 

GridTemplateColumn col12 = new GridTemplateColumn();

 

col12.ItemTemplate =

new ItemTemplate("PeriodLength");

 

col12.EditItemTemplate =

new EditItemTemplate("PeriodLength", _dbId);

 

col12.UniqueName =

"colPeriodLength";

 

col12.HeaderText =

"Period Length";

 

grid.MasterTableView.Columns.Add(col12);

grid.MasterTableView.Columns[11].HeaderStyle.Width =

Unit.Percentage(10);

 

grid.MasterTableView.Columns[11].ItemStyle.Width =

Unit.Percentage(10);

 

 

 

DataSet ds = new DataSet();

 

 

DBConnectionUtility dbcon = new DBConnectionUtility();

 

ds = dbcon.GetDataTable(

"Select db_char_name_id , 'Char_' || char_name as Char_name from axnadmin.gs_clt_db_char_names where clt_db_id= " + _dbId +

 

 

" and dimension_id = 1");

 

_noOfChars = ds.Tables[0].Rows.Count;

_dtCharNames = ds.Tables[0];

 

StringBuilder sb = new StringBuilder();

 

sb.Append(

"clt_db_id,mkt_id,mkt_tag,country,qcinstructions,periodlength,Active");

 

 

for (int i = 0; i < _noOfChars ; i++)

 

{

 

GridTemplateColumn col13 = new GridTemplateColumn();

 

col13.ItemTemplate =

new ItemTemplate(ds.Tables[0].Rows[i]["Char_Name"].ToString());

 

col13.EditItemTemplate =

new EditItemTemplate(ds.Tables[0].Rows[i]["Char_Name"].ToString(),_dbId);

 

col13.HeaderText = ds.Tables[0].Rows[i][

"Char_Name"].ToString();

 

col13.UniqueName =

"colChar" + ds.Tables[0].Rows[i]["Char_Name"];

 

sb.Append(

",");

 

sb.Append(ds.Tables[0].Rows[i][

"Char_Name"].ToString());

 

grid.MasterTableView.Columns.Add(col13);

grid.MasterTableView.Columns[i + 12].HeaderStyle.Width =

Unit.Percentage(10);

 

grid.MasterTableView.Columns[i + 12].ItemStyle.Width =

Unit.Percentage(10);

 

}

 

string dataKeyNames = sb.ToString();

 

grid.MasterTableView.DataKeyNames = dataKeyNames.Split(

',');

 

grid.NeedDataSource +=

new GridNeedDataSourceEventHandler(this.RadGridMarkets_NeedDataSource);

 

 

//grid.DeleteCommand += new GridCommandEventHandler(this.RadGridMarkets_DeleteCommand);

 

 

//grid.UpdateCommand += new GridCommandEventHandler(this.RadGridMarkets_UpdateCommand);

 

 

//grid.InsertCommand += new GridCommandEventHandler(this.RadGridMarkets_InsertCommand);

 

grid.ItemDataBound +=

new GridItemEventHandler(this.RadGridMarkets_ItemDataBound);

 

grid.ItemCommand +=

new GridCommandEventHandler(this.RadGridMarkets_ItemCommand);

 

 

MessageControl MessageUserControl = (MessageControl)LoadControl("~/Common/CommonUI/MessageControl/MessageControl.ascx");

 

MessageUserControl.ID =

"lblMessageUserControl";

 

 

 

//objContainer.Selecting += new EventHandler<ObjectContainerDataSourceSelectingEventArgs>(this.objContDSMarkets_Selecting);

 

grid.MasterTableView.CommandItemTemplate =

new MarketCommandItemTemplate();

 

grid.MasterTableView.CommandItemDisplay =

GridCommandItemDisplay.Top;

 

 

// Add the grid to the placeholder

 

 

this.radAjaxPanelMarkets.Controls.Add(MessageUserControl);

 

 

this.radAjaxPanelMarkets.Controls.Add(grid);

 

 

//this.radAjaxPanelMarkets.Controls.Add(objContainer);

 

}

Thanks and Regards
V.Balamurali

Pavlina
Telerik team
 answered on 11 Dec 2009
3 answers
211 views
Hello,

I want to add my custom fonts to the editor. How to do it without code?

Regards
NLV
NLV
Top achievements
Rank 1
 answered on 11 Dec 2009
5 answers
160 views
One site:
- if I digit "localhost" the columns stretch is ok (ok01.jpg,
ok02.jpg)
- if I digit "computer name" the columns stretch is wrong  (ko01.jpg, ko02.jpg)
have you any ideas?

Thanx
Dimo
Telerik team
 answered on 11 Dec 2009
3 answers
111 views
I have a radgrid that uses a usercontrol as its edit form and in that user control i have a few drop down lists.  In the usercontrol I try to insert a list item into one of my ddl's after it is databound and it adds successfully.  When the prerender event fires for that DDL the inserted item disappears.  I double checked to make sure the DDL was not getting rebound which it was not.  I've noticed this before and my work around is to insert the item in the ddl prerender function and then everything works fine.  I only have this issue with dropdowns that are in grid user control edit forms.  Any thoughts?
Veli
Telerik team
 answered on 11 Dec 2009
1 answer
83 views
Hi

   i have the  doc  file contains Images, tables etc..i want to copy the contents from document and paste it into the editor or  upload the  word document contains images and insert into editor...

I tried but images are not showing in the editor.

How can i do it ?

Thanks for any help

Rumen
Telerik team
 answered on 11 Dec 2009
4 answers
185 views
Greetings,
I am having an issue when I have I have two GridDateTimeColumns in my RadGrid.  When I go and edit the record, I can click the time view popup and see it for the first field but once I set the time for that popup, the popup for the second field does not display.
Since, I'm not sure if I am explaining this correctly allow me to demonstrate:

Fields are StartTime and EndTime

1. Edit the record
2. Select StartTime TimeView popup and set StarTime
3. Select EndTime TimeView popup... (Doesn't not display popup)

This also works in reverse (By setting the EndTime first I can no longer see the StartTime TimeView popup)

Thoughts?
Princy
Top achievements
Rank 2
 answered on 11 Dec 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?