Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
129 views
I am creating a grid at runtime with the code below. The issue is that the checkboxs in the checkbox column are disabled/readonly. I need these to be enabled so that users can check and uncheck them.

Here's my code:

 

Dim rgOnOrder As RadGrid = New RadGrid

 

rgOnOrder.AllowMultiRowEdit =

True

 

rgOnOrder.ID =

"rgOnOrder"

 

rgOnOrder.DataSourceID =

"WebOnOrderSource"

 

rgOnOrder.MasterTableView.DataKeyNames =

New String() {"VendorStyle"}

 

rgOnOrder.Skin =

"WebBlue"

 

rgOnOrder.Width = Unit.Percentage(98)

rgOnOrder.PageSize = 15

rgOnOrder.AllowPaging =

True

 

rgOnOrder.AllowSorting =

True

 

rgOnOrder.AllowFilteringByColumn =

False

 

rgOnOrder.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric

rgOnOrder.AutoGenerateColumns =

False

 

rgOnOrder.ExportSettings.IgnorePaging =

True

 

rgOnOrder.ExportSettings.OpenInNewWindow =

True

 

rgOnOrder.ExportSettings.ExportOnlyData =

True

 

rgOnOrder.ExportSettings.FileName =

"webOnOrder"

 

rgOnOrder.ExportSettings.Pdf.PageWidth = 11

rgOnOrder.ExportSettings.Pdf.PageHeight = 8.5

 

'Master table - Customers (I in hierarchy level)

 

rgOnOrder.MasterTableView.PageSize = 15

 

'Add columnsn

 

 

Dim boundColumn As GridBoundColumn

 

boundColumn =

New GridBoundColumn

 

boundColumn.DataField =

"ItemKey"

 

boundColumn.HeaderText =

"CMS Key"

 

boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center

rgOnOrder.MasterTableView.Columns.Add(boundColumn)

boundColumn =

New GridBoundColumn

 

boundColumn.DataField =

"VendorStyle"

 

boundColumn.HeaderText =

"Vendor Style"

 

boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center

rgOnOrder.MasterTableView.Columns.Add(boundColumn)

boundColumn =

New GridBoundColumn

 

boundColumn.DataField =

"Division"

 

boundColumn.HeaderText =

"Division"

 

boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center

rgOnOrder.MasterTableView.Columns.Add(boundColumn)

boundColumn =

New GridBoundColumn

 

boundColumn.DataField =

"Department"

 

boundColumn.HeaderText =

"Department"

 

boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center

rgOnOrder.MasterTableView.Columns.Add(boundColumn)

boundColumn =

New GridBoundColumn

 

boundColumn.DataField =

"Class"

 

boundColumn.HeaderText =

"Class"

 

boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center

rgOnOrder.MasterTableView.Columns.Add(boundColumn)

boundColumn =

New GridBoundColumn

 

boundColumn.DataField =

"Description"

 

boundColumn.HeaderText =

"Description"

 

boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center

rgOnOrder.MasterTableView.Columns.Add(boundColumn)

boundColumn =

New GridBoundColumn

 

boundColumn.DataField =

"OnOrder"

 

boundColumn.HeaderText =

"On Order"

 

boundColumn.DataFormatString =

"{0:###,###}"

 

boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center

rgOnOrder.MasterTableView.Columns.Add(boundColumn)

boundColumn =

New GridBoundColumn

 

boundColumn.DataField =

"TotalOnOrder"

 

boundColumn.HeaderText =

"Total On Order"

 

boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center

boundColumn.DataFormatString =

"{0:###,###}"

 

rgOnOrder.MasterTableView.Columns.Add(boundColumn)

boundColumn =

New GridBoundColumn

 

boundColumn.DataField =

"FirstFlowDate"

 

boundColumn.HeaderText =

"First Flow Date"

 

boundColumn.DataFormatString =

"{0:d}"

 

boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center

rgOnOrder.MasterTableView.Columns.Add(boundColumn)

boundColumn =

New GridBoundColumn

 

boundColumn.DataField =

"LastFlowDate"

 

boundColumn.HeaderText =

