Hi!
In your right-click menu example you have this line -
sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index].get_element(), true);
it fails for hierarchical grids because index is a string like 0:0_0
Is there any way to make this work? I have a grid with two grids inside of it and while I click on a grid and get the menu, on the subgrids I get an error.
Another question is this. How can I limit height of boundgriditem in the grid view mode and make it expand in edit mode? So if the column is song lyrics we only show the first line but if we click edit then the whole lyrics shows up.
Thank you.
In your right-click menu example you have this line -
sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index].get_element(), true);
it fails for hierarchical grids because index is a string like 0:0_0
Is there any way to make this work? I have a grid with two grids inside of it and while I click on a grid and get the menu, on the subgrids I get an error.
Another question is this. How can I limit height of boundgriditem in the grid view mode and make it expand in edit mode? So if the column is song lyrics we only show the first line but if we click edit then the whole lyrics shows up.
Thank you.
8 Answers, 1 is accepted
0
Vlad
Top achievements
Rank 1
answered on 13 Jun 2008, 04:09 PM
anybody? :)
0
Hello Vlad,
I think that the link to the code library entry (at the bottom of the Description section of the same demo) can help you implement context menu in a hierarchical grid:
http://www.telerik.com/community/code-library/submission/b311D-kmaah.aspx
For the second case I suggest you use auto-generated or custom edit form which will display the editable data under the corresponding edit grid row. To limit the size of the column in view mode, consider setting fixed width for the columns/MasterTableView -> TableLayout = Fixed in combination with column resizing enabled:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Client/Resizing/DefaultCS.aspx
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I think that the link to the code library entry (at the bottom of the Description section of the same demo) can help you implement context menu in a hierarchical grid:
http://www.telerik.com/community/code-library/submission/b311D-kmaah.aspx
For the second case I suggest you use auto-generated or custom edit form which will display the editable data under the corresponding edit grid row. To limit the size of the column in view mode, consider setting fixed width for the columns/MasterTableView -> TableLayout = Fixed in combination with column resizing enabled:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Client/Resizing/DefaultCS.aspx
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Vlad
Top achievements
Rank 1
answered on 16 Jun 2008, 02:15 PM
The first demo is for old version, it doesn't work with new AJAX grid.
Second I actually meant rows not columns, sorry. Where would I set proper row height? I tried in master table but that didn't work.
Second I actually meant rows not columns, sorry. Where would I set proper row height? I tried in master table but that didn't work.
0
Hi Vlad,
Each sample project in the code library thread has version (with _Web_UI suffix) attached - let me know if I am missing something obvious.
For the second part:
Consider enabling row resizing as shown in the online example from my previous post and set height for the items to see whether this helps.
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Each sample project in the code library thread has version (with _Web_UI suffix) attached - let me know if I am missing something obvious.
For the second part:
Consider enabling row resizing as shown in the online example from my previous post and set height for the items to see whether this helps.
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Vlad
Top achievements
Rank 1
answered on 16 Jun 2008, 03:04 PM
Thank you for your answers.
I did get add/edit/delete working, I have a questions about delete -
(tableView as GridTableView).PerformDelete(((tableView as GridTableView).Items[radGridClickedRowIndex] as GridDataItem));
is there any way to automate confirmation popup like in aspx?
...ConfirmText="Are you sure you want to delete this Entry?"
ConfirmDialogType="Classic" ConfirmTitle="Delete" ...
Also, where exactly would I set row height?
Thanks
I did get add/edit/delete working, I have a questions about delete -
(tableView as GridTableView).PerformDelete(((tableView as GridTableView).Items[radGridClickedRowIndex] as GridDataItem));
is there any way to automate confirmation popup like in aspx?
...ConfirmText="Are you sure you want to delete this Entry?"
ConfirmDialogType="Classic" ConfirmTitle="Delete" ...
Also, where exactly would I set row height?
Thanks
0
Hi Vlad,
In order to show confirmation dialog when delete operation is triggered, consider intercepting the OnClientItemClicked client event of RadContextMenu and show the browser confirm from within its handler.
Concerning your second question:
To set the row height use the ItemStyle-> Height and AlternatingItemStyle -> Height properties of the grid/master table.
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
In order to show confirmation dialog when delete operation is triggered, consider intercepting the OnClientItemClicked client event of RadContextMenu and show the browser confirm from within its handler.
Concerning your second question:
To set the row height use the ItemStyle-> Height and AlternatingItemStyle -> Height properties of the grid/master table.
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Vlad
Top achievements
Rank 1
answered on 17 Jun 2008, 01:59 PM
Thanks.
I tried doing this -
<ItemStyle Height="20px" />
<AlternatingItemStyle Height="20px" />
but my rows still stretch to the size of text inside GridHTMLEditorColumn or GridBoundColumn whichever is larger.
TableLayout is set to fixed. Column resizing is enabled.
I tried doing this -
<ItemStyle Height="20px" />
<AlternatingItemStyle Height="20px" />
but my rows still stretch to the size of text inside GridHTMLEditorColumn or GridBoundColumn whichever is larger.
TableLayout is set to fixed. Column resizing is enabled.
0
Hi Vlad,
Have you enabled the row resizing for the grid as well (choosing ClientSettings -> Resizing -> AllowRowResize = true)? You may also check whether switching the table layout of the grid to Auto makes a difference.
Regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Have you enabled the row resizing for the grid as well (choosing ClientSettings -> Resizing -> AllowRowResize = true)? You may also check whether switching the table layout of the grid to Auto makes a difference.
Regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center