I know how to set the grid to resize the columns, easy part. But I need it to remember the column sizing per user. Would I have to store these values in a database table?
One suggestion will be to get the width of the column while resizing and store the value in hidden element. You can access the value of the hidden input on the server side and store it to the DataBase.
ASPX:
<input id="Hidden1"type="hidden"runat="server"/>
<ClientSettings AllowColumnsReorder="true">
<Resizing AllowColumnResize="true"/>
<ClientEvents OnColumnResizing="ColumnResizing"/>
</ClientSettings>
JS:
<script type="text/javascript" >
functionColumnResizing(sender, eventArgs)
{
var input=document.getElementById('<%=Hidden1.ClientID %>');
var colWidth=eventArgs.get_gridColumn().get_element().offsetWidth;
input.value=colWidth;
}
</script>
CS:
// to access the width of the column from hidden input string strval = Hidden1.Value;