"Last Flow Date"

 

boundColumn.DataFormatString =

"{0:d}"

 

boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center

rgOnOrder.MasterTableView.Columns.Add(boundColumn)

boundColumn =

New GridBoundColumn

 

boundColumn.DataField =

"Price"

 

boundColumn.HeaderText =

"Price"

 

boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center

boundColumn.DataFormatString =

"{0:$###.##}"

 

boundColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Right

rgOnOrder.MasterTableView.Columns.Add(boundColumn)

boundColumn =

New GridBoundColumn

 

boundColumn.DataField =

"txtStatus"

 

boundColumn.HeaderText =

"Item Status"

 

boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center

boundColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center

rgOnOrder.MasterTableView.Columns.Add(boundColumn)

boundColumn =

New GridBoundColumn

 

boundColumn.DataField =

"Pulled By"

 

boundColumn.HeaderText =

"Pulled By"

 

boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center

boundColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center

rgOnOrder.MasterTableView.Columns.Add(boundColumn)

 

 

Dim checkcolumn As GridCheckBoxColumn

 

checkcolumn =

New GridCheckBoxColumn

 

checkcolumn.HeaderText =

"Print Ticket?"

 

checkcolumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center

checkcolumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center

checkcolumn.ReadOnly =

False

 

rgOnOrder.MasterTableView.Columns.Add(checkcolumn)

 

boundColumn =

New GridBoundColumn

 

boundColumn.DataField =

"PullBTN"

 

boundColumn.HeaderText =

"Add to Pull List"

 

boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center

boundColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center

rgOnOrder.MasterTableView.Columns.Add(boundColumn)

boundColumn =

New GridBoundColumn

 

boundColumn.DataField =

"EditItem"

 

boundColumn.HeaderText =

"Edit Item"

 

boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center

boundColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center

rgOnOrder.MasterTableView.Columns.Add(boundColumn)

rgOnOrder.MasterTableView.EditMode = GridEditMode.InPlace

 

Try

 

 

Me.PlaceHolder1.Controls.Clear()

 

 

Catch ex As Exception

 

 

End Try

 

 

Me.PlaceHolder1.Controls.Add(rgOnOrder)

Thanks in advance for any help!

 

Daniel
Telerik team
 answered on 24 Aug 2009
6 answers
268 views
Hi everyone

I must be missing something but...

how can I determine which column a clicked cell belongs to (on the client?)


I can see plenty of code examples for row selection and iterating through columns but not for determining which column a cxel belongs to.

many thanks
Richard
Kris
Top achievements
Rank 1
 answered on 24 Aug 2009
1 answer
92 views
Hello,
I have my scheduler up and running, yet I'm trying to customize the "look and feel" for my scheduler but finding very hard to follow the examples online.  Could someone please give me step by step on how to customize my scheduler? Thank you in advance.

QB
Peter
Telerik team
 answered on 24 Aug 2009
2 answers
169 views
Hi,

Unfortunatelly this is related to a previous post of mine but its a different issue I am having now, so I decided to create a new thread.

I have a Radgrid with 3 hierarchy Grids which is made completely in the Code Behind using C#.  I have binded a RadtoolBar to the grid and created Column template based on a checkBox.

My application is suppossed to do the following:

1.Load a grid with new information from our new customers.
2.The hierarchy grids loads additional customer data, the products he has browsed, and the third hierarchy grid loads accounts from our database which share similar info with our new customer, so we can eventually disable these duplicate accounts.
3. The main grid and the third hierarchy grid have a checkbox column from a column template which on the customer side can be checked and disabled after the disable button from the radtoolbar has been pressed.

These two previous points I have been able to do.

Working on the third point has caused me alot of problems. In the checkbox template I was passing the customer id in the in the checkbox.id value, then via javascript I was navigating through all the checkbox inputs and determining which one was checked, then I would concatenate the customer ids into a hidden field, force a __doPostBack and disable the accounts, which worked great.

But this is my problem, when I expand the hierarchy grid with the duplicates, the names of the checkbox controls reset to a standard clientid and don't reload the id I had put in there before, so if I click a checkbox in the main grid the value is not passed, but in the hierarchy grid the value is passed, so it is one for another bassically...

One of the columns of the grid has the client Id, is it possible for me to determine which checkbox is checked from the grid and the hierarchy grid, then get the client Id, so I can disable the account?

Please let me know.
Thanks.
Daniel
Top achievements
Rank 1
 answered on 24 Aug 2009
2 answers
116 views
So how do you change the CSS for the RadControls?  Please give me an example of how to change the black themed Radgrid header and the rows please.  I need to know asap.  Thanks! 
Brett
Top achievements
Rank 1
 answered on 24 Aug 2009
1 answer
118 views
I've installed / uninstalled 2009 Q2 repeatedly.

Followed all the instructions in "Problems during install/uninstall" posting.

And I still cannot get it to install the toolbox items.

At least in the past there was an item in the Start Menu to register /  re-register the toolbox items. Even that is missing now.

How can I get my toolbox items?
Erjan Gavalji
Telerik team
 answered on 24 Aug 2009
2 answers
523 views
I have an aspx page that contains a RadToolBar.  In the RadToolBar, I create a RadComboBox at runtime.  I've set the AutoPostBack = true and I've plumbed in the SelectedIndexChanged event handler.  What I select a different item in the combo box, the page posts back but it does fire the event handler.  I've also tried code to wire up the the javascript code to handle the OnClientSelectedIndexChanged client side event.  That fires, but I'm not able to get any meaningful data our of the eventArgs.  Any suggestions would be appreciate

CODE TO WIRE UP SERVER SIDE SelectedIndexChanged event

RadToolBarButton

 

button = new RadToolBarButton("some string");

 

 

this.radToolBarGrid.Items.Add(button);

 

 

//Create a RadComboBox to track the drill activity

 

 

RadComboBox radCombo = new RadComboBox();

 

radCombo.AutoPostBack =

true;

 

radCombo.SelectedIndexChanged +=

new RadComboBoxSelectedIndexChangedEventHandler(radCombo_SelectedIndexChanged);

 

radCombo.Items.Add(

new RadComboBoxItem(item.Value, item.Key));
....

 

this

 

.radToolBarGrid.DataBind();

 

 

void radCombo_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)

 

{

 

throw new NotImplementedException();

 

}

 

CODE TO WIRE UP THE OnClientSelectedIndexChanged client side event.

 

radCombo.OnClientSelectedIndexChanged =

"HandleDrill";

 

function

 

HandleDrill(sender, eventArgs) {

 

 

 

var item = eventArgs.get_item();

 

 

// alert the new item text and value.

 

 

 

 

alert(item.Text +

":" + item.Value);

 

}

Kurt Boeckman
Top achievements
Rank 1
 answered on 24 Aug 2009
1 answer
160 views
Hello Telerik team,

I am using radeditor for creating the Newsletter and then converting them to pdf using exporttopdf()  .  only problem is that pdf does not take the css . please can you provide the way to provide css to pdf . A small demo would be helpfull .

Also is there a way to provide background colour to the pdf ?

Thanks in advance 
Vipin Ajmera 
virt
Top achievements
Rank 1
 answered on 24 Aug 2009
8 answers
202 views
I have a simple horizontal image gallery using the rotator.  One thing I've noticed though is that I can scroll up and down with my mouse and lose the images.  It's easy for users to accidently do this and think something is wrong.

How can I disable the vertical scrolling so this doesn't happen?  Thanks.
virt
Top achievements
Rank 1
 answered on 24 Aug 2009
6 answers
114 views
Hi,

I have a on demand combobox dropdown configured to use a web service to be populated.

It works fine except in the following situation:
1 - I click on the dropdown
2 - I press the down arrow and it starts scrolling through the items
3 - When it gets to the end of the loaded items and tries to load more it pops up with the error mesage
"Non-negative number required. Parameter name: count"

This only happens when I use the down arrow to scroll through the items, if I click on the down arrow on the scroll bar then it works fine.

Any ideas how to fix this?

Cheers,
Liam.
Simon
Telerik team
 answered on 24 Aug 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?